Repository navigation
bug fix: paused deployments failing progress deadline - #27804
Conversation
869f0c8 to
908aa8e
Compare
Ensure UpdatedAt is set in DeploymentStatusUpdate Reset RequireProgressBy during update Test that paused deployment skips progress check
908aa8e to
a85997a
Compare
a85997a to
9a76cd5
Compare
9a76cd5 to
6bd001a
Compare
6f09fd4 to
5f52a67
Compare
gulducat
left a comment
There was a problem hiding this comment.
LGTM! I have only one nit to pick.
| fail = false | ||
| if d.Status == structs.DeploymentStatusPaused { | ||
| return fail, false, nil | ||
| } |
There was a problem hiding this comment.
not your addition, and this is a super nit, but: it feels a bit odd to return fail immediately after its assignment to false. I more expect its assignment before a situation where it might change.
we don't even really need it at all, since it's a named return whose default zero value is false, but if we want to keep it, then I vote:
| fail = false | |
| if d.Status == structs.DeploymentStatusPaused { | |
| return fail, false, nil | |
| } | |
| // never time out a paused deployment | |
| if d.Status == structs.DeploymentStatusPaused { | |
| return false, false, nil | |
| } | |
| fail = false |
There was a problem hiding this comment.
Works for me! Swapped it to false.
But now you have me wondering if maybe it was reset to false here just to make sure the value was zero'd out before the stanza below where it could be set to true. Which really shouldn't be an issue but things get weird in this long running loops so 🤷
There was a problem hiding this comment.
your patch isn't quite the same as my suggestion, but it was a nit anyway 🙃
|
I'm going to lock this pull request because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active contributions. |
Bug:
Support informed us of customers running into counterintuitive behavior where deployments were failing their progress deadline while paused.
Fix:
The changes below are intended make sure deployments don't fail as soon as they're un-paused
runninginstead of both)Testing & Reproduction steps
- that a paused deployment past its progress deadline will not fail
- that the deployment's progress deadline == UpdatedAt + ProgressDeadline
Links
ref: https://hashicorp.atlassian.net/browse/NMD-1080?atlOrigin=eyJpIjoiMDI5YTFlZjZiMGM2NGQ4MWIwMDU1NjBhZDFjNzFiNjciLCJwIjoiaiJ9
Contributor Checklist
changelog entry using the
make clcommand.ensure regressions will be caught.
and job configuration, please update the Nomad product documentation, which is stored in the
web-unified-docsrepo. Refer to theweb-unified-docscontributor guide for docs guidelines.Please also consider whether the change requires notes within the upgrade
guide. If you would like help with the docs, tag the
nomad-docsteam in this PR.Reviewer Checklist
backporting document.
in the majority of situations. The main exceptions are long-lived feature branches or merges where
history should be preserved.
within the public repository.
Changes to Security Controls
Are there any changes to security controls (access controls, encryption, logging) in this pull request? If so, explain.