-
Notifications
You must be signed in to change notification settings - Fork 880
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: prevent hot loop when fully promoted rollout is aborted #3064
Merged
zachaller
merged 2 commits into
argoproj:master
from
jessesuen:fix/scale-down-deadline-hot-loop
Sep 29, 2023
Merged
fix: prevent hot loop when fully promoted rollout is aborted #3064
zachaller
merged 2 commits into
argoproj:master
from
jessesuen:fix/scale-down-deadline-hot-loop
Sep 29, 2023
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Signed-off-by: Jesse Suen <[email protected]>
jessesuen
force-pushed
the
fix/scale-down-deadline-hot-loop
branch
from
September 28, 2023 05:08
607fa12
to
d5d88e2
Compare
Codecov ReportAll modified lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #3064 +/- ##
==========================================
- Coverage 81.75% 81.74% -0.02%
==========================================
Files 134 134
Lines 20395 20398 +3
==========================================
Hits 16674 16674
- Misses 2865 2866 +1
- Partials 856 858 +2
☔ View full report in Codecov by Sentry. |
Signed-off-by: Jesse Suen <[email protected]>
jessesuen
force-pushed
the
fix/scale-down-deadline-hot-loop
branch
from
September 28, 2023 18:01
d5d88e2
to
2c6e8b5
Compare
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
zachaller
approved these changes
Sep 29, 2023
zachaller
approved these changes
Sep 29, 2023
phclark
pushed a commit
to phclark/argo-rollouts
that referenced
this pull request
Oct 13, 2023
…j#3064) * fix: prevent hot loop when fully promoted rollout is aborted Signed-off-by: Jesse Suen <[email protected]> * test: change expectations of abort tests Signed-off-by: Jesse Suen <[email protected]> --------- Signed-off-by: Jesse Suen <[email protected]> Signed-off-by: Philip Clark <[email protected]>
phclark
pushed a commit
to phclark/argo-rollouts
that referenced
this pull request
Oct 15, 2023
…j#3064) * fix: prevent hot loop when fully promoted rollout is aborted Signed-off-by: Jesse Suen <[email protected]> * test: change expectations of abort tests Signed-off-by: Jesse Suen <[email protected]> --------- Signed-off-by: Jesse Suen <[email protected]> Signed-off-by: Philip Clark <[email protected]>
phclark
pushed a commit
to phclark/argo-rollouts
that referenced
this pull request
Oct 15, 2023
…j#3064) * fix: prevent hot loop when fully promoted rollout is aborted Signed-off-by: Jesse Suen <[email protected]> * test: change expectations of abort tests Signed-off-by: Jesse Suen <[email protected]> --------- Signed-off-by: Jesse Suen <[email protected]> Signed-off-by: Philip Clark <[email protected]>
zachaller
pushed a commit
that referenced
this pull request
Oct 25, 2023
* fix: prevent hot loop when fully promoted rollout is aborted Signed-off-by: Jesse Suen <[email protected]> * test: change expectations of abort tests Signed-off-by: Jesse Suen <[email protected]> --------- Signed-off-by: Jesse Suen <[email protected]>
zachaller
pushed a commit
that referenced
this pull request
Oct 25, 2023
* fix: prevent hot loop when fully promoted rollout is aborted Signed-off-by: Jesse Suen <[email protected]> * test: change expectations of abort tests Signed-off-by: Jesse Suen <[email protected]> --------- Signed-off-by: Jesse Suen <[email protected]> Signed-off-by: zachaller <[email protected]>
zachaller
pushed a commit
that referenced
this pull request
Oct 25, 2023
* fix: prevent hot loop when fully promoted rollout is aborted Signed-off-by: Jesse Suen <[email protected]> * test: change expectations of abort tests Signed-off-by: Jesse Suen <[email protected]> --------- Signed-off-by: Jesse Suen <[email protected]> Signed-off-by: zachaller <[email protected]>
zachaller
added
the
cherry-pick-completed
Used once we have cherry picked the PR to all requested releases
label
Oct 25, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
cherry-pick/release-1.4
cherry-pick/release-1.5
cherry-pick/release-1.6
cherry-pick-completed
Used once we have cherry picked the PR to all requested releases
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Resolves #2982
It was possible that if someone ran
kubectl argo rollouts abort
against a rollout that was fully promoted, it could get the controller into a reconciliation hot loop where it kept adding and removing scale-down-deadline on a replicaset.This fix will detect if we are both aborted but also fully promoted, and will remove the abort condition. If we are in a fully promoted state, then I do not think it makes sense for a rollout to ever be aborted.
When testing, I reproduced the hot loop, then ran my version of the controller and it prevented the loop.
This PR also improves a bunch of tests to use
assert.JSONEq
instead ofassert.Equal
, which will produce much better diffs upon errors. e.g.:Checklist:
"fix(controller): Updates such and such. Fixes #1234"
.