-
Notifications
You must be signed in to change notification settings - Fork 867
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: verify the weight of the alb at the end of the rollout #3627
fix: verify the weight of the alb at the end of the rollout #3627
Conversation
…uto set max weight Signed-off-by: Zach Aller <[email protected]>
Go Published Test Results2 163 tests 2 163 ✅ 2m 54s ⏱️ Results for commit 68c6f6f. ♻️ This comment has been updated with latest results. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #3627 +/- ##
=======================================
Coverage 80.26% 80.26%
=======================================
Files 156 156
Lines 17969 17970 +1
=======================================
+ Hits 14423 14424 +1
Misses 2634 2634
Partials 912 912 ☔ View full report in Codecov by Sentry. |
E2E Tests Published Test Results 4 files 4 suites 3h 29m 12s ⏱️ For more details on these failures, see this check. Results for commit 68c6f6f. ♻️ This comment has been updated with latest results. |
Signed-off-by: Zach Aller <[email protected]>
Signed-off-by: Zach Aller <[email protected]>
Signed-off-by: Zach Aller <[email protected]>
Signed-off-by: Zach Aller <[email protected]>
Signed-off-by: Zach Aller <[email protected]>
Signed-off-by: Zach Aller <[email protected]>
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.
Please check my comment.
rollout/trafficrouting.go
Outdated
// At the end of the rollout we need to verify the weight is correct, and return an error if not because we don't want the rest of the | ||
// reconcile process to continue. We don't need to do this if we are in the middle of the rollout because the rest of the reconcile | ||
// process won't scale down the old replicasets yet due to being in the middle of some steps. | ||
if *weightVerified == false && desiredWeight == weightutil.MaxTrafficWeight(c.rollout) && len(c.rollout.Spec.Strategy.Canary.Steps) >= int(*c.rollout.Status.CurrentStepIndex) { |
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.
We already know that *weightVerified
is false
given the if condition above. I think it is safe to remove this condition.
Signed-off-by: Zach Aller <[email protected]>
Quality Gate passedIssues Measures |
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
* fix: verify the weight of the alb at the end of the rollout when we auto set max weight Signed-off-by: Zach Aller <[email protected]> * add unit test Signed-off-by: Zach Aller <[email protected]> * refactor add unit test Signed-off-by: Zach Aller <[email protected]> * Trigger Build Signed-off-by: Zach Aller <[email protected]> * Trigger Build Signed-off-by: Zach Aller <[email protected]> * block reconcile Signed-off-by: Zach Aller <[email protected]> * add tests Signed-off-by: Zach Aller <[email protected]> * rename test and cleanup un-need logic check Signed-off-by: Zach Aller <[email protected]> --------- Signed-off-by: Zach Aller <[email protected]>
* fix: verify the weight of the alb at the end of the rollout when we auto set max weight Signed-off-by: Zach Aller <[email protected]> * add unit test Signed-off-by: Zach Aller <[email protected]> * refactor add unit test Signed-off-by: Zach Aller <[email protected]> * Trigger Build Signed-off-by: Zach Aller <[email protected]> * Trigger Build Signed-off-by: Zach Aller <[email protected]> * block reconcile Signed-off-by: Zach Aller <[email protected]> * add tests Signed-off-by: Zach Aller <[email protected]> * rename test and cleanup un-need logic check Signed-off-by: Zach Aller <[email protected]> --------- Signed-off-by: Zach Aller <[email protected]>
…rgoproj#3627)" This reverts commit d28e75f.
At the end of the rollout when we auto set the weight to the max (100%) etc. we should verify the weight. If we don't this can actually cause issues even with target group verification at the end of the rollout. The reason is the ALB controller can be slow to update for many reasons, which means we can actually verify target groups successfully and start tearing down old pods before we have shifted the weight over to the new service.