Repository navigation
ref: remove enabling --wait when --atomic is specified; fix rollback issues - #5395
bacongobbler wants to merge 3 commits into
Conversation
Signed-off-by: Matthew Fisher <[email protected]>
Signed-off-by: Matthew Fisher <[email protected]>
Signed-off-by: Matthew Fisher <[email protected]>
|
So for some context here, the |
| timeout: u.timeout, | ||
| wait: u.wait, | ||
| description: "", | ||
| revision: releaseHistory.Releases[0].Version, |
There was a problem hiding this comment.
This needs to be here to roll back to the previous version, correct? I thought that from the code perspective, you need to set a version and that it doesn't automatically roll back, but I could totally be misremembering
There was a problem hiding this comment.
If I recall, by omitting the revision number, the last version number will be selected. I'll have to double-check this as I thought it'd fetch the latest deployed release rather than current release - 1
Basically I was trying to protect us from the following scenario:
1 -> DEPLOYED
2 -> FAILED
If we call helm upgrade --atomic in this case and it fails a second time, the assumption here is that it may roll back to version 2. I'm pretty sure we want to roll back to version 1 in this case.
There was a problem hiding this comment.
Yeah, as long as it fetches the last deployed release, I think it should be good
| force: u.force, | ||
| timeout: u.timeout, | ||
| wait: u.wait, | ||
| description: "", |
There was a problem hiding this comment.
Instead of leaving this unset, should we put in a description that it was rolled back due to the atomic flag?
|
Will this get pulled into 2.14.1? |
|
There's some valid design decisions pointed out by @thomastaylor312 that I need to address before this can be considered for another review. I'm not sure I have the time to work on this PR as I'm focusing on Helm 3. If you would like to work on this @helgi, you're more than welcome to :) |
|
But to answer your question, no, it will not make it into 2.14.1 |
|
@bacongobbler can you rebase this? |
|
FWIW @mattfarina I am working on porting this to Helm 3 (with logic for handling when a previous release is broken). For Helm 2, the only open comment I worry about is this one: #5395 (comment), but things are not broken per se Otherwise the |
I'm not sure if it still makes sense to reply on this closed PR, but after experimenting with Basically, there are 2 different ways how What I want is a way to roll back in case (1) but not case (2) and I would expect |
|
@jdemeyer So that distinction is interesting. I think many people would also want (2) to be atomic because if your deployment fails to run properly (but was running well before), something in your chart that changed likely caused it to fail, so it rolls back to the last successful state. Can you clarify a bit more (with a specific use case) of what kind of behavior related to (2) that you wouldn't want to rollback with on atomic? I want to make sure I fully understand before commenting further |
|
I'm using The main reason that I don't like (2) is because it's slow. Our deployments take a while to start, so helm now takes considerably longer. This is essentially the issue #5377 that motivated this PR. For staging, not rolling back deployments that fail to run also makes it much easier to debug the failed deployment. For production, you're right: better roll back in any case. |
|
So I totally understand it being slow @jdemeyer. Like I said before in this PR though, we need to wait in order to have the signal for atomic to roll things back when things fail. I think the best option in your staging example is to make |
Addresses some design issues with the current
--atomicflag:--waitflag by default. With the current design, there's no way to disable the--waitflag, and there's no technical reason why it was required in the first place. Users can opt in withhelm install/upgrade --atomic --waitif they so choose.helm upgrade --atomicwill always choose the latest revision regardless of the state it was in, and regardless if it was the release we were upgrading from. By removing therevisionfield to therollbackCmd, tiller will roll back to the latest deployed release.closes #5377