-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
fix: inject artificial delay between sync waves to better support health assessments #4715
Conversation
c3adaa3
to
7bcc036
Compare
Codecov Report
@@ Coverage Diff @@
## master #4715 +/- ##
==========================================
- Coverage 41.28% 41.11% -0.17%
==========================================
Files 127 127
Lines 17484 17556 +72
==========================================
+ Hits 7218 7219 +1
- Misses 9233 9306 +73
+ Partials 1033 1031 -2
Continue to review full report at Codecov.
|
7bcc036
to
a08bf26
Compare
0cd1ec9
to
e084700
Compare
Expect(OperationPhaseIs(OperationFailed)). | ||
Expect(SyncStatusIs(SyncStatusCodeOutOfSync)). | ||
Expect(HealthIs(health.HealthStatusMissing)). | ||
Expect(ResourceResultNumbering(1)). | ||
Expect(ResourceSyncStatusIs("Pod", "pod-1", SyncStatusCodeSynced)). | ||
Expect(ResourceHealthIs("Pod", "pod-1", health.HealthStatusHealthy)). | ||
Expect(ResourceSyncStatusIs("Pod", "pod-2", SyncStatusCodeOutOfSync)). | ||
Expect(ResourceHealthIs("Pod", "pod-2", health.HealthStatusMissing)). | ||
When(). | ||
Sync(). | ||
Then(). |
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.
The reason this was deleted is because this test had two syncs in a row (even though nothing changed in between those two syncs). The first sync would immediately detect the pod in a ImagePullBackoff state (from the previous state) and always fail.
After my change, the 2-second delay actually allowed the pod time to go from Degraded->Healthy, so that by the time the controller re-reconciled the operation, it saw the pod was healthy and the sync would succeed.
…lth assessments Signed-off-by: Jesse Suen <jesse_suen@intuit.com>
e084700
to
c954848
Compare
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.
LGTM
…zation-generators * 'master' of github.com:argoproj/argo-cd: fix: RevisionFormField component crashes in 'refs' API returns no tags (argoproj#4735) docs: add Opensurvey to USERS.md (argoproj#4727) docs: correct parameters usage in CLI (argoproj#4725) fix: Repo-server has silent unmarshalling errors leading to empty applications (argoproj#4423) (argoproj#4708) fix: inject artificial delay between sync waves to better support health assessments (argoproj#4715) fix: exclude files listed under exclusions (argoproj#4686) feat: support resource actions on CRDs that use status subresources (argoproj#4690) feat: Add autocomplete for repo Revisions (argoproj#4645) (argoproj#4713) fix: webhook don't refresh apps pointing to HEAD (argoproj#4717) feat: Add support for ExecProvider cluster auth (argoproj#4600) (argoproj#4710) fix: adding helm values file in New App (argoproj#4635) docs: Instructions on `make verify-kube-connect` step when using k3d (argoproj#4687) feat: Annotation based app paths detection in webhooks (argoproj#4699) fix: adding commonAnnotations for Kustomize (argoproj#4613)
Resolves #4669
Reduces (but does not eliminate) the possibility of sync waves/hooks firing pre-maturely, by introducing an artificial delay between each sync waves, allowing external controllers to react to the spec changes which were just applied.
Signed-off-by: Jesse Suen jesse_suen@intuit.com