Skip to content
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

Conversation

yohanb
Copy link
Contributor

@yohanb yohanb commented Mar 1, 2024

Fixes #3414

Checklist:

  • Either (a) I've created an enhancement proposal and discussed it with the community, (b) this is a bug fix, or (c) this is a chore.
  • The title of the PR is (a) conventional with a list of types and scopes found here, (b) states what changed, and (c) suffixes the related issues number. E.g. "fix(controller): Updates such and such. Fixes #1234".
  • I've signed my commits with DCO
  • I have written unit and/or e2e tests for my change. PRs without these are unlikely to be merged.
  • My builds are green. Try syncing with master if they are not.
  • My organization is added to USERS.md.

@yohanb yohanb force-pushed the fix_progress_deadline_exceeded_with_scale_down_delay branch from c248418 to 6c2f787 Compare March 1, 2024 18:44
@yohanb yohanb changed the title fix(canary): don't timeout rollout when still waiting for scale down delay. Fixes #3414 fix(canary): don't timeout rollout when still waiting for scale down delay Mar 1, 2024
@yohanb
Copy link
Contributor Author

yohanb commented Mar 1, 2024

Fixes #3414

@yohanb yohanb changed the title fix(canary): don't timeout rollout when still waiting for scale down delay fix(controller): don't timeout rollout when still waiting for scale down delay Mar 1, 2024
@yohanb yohanb force-pushed the fix_progress_deadline_exceeded_with_scale_down_delay branch from 6c2f787 to 45b07a9 Compare March 1, 2024 18:47
Copy link

codecov bot commented Mar 1, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 82.90%. Comparing base (8405f2e) to head (6460c18).
Report is 31 commits behind head on master.

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.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

github-actions bot commented Mar 1, 2024

Go Published Test Results

2 130 tests   2 130 ✅  2m 50s ⏱️
  118 suites      0 💤
    1 files        0 ❌

Results for commit 6460c18.

♻️ This comment has been updated with latest results.

Copy link
Contributor

github-actions bot commented Mar 1, 2024

E2E Tests Published Test Results

  4 files    4 suites   3h 43m 58s ⏱️
108 tests  98 ✅  6 💤  4 ❌
448 runs  408 ✅ 24 💤 16 ❌

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 <ybelval@turo.com>
@yohanb yohanb force-pushed the fix_progress_deadline_exceeded_with_scale_down_delay branch from 45b07a9 to 9bf3b55 Compare March 1, 2024 20:33
@@ -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 {
Copy link
Collaborator

@zachaller zachaller Mar 1, 2024

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

Copy link
Contributor Author

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

Copy link
Collaborator

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.

Copy link
Collaborator

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

Copy link
Contributor Author

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.

@zachaller zachaller added this to the v1.7 milestone Mar 4, 2024
@yohanb yohanb requested a review from zachaller March 5, 2024 17:01
Copy link

sonarcloud bot commented Mar 5, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@zachaller zachaller merged commit e184957 into argoproj:master Mar 6, 2024
23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Rollout in degraded state when progressDeadlineSeconds < scaleDownDelaySeconds
2 participants