Make the ArgoCD application refresh deadline configurable in the GitOps Sync step
A
Absinthe green Opossum
The GitOps Sync step runs a “PRE-SYNC PHASE” in which it refreshes the application before syncing. This refresh has a hard, internal deadline that we cannot configure. When the deadline is exceeded, the step fails even though the step timeout is far from reached. Please add a parameter to control the refresh time.
Problem
Our promotion pipelines sync an App-of-Apps across many environments.
The refresh sometimes fails with:
App Refresh In Progress for 1 application(s)...
Application meta.skeleton-app.core errored during refresh attempt
Error: {"error":"failed to get app from argo: failed to execute get app task: rpc error: code = FailedPrecondition desc = application refresh deadline exceeded","code":9, ...}
Sync is successful for 0 application(s), failed for 1 application(s) and is still running for 0 application(s)
The failed attempt ended after 32s, while the configured step timeout is 5m. So the refresh deadline is independent of the step timeout, and we found no setting for it in the step.
The failure is intermittent. In the execution above the first attempt failed and the second retry succeeded, with the refresh taking about 8s.
Sometimes even 3 retries do not help, and the pipeline fails. That means the failure is not always transient, and a retry does not reliably fix it. Our only workaround then is to re-run entire Deployment stage
Requested feature
Add optional parameters to the GitOps Sync step, for example:
refreshTimeout (e.g. 3m): the maximum time to wait for the application refresh to complete. It should be independent of, or clearly documented against, the step timeout.