-
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(controller): don't timeout rollout when still waiting for scale down delay #3417
fix(controller): don't timeout rollout when still waiting for scale down delay #3417
Conversation
c248418
to
6c2f787
Compare
Fixes #3414 |
6c2f787
to
45b07a9
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #3417 +/- ##
==========================================
+ Coverage 81.83% 82.90% +1.06%
==========================================
Files 135 135
Lines 20688 16910 -3778
==========================================
- Hits 16931 14020 -2911
+ Misses 2883 2013 -870
- Partials 874 877 +3 ☔ View full report in Codecov by Sentry. |
Go Published Test Results2 130 tests 2 130 ✅ 2m 50s ⏱️ Results for commit 6460c18. ♻️ This comment has been updated with latest results. |
E2E Tests Published Test Results 4 files 4 suites 3h 43m 58s ⏱️ For more details on these failures, see this check. Results for commit 6460c18. ♻️ This comment has been updated with latest results. |
…own delay Signed-off-by: Yohan Belval <[email protected]>
45b07a9
to
9bf3b55
Compare
@@ -578,6 +578,19 @@ func isIndefiniteStep(r *v1alpha1.Rollout) bool { | |||
return false | |||
} | |||
|
|||
// isWaitingForReplicaSetScaleDown returns whether or not the rollout still has other replica sets with a scale down deadline annotation | |||
func isWaitingForReplicaSetScaleDown(r *v1alpha1.Rollout, newRS, stableRS *appsv1.ReplicaSet, allRSs []*appsv1.ReplicaSet) bool { |
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.
During this check, do you know if the r.status.currentPodHash == r.status.stableRS
if so that means that we are finished or are not in the middle of the rollout wondering if it would make sense to add this check?
this would then become isWaitingForReplicaSetScaleDownAndRolloutCompleted however my guess is that the status is probably not updated yet till the very end though and so they are not equal yet, it would be nice to confirm due to https://cloud-native.slack.com/archives/C01U781DW2E/p1709327328941959
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.
I can check if that's the case
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.
I did a bit of checking around deployment behavior and what you are doing here seems logical. Deployments can throw progressDeadline not during a "deployment" on a few cases and so I don't think we would want to add a check that limits adding a progressDeadline if we are not in the middle of a rollout.
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.
This was an interesting thread around k8s deployment behavior, kubernetes/kubernetes#106054
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.
@zachaller thanks for looking at this. Looking forward to v1.7
:)
let me know if I can do anything else.
Quality Gate passedIssues Measures |
Fixes #3414
Checklist:
"fix(controller): Updates such and such. Fixes #1234"
.