Application sync triggered automatically immediately after being synced #21502
Labels
appset/progressive-syncs
Issues related to the ApplicationSet progressive syncs feature.
bug
Something isn't working
component:application-sets
Bulk application management related
Context
We have an app of apps, with auto-sync enabled, managing several appsets, which represent a service each. These appsets are composed of two applications that are rolled out using rollingSync. The former application deploys infra resources (DBs, buckets, etc with crossplane). The latter deploys the service per se (deployments, services, cronjobs, configmaps, etc), and has a pre-sync hook to run database migrations. Both applications in the appsets are composed of multiple sources, an OCI helm chart plus sourcing values.yaml files stored in a GitHub repository.
Describe the bug
When the apps' sources have been updated and any appset's app sync gets triggered, it syncs all resources as expected. However, immediately after everything gets in sync, another sync gets triggered. This last sync does not update anything as the application was already in sync.
This happens to both apps on the appset on every update after a code change, ever since I updated to this ArgoCD version. I was on the latest v2.11 before the upgrade and this was not happening.
This below is just me trying to guess what might be going on, take it with a pinch on salt.
Could it be related to this other issue? An endless loop in the appset's ProgressiveSync processing while syncing an app that somehow got more aggressive with the last minor versions' changes? Does this appset processing loop try to trigger the app sync while a sync runs without ensuring both the app is OutOfSync and no sync operation is running? Then, the application controller discards those sync retries while the sync operation runs, but maybe a last sync trigger gets through, sent by the appset before it notices the app got in sync, and gets to the aplication-controller right after it gets synced.
Custom configuration
argo-cd helm chart custom values
Screenshots
ArgoCD notifications screenshot
Version
Logs
ArgoCD application controller logs
The text was updated successfully, but these errors were encountered: