Checklist:
Describe the bug
When disabling and then re-enabling autosync in the UI for a given application, the settings for autosync (prune, selfHeal and allowEmpty) are not restored.
We use an app of apps pattern, which has autosync enabled. This means that if we have autosync enabled for our app of apps, these settings are restored automatically. This is problematic however, because a sync of our app of apps means that the disabling of autosync for a given application is re-enabled, seemingly randomly from the perspective of the application engineer that disabled it. The fix to this problem, we're ignoring /spec/syncPolicy/automated in the diff calculation, but this means we never get prune: true back for our applications.
To Reproduce
Starting with an Argo configured to use an app of apps pattern:
- Disable autosync for the app of apps
- Add a setting to a given application's manifest at
/spec/syncPolicy/automated, e.g. prune: true
spec:
syncPolicy:
automated:
prune: true
- Disable autosync for that application
- Re-enable autosync for that application
- Observe that
/spec/syncPolicy/automated is now set to {} for that application
spec:
syncPolicy:
automated: {}
Expected behavior
We expect any key/values in /spec/syncPolicy/automated to be restored when autosync is re-enabled for a given application.
Screenshots
n/a
Version
[17:51] % argocd version
argocd: v2.14.5+f463a94
BuildDate: 2025-03-11T04:57:12Z
GitCommit: f463a945d57267e9691cede37021d9ddc5994f36
GitTreeState: clean
GoVersion: go1.24.1
Compiler: gc
Platform: darwin/arm64
argocd-server: v2.14.13+5ad281e
BuildDate: 2025-05-28T14:51:52Z
GitCommit: 5ad281ef56a7ff11aab743ab004a470bf3ecf08c
GitTreeState: clean
GoVersion: go1.23.3
Compiler: gc
Platform: linux/amd64
Kustomize Version: v5.4.3 2024-07-19T16:40:33Z
Helm Version: v3.16.3+gcfd0749
Kubectl Version: v0.31.0
Jsonnet Version: v0.20.0
Logs
n/a
Checklist:
argocd version.Describe the bug
When disabling and then re-enabling autosync in the UI for a given application, the settings for autosync (prune, selfHeal and allowEmpty) are not restored.
We use an app of apps pattern, which has autosync enabled. This means that if we have autosync enabled for our app of apps, these settings are restored automatically. This is problematic however, because a sync of our app of apps means that the disabling of autosync for a given application is re-enabled, seemingly randomly from the perspective of the application engineer that disabled it. The fix to this problem, we're ignoring
/spec/syncPolicy/automatedin the diff calculation, but this means we never getprune: trueback for our applications.To Reproduce
Starting with an Argo configured to use an app of apps pattern:
/spec/syncPolicy/automated, e.g.prune: truespec: syncPolicy: automated: prune: true/spec/syncPolicy/automatedis now set to{}for that applicationspec: syncPolicy: automated: {}Expected behavior
We expect any key/values in
/spec/syncPolicy/automatedto be restored when autosync is re-enabled for a given application.Screenshots
n/a
Version
Logs
n/a