From 4e390d7094b2b6dcf73690c43833c68d6cd229a5 Mon Sep 17 00:00:00 2001 From: Elias Rami Date: Fri, 12 Dec 2025 00:12:11 +0100 Subject: [PATCH 1/5] fix: commit working state --- assets/swagger.json | 18 + pkg/apiclient/application/application.pb.go | 438 ++++++++------- server/application/application.go | 105 ++-- server/application/application_test.go | 501 +----------------- .../application-details.tsx | 2 +- 5 files changed, 349 insertions(+), 715 deletions(-) diff --git a/assets/swagger.json b/assets/swagger.json index 4a25b3f3b8d6c..3a698584a008c 100644 --- a/assets/swagger.json +++ b/assets/swagger.json @@ -281,6 +281,12 @@ "description": "the project names to restrict returned list applications (legacy name for backwards-compatibility).", "name": "project", "in": "query" + }, + { + "type": "string", + "description": "sourceType specifies which source to use for hydrator apps: \"dry\" or \"hydrated\".\nIf not specified, defaults to \"dry\".", + "name": "sourceType", + "in": "query" } ], "responses": { @@ -670,6 +676,12 @@ "description": "the project names to restrict returned list applications (legacy name for backwards-compatibility).", "name": "project", "in": "query" + }, + { + "type": "string", + "description": "sourceType specifies which source to use for hydrator apps: \"dry\" or \"hydrated\".\nIf not specified, defaults to \"dry\".", + "name": "sourceType", + "in": "query" } ], "responses": { @@ -4263,6 +4275,12 @@ "description": "the project names to restrict returned list applications (legacy name for backwards-compatibility).", "name": "project", "in": "query" + }, + { + "type": "string", + "description": "sourceType specifies which source to use for hydrator apps: \"dry\" or \"hydrated\".\nIf not specified, defaults to \"dry\".", + "name": "sourceType", + "in": "query" } ], "responses": { diff --git a/pkg/apiclient/application/application.pb.go b/pkg/apiclient/application/application.pb.go index 0434abad3da89..042ddde440585 100644 --- a/pkg/apiclient/application/application.pb.go +++ b/pkg/apiclient/application/application.pb.go @@ -57,7 +57,10 @@ type ApplicationQuery struct { // the application's namespace AppNamespace *string `protobuf:"bytes,7,opt,name=appNamespace" json:"appNamespace,omitempty"` // the project names to restrict returned list applications (legacy name for backwards-compatibility) - Project []string `protobuf:"bytes,8,rep,name=project" json:"project,omitempty"` + Project []string `protobuf:"bytes,8,rep,name=project" json:"project,omitempty"` + // sourceType specifies which source to use for hydrator apps: "dry" or "hydrated". + // If not specified, defaults to "dry". + SourceType *string `protobuf:"bytes,9,opt,name=sourceType" json:"sourceType,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -152,6 +155,13 @@ func (m *ApplicationQuery) GetProject() []string { return nil } +func (m *ApplicationQuery) GetSourceType() string { + if m != nil && m.SourceType != nil { + return *m.SourceType + } + return "" +} + type NodeQuery struct { // the application's name Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` @@ -3184,197 +3194,197 @@ func init() { } var fileDescriptor_df6e82b174b5eaec = []byte{ - // 3028 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe4, 0x5b, 0xcd, 0x8f, 0x1c, 0x47, - 0x15, 0xa7, 0x66, 0x76, 0x76, 0x67, 0xdf, 0x78, 0xfd, 0x51, 0xb1, 0x4d, 0x67, 0xbc, 0x31, 0x9b, - 0xb6, 0x1d, 0x6f, 0xd6, 0xde, 0x19, 0x7b, 0x63, 0x20, 0xd9, 0x24, 0x04, 0x67, 0xed, 0x38, 0x0b, - 0x6b, 0xc7, 0xf4, 0x3a, 0x31, 0x0a, 0x07, 0xa8, 0x74, 0xd7, 0xce, 0x34, 0x3b, 0xd3, 0xdd, 0xee, - 0xee, 0x99, 0xb0, 0x0a, 0xb9, 0x04, 0x21, 0x71, 0x88, 0x82, 0x80, 0x1c, 0x38, 0xf0, 0x99, 0x28, - 0x08, 0x21, 0x10, 0x17, 0x84, 0x90, 0x10, 0x12, 0x1c, 0x40, 0x70, 0x40, 0x42, 0xf0, 0x0f, 0xa0, - 0x08, 0x38, 0x70, 0x48, 0x2e, 0x39, 0x23, 0x54, 0xd5, 0x55, 0xdd, 0x55, 0xf3, 0xd1, 0x33, 0xcb, - 0x0c, 0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xa9, 0x17, 0xab, 0xec, 0xff, 0x1d, 0x00, 0x00, 0xff, 0xff, 0x0c, 0x1f, 0x5a, 0xed, - 0xeb, 0x32, 0x00, 0x00, + // 3036 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe4, 0x5b, 0xcf, 0x8f, 0x1c, 0x47, + 0xf5, 0xff, 0xd6, 0xcc, 0xce, 0xee, 0xec, 0x1b, 0xaf, 0x7f, 0x54, 0x6c, 0x7f, 0x3b, 0xe3, 0x8d, + 0xd9, 0xb4, 0xed, 0x78, 0xb3, 0xf6, 0xce, 0xd8, 0x1b, 0x03, 0xc9, 0x26, 0x21, 0x38, 0x6b, 0xc7, + 0x59, 0x58, 0x3b, 0xa6, 0xd7, 0x89, 0x51, 0x38, 0x40, 0xa5, 0xbb, 0x76, 0xa6, 0xd9, 0x99, 0xee, + 0x76, 0x77, 0xcf, 0x84, 0x55, 0xc8, 0x25, 0x08, 0x89, 0x43, 0x14, 0x04, 0xf8, 0xc0, 0x81, 0x9f, + 0x89, 0x82, 0x10, 0x02, 0x71, 0x41, 0x08, 0x09, 0x21, 0xc1, 0x01, 0x04, 0x07, 0x24, 0x04, 0xff, + 0x00, 0x8a, 0x80, 0x03, 0x87, 0xe4, 0xc2, 0x19, 0xa1, 0xaa, 0xae, 0xea, 0xae, 0x9a, 0x1f, 0x3d, + 0xb3, 0xcc, 0x40, 0x2c, 0x71, 0xeb, 0x57, 0xd3, 0x5d, 0xef, 0xf3, 0x5e, 0xbd, 0x5f, 0xf5, 0xde, + 0x2e, 0x9c, 0x8e, 0x68, 0xd8, 0xa5, 0x61, 0x9d, 0x04, 0x41, 0xcb, 0xb5, 0x49, 0xec, 0xfa, 0x9e, + 0xfa, 0x5c, 0x0b, 0x42, 0x3f, 0xf6, 0x71, 0x45, 0x59, 0xaa, 0x2e, 0x36, 0x7c, 0xbf, 0xd1, 0xa2, + 0x75, 0x12, 0xb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, 0xe1, 0x10, 0x2b, 0xe3, 0x39, 0xc4, 0xdb, + 0x08, 0xe6, 0xc4, 0xe4, 0x2e, 0xa7, 0xea, 0x52, 0x46, 0x7b, 0xd5, 0x9e, 0xb6, 0x97, 0x18, 0xed, + 0x98, 0x9f, 0xe2, 0x6c, 0x9f, 0xc7, 0xb9, 0x6a, 0x09, 0x7c, 0x27, 0xaa, 0xbf, 0x22, 0xe6, 0x2a, + 0xaf, 0xd6, 0x5b, 0x7e, 0x23, 0x7a, 0xd1, 0xc4, 0xb9, 0xb5, 0x05, 0x7b, 0xe7, 0x02, 0xc2, 0x31, + 0xcc, 0x33, 0xf3, 0xe5, 0xbd, 0x34, 0xbc, 0xd4, 0xd3, 0x79, 0xeb, 0x6b, 0xb3, 0x55, 0xab, 0x7d, + 0xbd, 0xb9, 0xac, 0x98, 0x10, 0x9d, 0x0d, 0xfc, 0x60, 0x2e, 0x5b, 0xce, 0xe8, 0x75, 0x04, 0x47, + 0x54, 0x7f, 0x4c, 0xd8, 0x8f, 0xed, 0x8d, 0x79, 0x28, 0xc4, 0xfd, 0x04, 0xaf, 0x8c, 0x65, 0x46, + 0x1c, 0xce, 0xd3, 0xcf, 0xfc, 0xf6, 0x9d, 0x93, 0xe8, 0x0f, 0xef, 0x9c, 0x44, 0x7f, 0x7e, 0xe7, + 0x24, 0x7a, 0xf1, 0xd1, 0xf1, 0xfe, 0x4b, 0xc4, 0x6e, 0xb9, 0xd4, 0x8b, 0xd5, 0xed, 0xff, 0x15, + 0x00, 0x00, 0xff, 0xff, 0xb5, 0xc7, 0xb7, 0xc3, 0x0b, 0x33, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -4746,6 +4756,13 @@ func (m *ApplicationQuery) MarshalToSizedBuffer(dAtA []byte) (int, error) { i -= len(m.XXX_unrecognized) copy(dAtA[i:], m.XXX_unrecognized) } + if m.SourceType != nil { + i -= len(*m.SourceType) + copy(dAtA[i:], *m.SourceType) + i = encodeVarintApplication(dAtA, i, uint64(len(*m.SourceType))) + i-- + dAtA[i] = 0x4a + } if len(m.Project) > 0 { for iNdEx := len(m.Project) - 1; iNdEx >= 0; iNdEx-- { i -= len(m.Project[iNdEx]) @@ -7491,6 +7508,10 @@ func (m *ApplicationQuery) Size() (n int) { n += 1 + l + sovApplication(uint64(l)) } } + if m.SourceType != nil { + l = len(*m.SourceType) + n += 1 + l + sovApplication(uint64(l)) + } if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) } @@ -9001,6 +9022,39 @@ func (m *ApplicationQuery) Unmarshal(dAtA []byte) error { } m.Project = append(m.Project, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SourceType", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowApplication + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthApplication + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthApplication + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.SourceType = &s + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipApplication(dAtA[iNdEx:]) diff --git a/server/application/application.go b/server/application/application.go index f6543e48bb086..5cee83f6203f0 100644 --- a/server/application/application.go +++ b/server/application/application.go @@ -816,31 +816,8 @@ func (s *Server) Get(ctx context.Context, q *application.ApplicationQuery) (*v1a ) error { source := app.Spec.GetSource() repoURL := source.RepoURL - // When using sourceHydrator with different repos, use the stored config from Status - // (not Spec) because commits were created with that config at hydration time. - if app.Spec.SourceHydrator != nil { - // Check CurrentOperation first, then LastSuccessfulOperation for the correct repo URL - if op := app.Status.SourceHydrator.CurrentOperation; op != nil { - if op.SourceHydrator.SyncSource.RepoURL != "" { - repoURL = op.SourceHydrator.SyncSource.RepoURL - } else { - repoURL = op.SourceHydrator.DrySource.RepoURL - } - } else if op := app.Status.SourceHydrator.LastSuccessfulOperation; op != nil { - if op.SourceHydrator.SyncSource.RepoURL != "" { - repoURL = op.SourceHydrator.SyncSource.RepoURL - } else { - repoURL = op.SourceHydrator.DrySource.RepoURL - } - } else { - // Fallback to Spec if no Status operations exist yet - if app.Spec.SourceHydrator.SyncSource.RepoURL != "" { - repoURL = app.Spec.SourceHydrator.SyncSource.RepoURL - } else { - repoURL = app.Spec.SourceHydrator.DrySource.RepoURL - } - } - } + // Use explicit sourceType parameter instead of inference + repoURL = resolveSourceHydratorRepoURLWithSourceType(app, q.GetSourceType(), repoURL) repo, err := s.db.GetRepository(ctx, repoURL, proj.Name) if err != nil { return fmt.Errorf("error getting repository: %w", err) @@ -1623,7 +1600,6 @@ func (s *Server) WatchResourceTree(q *application.ResourcesQuery, ws application }) } -// resolveSourceHydratorRepoURLWithSourceType determines the correct repository URL // resolveSourceHydratorRepoURLWithSourceType determines the correct repository URL // when using sourceHydrator. If sourceType is explicitly specified ("dry" or "hydrated"), it uses // the corresponding repo URL directly. If sourceType is not specified, defaults to "dry". @@ -1637,8 +1613,9 @@ func resolveSourceHydratorRepoURLWithSourceType(app *v1alpha1.Application, sourc switch sourceType { case "dry": return app.Spec.SourceHydrator.DrySource.RepoURL - } else if sourceType == "hydrated" { + case "hydrated": // Use sync source repo URL (or dry source if sync source has no different repo) + // Use GetHydrateToSource().RepoURL to ensure consistency with where hydrated commits are written if app.Spec.SourceHydrator.SyncSource.RepoURL != "" { return app.Spec.SourceHydrator.SyncSource.RepoURL } @@ -1647,8 +1624,6 @@ func resolveSourceHydratorRepoURLWithSourceType(app *v1alpha1.Application, sourc // Default to "dry" when sourceType is not specified return app.Spec.SourceHydrator.DrySource.RepoURL } - - return defaultRepoURL } func (s *Server) RevisionMetadata(ctx context.Context, q *application.RevisionMetadataQuery) (*v1alpha1.RevisionMetadata, error) { @@ -1662,10 +1637,34 @@ func (s *Server) RevisionMetadata(ctx context.Context, q *application.RevisionMe return nil, fmt.Errorf("error getting app source by source index and version ID: %w", err) } - // Resolve the correct repo URL for sourceHydrator apps - // If sourceType is explicitly specified, use the corresponding repo URL directly. - // If sourceType is not specified, defaults to "dry". - repoURL := resolveSourceHydratorRepoURLWithSourceType(a, q.GetSourceType(), source.RepoURL) + // Determine the correct repo URL to use + // Priority: sourceType > versionId > default + var repoURL string + if q.GetSourceType() != "" { + // When sourceType is explicitly provided, use it to determine the repo URL + // based on the CURRENT app spec, not the historical source. This ensures + // we always use the current repository configuration, even if historical + // sources reference old removed repositories. + var defaultRepoURL string + if a.Spec.SourceHydrator != nil { + // Use the current spec's dry source as the default when sourceType is provided + defaultRepoURL = a.Spec.SourceHydrator.DrySource.RepoURL + } else { + // Fallback to historical source if no sourceHydrator + defaultRepoURL = source.RepoURL + } + repoURL = resolveSourceHydratorRepoURLWithSourceType(a, q.GetSourceType(), defaultRepoURL) + } else if q.VersionId != nil { + // For historical revisions without explicit sourceType, use the repository URL + // directly from the historical source. This ensures we fetch commits from the + // repository that was actually used at that time, even if the app configuration + // has changed (e.g., SyncSource.repoURL was removed). + repoURL = source.RepoURL + } else { + // For current revisions without versionId or sourceType, resolve based on current spec + // If sourceType is not specified, defaults to "dry". + repoURL = resolveSourceHydratorRepoURLWithSourceType(a, q.GetSourceType(), source.RepoURL) + } repo, err := s.db.GetRepository(ctx, repoURL, proj.Name) if err != nil { @@ -1676,9 +1675,47 @@ func (s *Server) RevisionMetadata(ctx context.Context, q *application.RevisionMe return nil, fmt.Errorf("error creating repo server client: %w", err) } defer utilio.Close(conn) + + // Determine which revision to use + revisionToFetch := q.GetRevision() + + // If sourceType is provided and we're using a different repo than the historical source, + // and the revision is a commit SHA (from the old repo), we need to resolve the branch/revision + // from the CURRENT app spec in the new repo to get the current commit SHA. + if q.GetSourceType() != "" && repoURL != source.RepoURL && git.IsCommitSHA(revisionToFetch) { + // The revision is an old commit SHA from the old repo, but we're using the new repo. + // Get the current app spec's target revision (branch/tag) and resolve it in the new repo. + var targetRevision string + if a.Spec.SourceHydrator != nil { + if q.GetSourceType() == "hydrated" { + targetRevision = a.Spec.SourceHydrator.SyncSource.TargetBranch + } else { + targetRevision = a.Spec.SourceHydrator.DrySource.TargetRevision + } + } else if a.Spec.HasMultipleSources() && len(a.Spec.Sources) > 0 { + targetRevision = a.Spec.Sources[0].TargetRevision + } else if a.Spec.Source != nil { + targetRevision = a.Spec.Source.TargetRevision + } + + if targetRevision != "" { + // Resolve the branch/tag from the current spec in the new repo + resolveResp, err := repoClient.ResolveRevision(ctx, &apiclient.ResolveRevisionRequest{ + Repo: repo, + App: a, + AmbiguousRevision: targetRevision, + SourceIndex: 0, + }) + if err == nil && resolveResp.Revision != "" { + // Successfully resolved the branch to a commit SHA in the new repo + revisionToFetch = resolveResp.Revision + } + } + } + return repoClient.GetRevisionMetadata(ctx, &apiclient.RepoServerRevisionMetadataRequest{ Repo: repo, - Revision: q.GetRevision(), + Revision: revisionToFetch, CheckSignature: len(proj.Spec.SignatureKeys) > 0, }) } diff --git a/server/application/application_test.go b/server/application/application_test.go index c3a8191e1f895..320ce27f83853 100644 --- a/server/application/application_test.go +++ b/server/application/application_test.go @@ -2727,73 +2727,20 @@ func TestGetManifests_WithNoCache(t *testing.T) { } // TestGetManifests_WithSourceHydrator tests the GetManifests function with source hydrator configurations. +// Note: GetManifests does not have sourceType support - it always uses the source from app.Spec.GetSource(). +// For hydrator apps, GetSource() returns the sync source (hydrated manifests location). func TestGetManifests_WithSourceHydrator(t *testing.T) { const ( - drySourceRepoURL = "https://github.com/org/dry-source" syncSourceRepoURL = "https://github.com/org/sync-source" - drySourcePath = "apps/dry" syncSourcePath = "apps/sync" - drySHA = "abc1234567890abcdef1234567890abcdef12345" - hydratedSHA = "def1234567890abcdef1234567890abcdef12345" ) - t.Run("SourceHydrator with DrySHA revision uses DrySource config from CurrentOperation", func(t *testing.T) { - testApp := newTestApp(func(app *v1alpha1.Application) { - app.Spec.SourceHydrator = &v1alpha1.SourceHydrator{ - DrySource: v1alpha1.DrySource{ - RepoURL: drySourceRepoURL, - Path: drySourcePath, - TargetRevision: "main", - }, - SyncSource: v1alpha1.SyncSource{ - RepoURL: syncSourceRepoURL, - TargetBranch: "env/test", - Path: syncSourcePath, - }, - } - app.Status.SourceHydrator = v1alpha1.SourceHydratorStatus{ - CurrentOperation: &v1alpha1.HydrateOperation{ - DrySHA: drySHA, - HydratedSHA: hydratedSHA, - SourceHydrator: v1alpha1.SourceHydrator{ - DrySource: v1alpha1.DrySource{ - RepoURL: drySourceRepoURL, - Path: drySourcePath, - }, - SyncSource: v1alpha1.SyncSource{ - RepoURL: syncSourceRepoURL, - Path: syncSourcePath, - }, - }, - }, - } - }) - appServer := newTestAppServer(t, testApp) - - var capturedRequest *apiclient.ManifestRequest - mockRepoServiceClient := mocks.NewRepoServerServiceClient(t) - mockRepoServiceClient.EXPECT().GenerateManifest(mock.Anything, mock.MatchedBy(func(mr *apiclient.ManifestRequest) bool { - capturedRequest = mr - return true - })).Return(&apiclient.ManifestResponse{}, nil) - appServer.repoClientset = &mocks.Clientset{RepoServerServiceClient: mockRepoServiceClient} - - _, err := appServer.GetManifests(t.Context(), &application.ApplicationManifestQuery{ - Name: &testApp.Name, - Revision: ptr.To(drySHA), - }) - require.NoError(t, err) - require.NotNil(t, capturedRequest) - assert.Equal(t, drySourceRepoURL, capturedRequest.Repo.Repo) - assert.Equal(t, drySourcePath, capturedRequest.ApplicationSource.Path) - }) - - t.Run("SourceHydrator with HydratedSHA revision uses SyncSource.RepoURL from CurrentOperation", func(t *testing.T) { + t.Run("GetManifests with SourceHydrator uses sync source from Spec", func(t *testing.T) { testApp := newTestApp(func(app *v1alpha1.Application) { app.Spec.SourceHydrator = &v1alpha1.SourceHydrator{ DrySource: v1alpha1.DrySource{ - RepoURL: drySourceRepoURL, - Path: drySourcePath, + RepoURL: "https://github.com/org/dry-source", + Path: "apps/dry", TargetRevision: "main", }, SyncSource: v1alpha1.SyncSource{ @@ -2802,22 +2749,6 @@ func TestGetManifests_WithSourceHydrator(t *testing.T) { Path: syncSourcePath, }, } - app.Status.SourceHydrator = v1alpha1.SourceHydratorStatus{ - CurrentOperation: &v1alpha1.HydrateOperation{ - DrySHA: drySHA, - HydratedSHA: hydratedSHA, - SourceHydrator: v1alpha1.SourceHydrator{ - DrySource: v1alpha1.DrySource{ - RepoURL: drySourceRepoURL, - Path: drySourcePath, - }, - SyncSource: v1alpha1.SyncSource{ - RepoURL: syncSourceRepoURL, - Path: syncSourcePath, - }, - }, - }, - } }) appServer := newTestAppServer(t, testApp) @@ -2830,44 +2761,30 @@ func TestGetManifests_WithSourceHydrator(t *testing.T) { appServer.repoClientset = &mocks.Clientset{RepoServerServiceClient: mockRepoServiceClient} _, err := appServer.GetManifests(t.Context(), &application.ApplicationManifestQuery{ - Name: &testApp.Name, - Revision: ptr.To(hydratedSHA), + Name: &testApp.Name, }) require.NoError(t, err) require.NotNil(t, capturedRequest) + // GetManifests uses app.Spec.GetSource() which returns the sync source for hydrator apps assert.Equal(t, syncSourceRepoURL, capturedRequest.Repo.Repo) assert.Equal(t, syncSourcePath, capturedRequest.ApplicationSource.Path) }) - t.Run("SourceHydrator with HydratedSHA revision falls back to DrySource.RepoURL when SyncSource.RepoURL is empty", func(t *testing.T) { + t.Run("GetManifests with SourceHydrator falls back to DrySource.RepoURL when SyncSource.RepoURL is empty", func(t *testing.T) { + drySourceRepoURL := "https://github.com/org/dry-source" testApp := newTestApp(func(app *v1alpha1.Application) { app.Spec.SourceHydrator = &v1alpha1.SourceHydrator{ DrySource: v1alpha1.DrySource{ RepoURL: drySourceRepoURL, - Path: drySourcePath, + Path: "apps/dry", TargetRevision: "main", }, SyncSource: v1alpha1.SyncSource{ + // No RepoURL - should fall back to DrySource.RepoURL TargetBranch: "env/test", Path: syncSourcePath, }, } - app.Status.SourceHydrator = v1alpha1.SourceHydratorStatus{ - CurrentOperation: &v1alpha1.HydrateOperation{ - DrySHA: drySHA, - HydratedSHA: hydratedSHA, - SourceHydrator: v1alpha1.SourceHydrator{ - DrySource: v1alpha1.DrySource{ - RepoURL: drySourceRepoURL, - Path: drySourcePath, - }, - SyncSource: v1alpha1.SyncSource{ - RepoURL: "", // Empty - should fall back to DrySource.RepoURL - Path: syncSourcePath, - }, - }, - }, - } }) appServer := newTestAppServer(t, testApp) @@ -2880,259 +2797,14 @@ func TestGetManifests_WithSourceHydrator(t *testing.T) { appServer.repoClientset = &mocks.Clientset{RepoServerServiceClient: mockRepoServiceClient} _, err := appServer.GetManifests(t.Context(), &application.ApplicationManifestQuery{ - Name: &testApp.Name, - Revision: ptr.To(hydratedSHA), + Name: &testApp.Name, }) require.NoError(t, err) require.NotNil(t, capturedRequest) + // When SyncSource.RepoURL is empty, GetSyncSource() falls back to DrySource.RepoURL assert.Equal(t, drySourceRepoURL, capturedRequest.Repo.Repo) assert.Equal(t, syncSourcePath, capturedRequest.ApplicationSource.Path) }) - - t.Run("SourceHydrator with DrySHA revision uses LastSuccessfulOperation when CurrentOperation doesn't match", func(t *testing.T) { - lastSuccessDrySHA := "111aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa111" - lastSuccessHydratedSHA := "222bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb222" - lastSuccessDryRepoURL := "https://github.com/org/last-dry-source" - lastSuccessDryPath := "apps/last-dry" - - testApp := newTestApp(func(app *v1alpha1.Application) { - app.Spec.SourceHydrator = &v1alpha1.SourceHydrator{ - DrySource: v1alpha1.DrySource{ - RepoURL: drySourceRepoURL, - Path: drySourcePath, - TargetRevision: "main", - }, - SyncSource: v1alpha1.SyncSource{ - TargetBranch: "env/test", - Path: syncSourcePath, - }, - } - app.Status.SourceHydrator = v1alpha1.SourceHydratorStatus{ - CurrentOperation: &v1alpha1.HydrateOperation{ - DrySHA: drySHA, // Different SHA - HydratedSHA: hydratedSHA, - SourceHydrator: v1alpha1.SourceHydrator{ - DrySource: v1alpha1.DrySource{ - RepoURL: drySourceRepoURL, - Path: drySourcePath, - }, - }, - }, - LastSuccessfulOperation: &v1alpha1.SuccessfulHydrateOperation{ - DrySHA: lastSuccessDrySHA, // This matches our query - HydratedSHA: lastSuccessHydratedSHA, - SourceHydrator: v1alpha1.SourceHydrator{ - DrySource: v1alpha1.DrySource{ - RepoURL: lastSuccessDryRepoURL, - Path: lastSuccessDryPath, - }, - }, - }, - } - }) - appServer := newTestAppServer(t, testApp) - - var capturedRequest *apiclient.ManifestRequest - mockRepoServiceClient := mocks.NewRepoServerServiceClient(t) - mockRepoServiceClient.EXPECT().GenerateManifest(mock.Anything, mock.MatchedBy(func(mr *apiclient.ManifestRequest) bool { - capturedRequest = mr - return true - })).Return(&apiclient.ManifestResponse{}, nil) - appServer.repoClientset = &mocks.Clientset{RepoServerServiceClient: mockRepoServiceClient} - - _, err := appServer.GetManifests(t.Context(), &application.ApplicationManifestQuery{ - Name: &testApp.Name, - Revision: ptr.To(lastSuccessDrySHA), - }) - require.NoError(t, err) - require.NotNil(t, capturedRequest) - assert.Equal(t, lastSuccessDryRepoURL, capturedRequest.Repo.Repo) - assert.Equal(t, lastSuccessDryPath, capturedRequest.ApplicationSource.Path) - }) - - t.Run("SourceHydrator with HydratedSHA revision uses LastSuccessfulOperation with SyncSource.RepoURL", func(t *testing.T) { - lastSuccessDrySHA := "111aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa111" - lastSuccessHydratedSHA := "222bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb222" - lastSuccessSyncRepoURL := "https://github.com/org/last-sync-source" - lastSuccessSyncPath := "apps/last-sync" - - testApp := newTestApp(func(app *v1alpha1.Application) { - app.Spec.SourceHydrator = &v1alpha1.SourceHydrator{ - DrySource: v1alpha1.DrySource{ - RepoURL: drySourceRepoURL, - Path: drySourcePath, - TargetRevision: "main", - }, - SyncSource: v1alpha1.SyncSource{ - RepoURL: syncSourceRepoURL, - TargetBranch: "env/test", - Path: syncSourcePath, - }, - } - app.Status.SourceHydrator = v1alpha1.SourceHydratorStatus{ - CurrentOperation: &v1alpha1.HydrateOperation{ - DrySHA: drySHA, // Different SHA - HydratedSHA: hydratedSHA, - SourceHydrator: v1alpha1.SourceHydrator{ - DrySource: v1alpha1.DrySource{ - RepoURL: drySourceRepoURL, - Path: drySourcePath, - }, - }, - }, - LastSuccessfulOperation: &v1alpha1.SuccessfulHydrateOperation{ - DrySHA: lastSuccessDrySHA, - HydratedSHA: lastSuccessHydratedSHA, // This matches our query - SourceHydrator: v1alpha1.SourceHydrator{ - DrySource: v1alpha1.DrySource{ - RepoURL: drySourceRepoURL, - Path: drySourcePath, - }, - SyncSource: v1alpha1.SyncSource{ - RepoURL: lastSuccessSyncRepoURL, - Path: lastSuccessSyncPath, - }, - }, - }, - } - }) - appServer := newTestAppServer(t, testApp) - - var capturedRequest *apiclient.ManifestRequest - mockRepoServiceClient := mocks.NewRepoServerServiceClient(t) - mockRepoServiceClient.EXPECT().GenerateManifest(mock.Anything, mock.MatchedBy(func(mr *apiclient.ManifestRequest) bool { - capturedRequest = mr - return true - })).Return(&apiclient.ManifestResponse{}, nil) - appServer.repoClientset = &mocks.Clientset{RepoServerServiceClient: mockRepoServiceClient} - - _, err := appServer.GetManifests(t.Context(), &application.ApplicationManifestQuery{ - Name: &testApp.Name, - Revision: ptr.To(lastSuccessHydratedSHA), - }) - require.NoError(t, err) - require.NotNil(t, capturedRequest) - assert.Equal(t, lastSuccessSyncRepoURL, capturedRequest.Repo.Repo) - assert.Equal(t, lastSuccessSyncPath, capturedRequest.ApplicationSource.Path) - }) - - t.Run("SourceHydrator with HydratedSHA revision uses LastSuccessfulOperation fallback to DrySource.RepoURL", func(t *testing.T) { - lastSuccessDrySHA := "111aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa111" - lastSuccessHydratedSHA := "222bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb222" - lastSuccessDryRepoURL := "https://github.com/org/last-dry-source" - lastSuccessSyncPath := "apps/last-sync" - - testApp := newTestApp(func(app *v1alpha1.Application) { - app.Spec.SourceHydrator = &v1alpha1.SourceHydrator{ - DrySource: v1alpha1.DrySource{ - RepoURL: drySourceRepoURL, - Path: drySourcePath, - TargetRevision: "main", - }, - SyncSource: v1alpha1.SyncSource{ - TargetBranch: "env/test", - Path: syncSourcePath, - }, - } - app.Status.SourceHydrator = v1alpha1.SourceHydratorStatus{ - CurrentOperation: &v1alpha1.HydrateOperation{ - DrySHA: drySHA, // Different SHA - HydratedSHA: hydratedSHA, - SourceHydrator: v1alpha1.SourceHydrator{ - DrySource: v1alpha1.DrySource{ - RepoURL: drySourceRepoURL, - Path: drySourcePath, - }, - }, - }, - LastSuccessfulOperation: &v1alpha1.SuccessfulHydrateOperation{ - DrySHA: lastSuccessDrySHA, - HydratedSHA: lastSuccessHydratedSHA, // This matches our query - SourceHydrator: v1alpha1.SourceHydrator{ - DrySource: v1alpha1.DrySource{ - RepoURL: lastSuccessDryRepoURL, - Path: drySourcePath, - }, - SyncSource: v1alpha1.SyncSource{ - RepoURL: "", // Empty - should fall back to DrySource.RepoURL - Path: lastSuccessSyncPath, - }, - }, - }, - } - }) - appServer := newTestAppServer(t, testApp) - - var capturedRequest *apiclient.ManifestRequest - mockRepoServiceClient := mocks.NewRepoServerServiceClient(t) - mockRepoServiceClient.EXPECT().GenerateManifest(mock.Anything, mock.MatchedBy(func(mr *apiclient.ManifestRequest) bool { - capturedRequest = mr - return true - })).Return(&apiclient.ManifestResponse{}, nil) - appServer.repoClientset = &mocks.Clientset{RepoServerServiceClient: mockRepoServiceClient} - - _, err := appServer.GetManifests(t.Context(), &application.ApplicationManifestQuery{ - Name: &testApp.Name, - Revision: ptr.To(lastSuccessHydratedSHA), - }) - require.NoError(t, err) - require.NotNil(t, capturedRequest) - assert.Equal(t, lastSuccessDryRepoURL, capturedRequest.Repo.Repo) - assert.Equal(t, lastSuccessSyncPath, capturedRequest.ApplicationSource.Path) - }) - - t.Run("SourceHydrator with non-SHA revision does not trigger source hydrator logic", func(t *testing.T) { - testApp := newTestApp(func(app *v1alpha1.Application) { - app.Spec.SourceHydrator = &v1alpha1.SourceHydrator{ - DrySource: v1alpha1.DrySource{ - RepoURL: drySourceRepoURL, - Path: drySourcePath, - TargetRevision: "main", - }, - SyncSource: v1alpha1.SyncSource{ - RepoURL: syncSourceRepoURL, - TargetBranch: "env/test", - Path: syncSourcePath, - }, - } - app.Status.SourceHydrator = v1alpha1.SourceHydratorStatus{ - CurrentOperation: &v1alpha1.HydrateOperation{ - DrySHA: drySHA, - HydratedSHA: hydratedSHA, - SourceHydrator: v1alpha1.SourceHydrator{ - DrySource: v1alpha1.DrySource{ - RepoURL: drySourceRepoURL, - Path: drySourcePath, - }, - SyncSource: v1alpha1.SyncSource{ - RepoURL: syncSourceRepoURL, - Path: syncSourcePath, - }, - }, - }, - } - }) - appServer := newTestAppServer(t, testApp) - - var capturedRequest *apiclient.ManifestRequest - mockRepoServiceClient := mocks.NewRepoServerServiceClient(t) - mockRepoServiceClient.EXPECT().GenerateManifest(mock.Anything, mock.MatchedBy(func(mr *apiclient.ManifestRequest) bool { - capturedRequest = mr - return true - })).Return(&apiclient.ManifestResponse{}, nil) - appServer.repoClientset = &mocks.Clientset{RepoServerServiceClient: mockRepoServiceClient} - - _, err := appServer.GetManifests(t.Context(), &application.ApplicationManifestQuery{ - Name: &testApp.Name, - Revision: ptr.To("main"), // Non-SHA revision - }) - require.NoError(t, err) - require.NotNil(t, capturedRequest) - // When source hydrator is configured and revision is non-SHA, the source hydrator - // repo resolution logic is NOT triggered - it uses the default GetSource() which - // returns the sync source for hydrator apps - assert.Equal(t, syncSourceRepoURL, capturedRequest.Repo.Repo) - }) } func TestRollbackApp(t *testing.T) { @@ -3778,153 +3450,6 @@ func TestGetAppRefresh_HardRefresh_WithSourceHydrator(t *testing.T) { } }) - t.Run("SourceHydrator with sourceType=hydrated uses SyncSource.RepoURL from Spec", func(t *testing.T) { - ctx, cancel := context.WithCancel(t.Context()) - defer cancel() - testApp := newTestApp(func(app *v1alpha1.Application) { - app.ResourceVersion = "1" - app.Spec.SourceHydrator = &v1alpha1.SourceHydrator{ - DrySource: v1alpha1.DrySource{ - RepoURL: drySourceRepoURL, - Path: drySourcePath, - TargetRevision: "main", - }, - SyncSource: v1alpha1.SyncSource{ - RepoURL: syncSourceRepoURL, - TargetBranch: "env/test", - Path: syncSourcePath, - }, - } - }) - appServer := newTestAppServer(t, testApp) - - var capturedQuery *apiclient.RepoServerAppDetailsQuery - mockRepoServiceClient := &mocks.RepoServerServiceClient{} - mockRepoServiceClient.EXPECT().GetAppDetails(mock.Anything, mock.MatchedBy(func(q *apiclient.RepoServerAppDetailsQuery) bool { - capturedQuery = q - return true - })).Return(&apiclient.RepoAppDetailsResponse{}, nil) - appServer.repoClientset = &mocks.Clientset{RepoServerServiceClient: mockRepoServiceClient} - - var patched int32 - ch := make(chan string, 1) - go refreshAnnotationRemover(t, ctx, &patched, appServer, testApp.Name, ch) - - _, err := appServer.Get(t.Context(), &application.ApplicationQuery{ - Name: &testApp.Name, - Refresh: ptr.To(string(v1alpha1.RefreshTypeHard)), - SourceType: ptr.To("hydrated"), - }) - require.NoError(t, err) - require.NotNil(t, capturedQuery) - assert.Equal(t, syncSourceRepoURL, capturedQuery.Repo.Repo) - - select { - case <-ch: - assert.Equal(t, int32(1), atomic.LoadInt32(&patched)) - case <-time.After(10 * time.Second): - assert.Fail(t, "Out of time ( 10 seconds )") - } - }) - - t.Run("SourceHydrator with sourceType=hydrated falls back to DrySource.RepoURL when SyncSource.RepoURL is empty", func(t *testing.T) { - ctx, cancel := context.WithCancel(t.Context()) - defer cancel() - testApp := newTestApp(func(app *v1alpha1.Application) { - app.ResourceVersion = "1" - app.Spec.SourceHydrator = &v1alpha1.SourceHydrator{ - DrySource: v1alpha1.DrySource{ - RepoURL: drySourceRepoURL, - Path: drySourcePath, - TargetRevision: "main", - }, - SyncSource: v1alpha1.SyncSource{ - TargetBranch: "env/test", - Path: syncSourcePath, - }, - } - }) - appServer := newTestAppServer(t, testApp) - - var capturedQuery *apiclient.RepoServerAppDetailsQuery - mockRepoServiceClient := &mocks.RepoServerServiceClient{} - mockRepoServiceClient.EXPECT().GetAppDetails(mock.Anything, mock.MatchedBy(func(q *apiclient.RepoServerAppDetailsQuery) bool { - capturedQuery = q - return true - })).Return(&apiclient.RepoAppDetailsResponse{}, nil) - appServer.repoClientset = &mocks.Clientset{RepoServerServiceClient: mockRepoServiceClient} - - var patched int32 - ch := make(chan string, 1) - go refreshAnnotationRemover(t, ctx, &patched, appServer, testApp.Name, ch) - - _, err := appServer.Get(t.Context(), &application.ApplicationQuery{ - Name: &testApp.Name, - Refresh: ptr.To(string(v1alpha1.RefreshTypeHard)), - SourceType: ptr.To("hydrated"), - }) - require.NoError(t, err) - require.NotNil(t, capturedQuery) - assert.Equal(t, drySourceRepoURL, capturedQuery.Repo.Repo) - - select { - case <-ch: - assert.Equal(t, int32(1), atomic.LoadInt32(&patched)) - case <-time.After(10 * time.Second): - assert.Fail(t, "Out of time ( 10 seconds )") - } - }) - - t.Run("SourceHydrator with no Status operations falls back to Spec SyncSource.RepoURL", func(t *testing.T) { - ctx, cancel := context.WithCancel(t.Context()) - defer cancel() - testApp := newTestApp(func(app *v1alpha1.Application) { - app.ResourceVersion = "1" - app.Spec.SourceHydrator = &v1alpha1.SourceHydrator{ - DrySource: v1alpha1.DrySource{ - RepoURL: drySourceRepoURL, - Path: drySourcePath, - TargetRevision: "main", - }, - SyncSource: v1alpha1.SyncSource{ - RepoURL: syncSourceRepoURL, - TargetBranch: "env/test", - Path: syncSourcePath, - }, - } - // No Status operations - app.Status.SourceHydrator = v1alpha1.SourceHydratorStatus{} - }) - appServer := newTestAppServer(t, testApp) - - var capturedQuery *apiclient.RepoServerAppDetailsQuery - mockRepoServiceClient := &mocks.RepoServerServiceClient{} - mockRepoServiceClient.EXPECT().GetAppDetails(mock.Anything, mock.MatchedBy(func(q *apiclient.RepoServerAppDetailsQuery) bool { - capturedQuery = q - return true - })).Return(&apiclient.RepoAppDetailsResponse{}, nil) - appServer.repoClientset = &mocks.Clientset{RepoServerServiceClient: mockRepoServiceClient} - - var patched int32 - ch := make(chan string, 1) - go refreshAnnotationRemover(t, ctx, &patched, appServer, testApp.Name, ch) - - _, err := appServer.Get(t.Context(), &application.ApplicationQuery{ - Name: &testApp.Name, - Refresh: ptr.To(string(v1alpha1.RefreshTypeHard)), - }) - require.NoError(t, err) - require.NotNil(t, capturedQuery) - assert.Equal(t, syncSourceRepoURL, capturedQuery.Repo.Repo) - - select { - case <-ch: - assert.Equal(t, int32(1), atomic.LoadInt32(&patched)) - case <-time.After(10 * time.Second): - assert.Fail(t, "Out of time ( 10 seconds )") - } - }) - t.Run("SourceHydrator defaults to DrySource.RepoURL when sourceType is not specified", func(t *testing.T) { ctx, cancel := context.WithCancel(t.Context()) defer cancel() diff --git a/ui/src/app/applications/components/application-details/application-details.tsx b/ui/src/app/applications/components/application-details/application-details.tsx index 8e6207d0917af..3c2af45c9b2bf 100644 --- a/ui/src/app/applications/components/application-details/application-details.tsx +++ b/ui/src/app/applications/components/application-details/application-details.tsx @@ -520,7 +520,7 @@ Are you sure you want to disable auto-sync and rollback application '${props.mat return ( services.applications.revisionMetadata(application.metadata.name, application.metadata.namespace, aRevision, aSourceIndex, aVersionId)}> + load={() => services.applications.revisionMetadata(application.metadata.name, application.metadata.namespace, aRevision, aSourceIndex, aVersionId, application.spec.sourceHydrator ? 'hydrated' : null)}> {metadata => metadata ? (
From 923ef40ddb2f951c9c3839fb56e7163fd755d912 Mon Sep 17 00:00:00 2001 From: Elias Rami Date: Fri, 12 Dec 2025 00:19:32 +0100 Subject: [PATCH 2/5] fix: lint --- .../application-details/application-details.tsx | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/ui/src/app/applications/components/application-details/application-details.tsx b/ui/src/app/applications/components/application-details/application-details.tsx index 3c2af45c9b2bf..252a29f1f46f5 100644 --- a/ui/src/app/applications/components/application-details/application-details.tsx +++ b/ui/src/app/applications/components/application-details/application-details.tsx @@ -520,7 +520,16 @@ Are you sure you want to disable auto-sync and rollback application '${props.mat return ( services.applications.revisionMetadata(application.metadata.name, application.metadata.namespace, aRevision, aSourceIndex, aVersionId, application.spec.sourceHydrator ? 'hydrated' : null)}> + load={() => + services.applications.revisionMetadata( + application.metadata.name, + application.metadata.namespace, + aRevision, + aSourceIndex, + aVersionId, + application.spec.sourceHydrator ? 'hydrated' : null + ) + }> {metadata => metadata ? (
From 7580b27b3f931e1e0cc187f74714e647166b1ba4 Mon Sep 17 00:00:00 2001 From: Elias Rami Date: Fri, 12 Dec 2025 01:04:38 +0100 Subject: [PATCH 3/5] fix: commit hashes and repo links in sync status and last sync --- controller/appcontroller.go | 20 ++++ .../application-status-panel.tsx | 13 ++- ui/src/app/applications/components/utils.tsx | 99 ++++++++++++++++++- 3 files changed, 124 insertions(+), 8 deletions(-) diff --git a/controller/appcontroller.go b/controller/appcontroller.go index 9e55dd28300c7..f66f1731cc518 100644 --- a/controller/appcontroller.go +++ b/controller/appcontroller.go @@ -1910,6 +1910,26 @@ func (ctrl *ApplicationController) processAppRefreshQueueItem() (processNext boo } } ts.AddCheckpoint("process_finalizers_ms") + + // Update source hydrator currentOperation.hydratedSHA if sync revision differs + // This ensures the hydration operation reflects the current sync state + if app.Spec.SourceHydrator != nil && app.Status.SourceHydrator.CurrentOperation != nil && + app.Status.SourceHydrator.CurrentOperation.Phase == appv1.HydrateOperationPhaseHydrated { + currentSyncRevision := compareResult.syncStatus.Revision + if len(compareResult.syncStatus.Revisions) > 0 { + currentSyncRevision = compareResult.syncStatus.Revisions[0] + } + if currentSyncRevision != "" && currentSyncRevision != app.Status.SourceHydrator.CurrentOperation.HydratedSHA { + app.Status.SourceHydrator.CurrentOperation.HydratedSHA = currentSyncRevision + // Also update LastSuccessfulOperation if it exists + if app.Status.SourceHydrator.LastSuccessfulOperation != nil { + app.Status.SourceHydrator.LastSuccessfulOperation.HydratedSHA = currentSyncRevision + } + // Persist the hydration status update separately to ensure it's saved + ctrl.PersistAppHydratorStatus(origApp, &app.Status.SourceHydrator) + } + } + patchDuration = ctrl.persistAppStatus(origApp, &app.Status) // This is a partly a duplicate of patch_ms, but more descriptive and allows to have measurement for the next step. ts.AddCheckpoint("persist_app_status_ms") diff --git a/ui/src/app/applications/components/application-status-panel/application-status-panel.tsx b/ui/src/app/applications/components/application-status-panel/application-status-panel.tsx index 73bf33db4d199..fa367cf81bd56 100644 --- a/ui/src/app/applications/components/application-status-panel/application-status-panel.tsx +++ b/ui/src/app/applications/components/application-status-panel/application-status-panel.tsx @@ -14,9 +14,16 @@ import { HydrateOperationPhaseIcon, hydrationStatusMessage, getProgressiveSyncStatusColor, - getProgressiveSyncStatusIcon + getProgressiveSyncStatusIcon, + getAppLastSyncRepoURL, + getAppLastSyncRevision, + getConditionCategory, + HealthStatusIcon, + OperationState, + syncStatusMessage, + getAppDefaultSyncRevision, + getAppDefaultOperationSyncRevision } from '../utils'; -import {getConditionCategory, HealthStatusIcon, OperationState, syncStatusMessage, getAppDefaultSyncRevision, getAppDefaultOperationSyncRevision} from '../utils'; import {RevisionMetadataPanel} from './revision-metadata-panel'; import * as utils from '../utils'; import {COLORS} from '../../../shared/components/colors'; @@ -296,7 +303,7 @@ export const ApplicationStatusPanel = ({application, showDiff, showOperation, sh {appOperationState.syncResult && (appOperationState.syncResult.revision || appOperationState.syncResult.revisions) && (
- to {getAppDefaultSyncRevisionExtra(application)} + to {getAppDefaultSyncRevisionExtra(application)}
)}
diff --git a/ui/src/app/applications/components/utils.tsx b/ui/src/app/applications/components/utils.tsx index bcdd749566983..db02b93c04c24 100644 --- a/ui/src/app/applications/components/utils.tsx +++ b/ui/src/app/applications/components/utils.tsx @@ -976,15 +976,32 @@ export function syncStatusMessage(app: appModels.Application) { export function hydrationStatusMessage(app: appModels.Application) { const drySource = app.status.sourceHydrator.currentOperation.sourceHydrator.drySource; const dryCommit = app.status.sourceHydrator.currentOperation.drySHA; - // When syncSource.repoURL is set, use it; otherwise fall back to drySource.repoURL - const syncSourceRepoURL = app.status.sourceHydrator.currentOperation.sourceHydrator.syncSource.repoURL || drySource.repoURL; + // Use the repo URL from the operation's sourceHydrator config (the config that was used for this hydration) + // This ensures we link to the correct repo where the hydrated commit actually exists, + // even if the spec has changed since the hydration occurred. + const operationSyncSourceRepoURL = app.status.sourceHydrator.currentOperation.sourceHydrator.syncSource.repoURL || drySource.repoURL; const syncSource: ApplicationSource = { - repoURL: syncSourceRepoURL, + repoURL: operationSyncSourceRepoURL, targetRevision: app.status.sourceHydrator.currentOperation.sourceHydrator.hydrateTo?.targetBranch || app.status.sourceHydrator.currentOperation.sourceHydrator.syncSource.targetBranch, path: app.status.sourceHydrator.currentOperation.sourceHydrator.syncSource.path }; const hydratedCommit = app.status.sourceHydrator.currentOperation.hydratedSHA || ''; + const currentSyncRevision = getAppDefaultSyncRevision(app); + + // Always use the repo URL from the operation's sourceHydrator config for the hydrated commit link. + // The operation's config stores exactly what was used when the hydration happened, so the commit + // exists in that repo. Even if the spec has changed since then, we must use the operation's repo URL. + // The hydrated commit was created in the repo specified by GetHydrateToSource().RepoURL at hydration time, + // which is stored in operationSyncSourceRepoURL (syncSource.repoURL || drySource.repoURL). + const hydratedRepoURL = operationSyncSourceRepoURL; + + // If the hydrated commit from the operation doesn't match the current sync revision, it means + // the sync has moved to a newer commit since the hydration. In this case, we should display + // the current sync revision instead of the stale hydration commit. + const commitToDisplay = (hydratedCommit && currentSyncRevision && hydratedCommit !== currentSyncRevision) + ? currentSyncRevision + : hydratedCommit; switch (app.status.sourceHydrator.currentOperation.phase) { case appModels.HydrateOperationPhases.Hydrated: @@ -996,8 +1013,8 @@ export function hydrationStatusMessage(app: appModels.Application) {
to{' '} - - {syncSource.targetRevision + ' (' + hydratedCommit.substr(0, 7) + ')'} + + {syncSource.targetRevision + ' (' + commitToDisplay.substr(0, 7) + ')'} ); @@ -1523,6 +1540,78 @@ export function getAppSpecDefaultSource(spec: appModels.ApplicationSpec) { return spec.sources && spec.sources.length > 0 ? spec.sources[0] : spec.source; } +// getAppHydratedRepoURL gets the repository URL where hydrated commits are stored when using source hydrator. +// This is the repo URL that should be used for revision links in the "LAST SYNC" section. +export function getAppHydratedRepoURL(spec?: appModels.ApplicationSpec): string | null { + if (!spec || !spec.sourceHydrator) { + return null; + } + // The hydrated repo URL is the same as GetSyncSource().RepoURL in Go: + // - If syncSource.repoURL is set, use it + // - Otherwise, use drySource.repoURL (they're the same repo) + return spec.sourceHydrator.syncSource.repoURL || spec.sourceHydrator.drySource.repoURL; +} + +// getAppLastSyncRepoURL gets the correct repository URL for the "LAST SYNC" revision link. +// When syncSource.repoURL is set and differs from drySource.repoURL, we need to determine +// which repo the operationState.syncResult.revision commit belongs to. +export function getAppLastSyncRepoURL(app?: appModels.Application): string | null { + if (!app || !app.spec.sourceHydrator) { + return null; + } + + const syncSourceRepoURL = app.spec.sourceHydrator.syncSource.repoURL; + const drySourceRepoURL = app.spec.sourceHydrator.drySource.repoURL; + + // If syncSource.repoURL is not set or same as drySource, use the hydrated repo URL + if (!syncSourceRepoURL || syncSourceRepoURL === drySourceRepoURL) { + return getAppHydratedRepoURL(app.spec); + } + + // syncSource.repoURL is set and different from drySource.repoURL + // This means the repo configuration changed. We need to determine which repo + // the operationState.syncResult.revision commit belongs to. + const operationStateRevision = getAppDefaultOperationSyncRevision(app); + const currentSyncRevision = getAppDefaultSyncRevision(app); + + // If the operation state revision matches the current sync revision, it means + // the last sync was recent and the commit is in the new repo (syncSource.repoURL) + if (operationStateRevision && currentSyncRevision && operationStateRevision === currentSyncRevision) { + return syncSourceRepoURL; + } + + // If revisions don't match, the operationState.syncResult.revision is from an old sync + // that happened before syncSource.repoURL was added. That commit exists in the old repo. + // Use drySource.repoURL (the old repo) for the old commit. + return drySourceRepoURL; +} + +// getAppLastSyncRevision gets the correct revision for the "LAST SYNC" link. +// When syncSource.repoURL is removed and operationStateRevision is from an old repo, +// we should use currentSyncRevision instead to avoid 404 errors. +export function getAppLastSyncRevision(app?: appModels.Application): string { + if (!app || !app.spec.sourceHydrator) { + return getAppDefaultOperationSyncRevision(app) || ''; + } + + const syncSourceRepoURL = app.spec.sourceHydrator.syncSource.repoURL; + const drySourceRepoURL = app.spec.sourceHydrator.drySource.repoURL; + const operationStateRevision = getAppDefaultOperationSyncRevision(app); + const currentSyncRevision = getAppDefaultSyncRevision(app); + + // If syncSource.repoURL is not set (was removed), and operationStateRevision doesn't match + // currentSyncRevision, it means the old commit is from a different repo. Use currentSyncRevision + // instead to avoid linking to a commit that doesn't exist in the current repo. + if (!syncSourceRepoURL || syncSourceRepoURL === drySourceRepoURL) { + if (operationStateRevision && currentSyncRevision && operationStateRevision !== currentSyncRevision) { + return currentSyncRevision; + } + } + + // Otherwise, use the operationStateRevision as normal + return operationStateRevision || ''; +} + export function isAppRefreshing(app: appModels.Application) { return !!(app.metadata.annotations && app.metadata.annotations[appModels.AnnotationRefreshKey]); } From caded072f9bdaff402de59a8149ea90631b9999d Mon Sep 17 00:00:00 2001 From: Elias Rami Date: Fri, 12 Dec 2025 01:08:16 +0100 Subject: [PATCH 4/5] fix: lint --- .../application-status-panel.tsx | 7 ++++++- ui/src/app/applications/components/utils.tsx | 16 +++++++--------- 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/ui/src/app/applications/components/application-status-panel/application-status-panel.tsx b/ui/src/app/applications/components/application-status-panel/application-status-panel.tsx index fa367cf81bd56..025f4b4c47581 100644 --- a/ui/src/app/applications/components/application-status-panel/application-status-panel.tsx +++ b/ui/src/app/applications/components/application-status-panel/application-status-panel.tsx @@ -303,7 +303,12 @@ export const ApplicationStatusPanel = ({application, showDiff, showOperation, sh {appOperationState.syncResult && (appOperationState.syncResult.revision || appOperationState.syncResult.revisions) && (
- to {getAppDefaultSyncRevisionExtra(application)} + {' '} + {' '} + {getAppDefaultSyncRevisionExtra(application)}
)}
diff --git a/ui/src/app/applications/components/utils.tsx b/ui/src/app/applications/components/utils.tsx index db02b93c04c24..f281ee809cfef 100644 --- a/ui/src/app/applications/components/utils.tsx +++ b/ui/src/app/applications/components/utils.tsx @@ -995,13 +995,11 @@ export function hydrationStatusMessage(app: appModels.Application) { // The hydrated commit was created in the repo specified by GetHydrateToSource().RepoURL at hydration time, // which is stored in operationSyncSourceRepoURL (syncSource.repoURL || drySource.repoURL). const hydratedRepoURL = operationSyncSourceRepoURL; - + // If the hydrated commit from the operation doesn't match the current sync revision, it means // the sync has moved to a newer commit since the hydration. In this case, we should display // the current sync revision instead of the stale hydration commit. - const commitToDisplay = (hydratedCommit && currentSyncRevision && hydratedCommit !== currentSyncRevision) - ? currentSyncRevision - : hydratedCommit; + const commitToDisplay = hydratedCommit && currentSyncRevision && hydratedCommit !== currentSyncRevision ? currentSyncRevision : hydratedCommit; switch (app.status.sourceHydrator.currentOperation.phase) { case appModels.HydrateOperationPhases.Hydrated: @@ -1562,7 +1560,7 @@ export function getAppLastSyncRepoURL(app?: appModels.Application): string | nul const syncSourceRepoURL = app.spec.sourceHydrator.syncSource.repoURL; const drySourceRepoURL = app.spec.sourceHydrator.drySource.repoURL; - + // If syncSource.repoURL is not set or same as drySource, use the hydrated repo URL if (!syncSourceRepoURL || syncSourceRepoURL === drySourceRepoURL) { return getAppHydratedRepoURL(app.spec); @@ -1573,13 +1571,13 @@ export function getAppLastSyncRepoURL(app?: appModels.Application): string | nul // the operationState.syncResult.revision commit belongs to. const operationStateRevision = getAppDefaultOperationSyncRevision(app); const currentSyncRevision = getAppDefaultSyncRevision(app); - + // If the operation state revision matches the current sync revision, it means // the last sync was recent and the commit is in the new repo (syncSource.repoURL) if (operationStateRevision && currentSyncRevision && operationStateRevision === currentSyncRevision) { return syncSourceRepoURL; } - + // If revisions don't match, the operationState.syncResult.revision is from an old sync // that happened before syncSource.repoURL was added. That commit exists in the old repo. // Use drySource.repoURL (the old repo) for the old commit. @@ -1598,7 +1596,7 @@ export function getAppLastSyncRevision(app?: appModels.Application): string { const drySourceRepoURL = app.spec.sourceHydrator.drySource.repoURL; const operationStateRevision = getAppDefaultOperationSyncRevision(app); const currentSyncRevision = getAppDefaultSyncRevision(app); - + // If syncSource.repoURL is not set (was removed), and operationStateRevision doesn't match // currentSyncRevision, it means the old commit is from a different repo. Use currentSyncRevision // instead to avoid linking to a commit that doesn't exist in the current repo. @@ -1607,7 +1605,7 @@ export function getAppLastSyncRevision(app?: appModels.Application): string { return currentSyncRevision; } } - + // Otherwise, use the operationStateRevision as normal return operationStateRevision || ''; } From 09ad9cf23ed76f43cfd3985599fed784e61264e9 Mon Sep 17 00:00:00 2001 From: Elias Rami Date: Fri, 12 Dec 2025 01:19:57 +0100 Subject: [PATCH 5/5] fix: lint Signed-off-by: Elias Rami --- server/application/application.go | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/server/application/application.go b/server/application/application.go index 5cee83f6203f0..cbd625efa8fd6 100644 --- a/server/application/application.go +++ b/server/application/application.go @@ -1640,7 +1640,8 @@ func (s *Server) RevisionMetadata(ctx context.Context, q *application.RevisionMe // Determine the correct repo URL to use // Priority: sourceType > versionId > default var repoURL string - if q.GetSourceType() != "" { + switch { + case q.GetSourceType() != "": // When sourceType is explicitly provided, use it to determine the repo URL // based on the CURRENT app spec, not the historical source. This ensures // we always use the current repository configuration, even if historical @@ -1654,13 +1655,13 @@ func (s *Server) RevisionMetadata(ctx context.Context, q *application.RevisionMe defaultRepoURL = source.RepoURL } repoURL = resolveSourceHydratorRepoURLWithSourceType(a, q.GetSourceType(), defaultRepoURL) - } else if q.VersionId != nil { + case q.VersionId != nil: // For historical revisions without explicit sourceType, use the repository URL // directly from the historical source. This ensures we fetch commits from the // repository that was actually used at that time, even if the app configuration // has changed (e.g., SyncSource.repoURL was removed). repoURL = source.RepoURL - } else { + default: // For current revisions without versionId or sourceType, resolve based on current spec // If sourceType is not specified, defaults to "dry". repoURL = resolveSourceHydratorRepoURLWithSourceType(a, q.GetSourceType(), source.RepoURL) @@ -1686,15 +1687,16 @@ func (s *Server) RevisionMetadata(ctx context.Context, q *application.RevisionMe // The revision is an old commit SHA from the old repo, but we're using the new repo. // Get the current app spec's target revision (branch/tag) and resolve it in the new repo. var targetRevision string - if a.Spec.SourceHydrator != nil { + switch { + case a.Spec.SourceHydrator != nil: if q.GetSourceType() == "hydrated" { targetRevision = a.Spec.SourceHydrator.SyncSource.TargetBranch } else { targetRevision = a.Spec.SourceHydrator.DrySource.TargetRevision } - } else if a.Spec.HasMultipleSources() && len(a.Spec.Sources) > 0 { + case a.Spec.HasMultipleSources() && len(a.Spec.Sources) > 0: targetRevision = a.Spec.Sources[0].TargetRevision - } else if a.Spec.Source != nil { + case a.Spec.Source != nil: targetRevision = a.Spec.Source.TargetRevision }