-
Notifications
You must be signed in to change notification settings - Fork 5.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Sync timeouts for applications (#6055) #20816
feat: Sync timeouts for applications (#6055) #20816
Conversation
❌ Preview Environment deleted from BunnyshellAvailable commands (reply to this comment):
|
Helps with argoproj#6055 Introduces a controller-level configuration for terminating sync after timeout. Signed-off-by: Andrii Korotkov <andrii.korotkov@verkada.com>
f9588ad
to
ca96116
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #20816 +/- ##
=========================================
Coverage ? 55.16%
=========================================
Files ? 324
Lines ? 55268
Branches ? 0
=========================================
Hits ? 30486
Misses ? 22165
Partials ? 2617 ☔ View full report in Codecov by Sentry. |
Nice! Do you think we can add a few e2e tests? |
I have |
I was thinking that deploying an application that will never leave progressing and being able to make sure it the sync status fails would be a good one to have. If you think the unit tests are solid, rock on! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall PR looks good. Although, I have 1 minor comment.
cmd/argocd-application-controller/commands/argocd_application_controller.go
Outdated
Show resolved
Hide resolved
Signed-off-by: Andrii Korotkov <andrii.korotkov@verkada.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes look good!!
* feat: Sync timeouts for applications (argoproj#6055) Helps with argoproj#6055 Introduces a controller-level configuration for terminating sync after timeout. Signed-off-by: Andrii Korotkov <andrii.korotkov@verkada.com> * Fix env variable name Signed-off-by: Andrii Korotkov <andrii.korotkov@verkada.com> --------- Signed-off-by: Andrii Korotkov <andrii.korotkov@verkada.com>
* feat: Sync timeouts for applications (argoproj#6055) Helps with argoproj#6055 Introduces a controller-level configuration for terminating sync after timeout. Signed-off-by: Andrii Korotkov <andrii.korotkov@verkada.com> * Fix env variable name Signed-off-by: Andrii Korotkov <andrii.korotkov@verkada.com> --------- Signed-off-by: Andrii Korotkov <andrii.korotkov@verkada.com> Signed-off-by: Brett C. Dudo <brett@dudo.io>
* feat: Sync timeouts for applications (argoproj#6055) Helps with argoproj#6055 Introduces a controller-level configuration for terminating sync after timeout. Signed-off-by: Andrii Korotkov <andrii.korotkov@verkada.com> * Fix env variable name Signed-off-by: Andrii Korotkov <andrii.korotkov@verkada.com> --------- Signed-off-by: Andrii Korotkov <andrii.korotkov@verkada.com>
After upgrading to the rc 5 version of 2.14.0, we tested this feature by adding the following configuration to argocd-cmd-params-cm: controller.sync.timeout.seconds: '30' However, even after reproducing the never-ending syncing state, it does not terminate after the specified timeout. |
I suspect 30 may be too small. Can you try with a value which would be more practical like 900-1800? |
Ah, I think maybe it's because it keep retrying and counts each attempt as a separate sync? I can confirm that I observed this feature working in at least one case in my company. Can you try disabling infinite retries and see what happens? |
can i get the scenario where you tested this on, I will try to reproduce it ? |
I don't have a repro :( |
I'm not sure, check out various status fields and see if the start timestamp is somewhat different than when the sync has started. I've noticed the sync initially is "waiting to start", so maybe that's not counted towards timeout. |
Helps with #6055
Introduces a controller-level configuration for terminating sync after timeout.
Checklist: