fix: remove revision==1 gate for scaleDown onsuccess. Fixes #4681#4730
Open
SimbaKingjoe wants to merge 1 commit into
Open
fix: remove revision==1 gate for scaleDown onsuccess. Fixes #4681#4730SimbaKingjoe wants to merge 1 commit into
SimbaKingjoe wants to merge 1 commit into
Conversation
The revision==1 check in promoteStable prevented workloadRef.scaleDown from triggering on any revision beyond the first. This means for BlueGreen + scaleDown: onsuccess, the referenced Deployment was only scaled down on the initial deploy and never again. Remove the revision gate so scaleDown fires on every stable promotion. Fixes argoproj#4681 Signed-off-by: Joe <simba@kingjoe.com> Signed-off-by: daixin1204 <daixin1204@gmail.com>
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #4730 +/- ##
==========================================
+ Coverage 85.03% 85.07% +0.03%
==========================================
Files 164 164
Lines 18989 18989
==========================================
+ Hits 16148 16154 +6
+ Misses 1993 1990 -3
+ Partials 848 845 -3 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Contributor
Published E2E Test Results 4 files 4 suites 3h 46m 30s ⏱️ For more details on these failures, see this check. Results for commit 21efebe. |
Contributor
Published Unit Test Results2 470 tests 2 470 ✅ 3m 22s ⏱️ Results for commit 21efebe. |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.


Summary
Remove the
revision == 1gate frompromoteStable()soworkloadRef.scaleDown: onsuccesstriggers on every stable promotion, not just the initial deploy.Background
When using BlueGreen strategy with
workloadRef.scaleDown: onsuccess, the referenced Deployment should be scaled down every time a new ReplicaSet is promoted to stable. However, the check inpromoteStable()(rollout/sync.go:1040) includedrevision == 1, restricting the scale-down to only the very first deployment.For revision >= 2,
shouldFullPromote()correctly runs PostPromotionAnalysis (if configured), returns "Completed blue-green update", and callspromoteStable(), but the scale-down is silently skipped becauserevision != 1.Modifications
rollout/sync.go: Removerevision == 1 &&from the scaleDown condition inpromoteStable()rollout/sync_test.go: AddTestScaleDownDeploymentOnSuccessRevision2verifying scale-down triggers on revision 2Verification
Checklist:
fix: remove revision==1 gate for scaleDown onsuccess