argo-watcher icon indicating copy to clipboard operation
argo-watcher copied to clipboard

add support for setting app refresh from client

Open shini4i opened this issue 1 year ago • 1 comments

Currently, we support instance-wide ArgoRefreshApp configuration that does the job in most cases.

But there is an edge case when an Application with an actively running CronJob and enabled app refresh does not return a response within a reasonable timeframe, leading to the following error:

{"level":"warn","id":"1231d3e4-518b-4f14-9114-5ed9d30a6876","time":"2024-10-16T13:51:21Z","message":"Deployment failed with status \"failed\". Aborting with error: ArgoCD API Error: Get \"https://argocd-server.argocd/api/v1/applications/example-cron?refresh=normal\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)"}

At the same time, if we request app status without a refresh, it works perfectly fine.

So, it might be beneficial to add a per-task override possibility for a refresh option to work in tandem with the fire-and-forget mode.

shini4i avatar Oct 16 '24 18:10 shini4i

It might not be related to the cron itself but to the fact that the application is stuck in Refresh for whatever reason.

shini4i avatar Oct 17 '24 07:10 shini4i