Application should be refreshed in-between sync retries #12904
Labels
component:core
Syncing, diffing, cluster state cache
enhancement
New feature or request
type:usability
Enhancement of an existing feature
Summary
When a sync fails for some reason, and retry is enabled, the Application should be refreshed in between the sync retries instead of re-using the same sync context for each retry.
Motivation
When auto-sync is enabled, a sync that runs with retries enabled may take a long time to complete if there is some kind of unrecoverable error (for example, an erroneous manifest), even if it is already fixed at the source. Even if Argo CD receives a refresh in the time the broken sync is running in its retry-loop, it won't consider any new changes in the repository, ultimately failing auto-sync until the next commit or manual refresh of the application.
Similarly, if self-heal is enabled, the following situation can occur:
Proposal
With sync retries enabled, Argo CD should perform a refresh and update of its sync-context on sync error before proceeding to the next tries. It should:
targetRevision
made in the source between the time the sync started and the retry andThe text was updated successfully, but these errors were encountered: