-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Description
Checklist:
- I've searched in the docs and FAQ for my answer: https://bit.ly/argocd-faq.
- I've included steps to reproduce the bug.
- I've pasted the output of
argocd version.
Describe the bug
Newly-added Applications which share the same DRY source and hydration target with another Application will not be hydrated if the other Application has already hydrated the latest DRY commit. This is a regression caused by 6cd30d3 introducing a change to the commit-server where it will skip creating the commit when the DRY commit's SHA matches the one recorded in the hydrator.metadata git note.
When using a single repo with deployments that share the same DRY source and sync source, this can cause an unexpected behavior where newly-added Applications will appear to have been successfully hydrated but will fail to sync because their generated manifests haven't been committed.
As an aside, we also run a fairly unique setup where the hydrator.metadata git note causes an additional issue:
- We run 2 Argo CD instances, each targeting a subset of clusters (e.g.
staging-argofor staging,prod-argofor prod). This is intentional partitioning. - Both instances share the same
drySource(repo +mainbranch) andsyncSource(manifestsbranch). - When the hydrator is enabled, if
staging-argohydrates a DRY commit, it preventsprod-argofrom correctly hydrating its own apps. - The hydration statuses will show as updated for the
prod-argo-managed apps, but the manifests will be stale.
To Reproduce
It's most easily reproduced manually:
- In the DRY source (
mainbranch), create a commit containing a Helm chart,app-1-values.yaml, andapp-2-values.yaml - Separately, apply
App/oneconfigured withdrySource=main,syncSource=hydrated. The hydrator will run and create a new commit on thehydratedbranch. - Apply another
App/twoalso configured withdrySource=main,syncSource=hydrated. The hydrator will run, but no new commit will be created andApp/two's sync will fail.
It can also happen as the result of a race when using an ApplicationSet or the app-of-apps pattern:
- If a commit or series of commits is made and
App/oneis hydrated (e.g. by a user) before theapplicationset-controllercreatesApp/two. - If the app-of-apps also uses the Source Hydrator in a way where the commit has to be hydrated before the
App/twocan be created and synced.
To demonstrate, I created a repo with some concrete examples: https://github.com/epini-dw/argocd-bug-repro-1
Expected behavior
When a new Application is added, Argo CD will hydrate the new app's manifests even if the DRY commit was already hydrated for a different app.
Screenshots
N/A
Version
argocd: v3.3.0-rc3
BuildDate: 2025-12-18T23:36:38Z
GitCommit: 51b595b1ee6b3bfc04ca0a648f94a7d69579faee
GitTreeState: clean
GitTag: v3.3.0-rc3
GoVersion: go1.25.3
Compiler: gc
Platform: linux/arm64Logs