Add in_progress option to stack config.#678
Conversation
phobologic
left a comment
There was a problem hiding this comment.
This is awesome. Not sure I love the in_progress config name, but I can't think of a better one and don't want to delay this for some bike shedding :)
|
Some questions:
|
|
|
Probably. I just kept it simple for this version, but in reality it should probably not
I could go either way. I kinda lean towards per-stack just cause that's more flexible, but we could do both (per-stack overrides global default). Re: the naming, I'm also not a huge fan. It's purpose is to configure the desired behavior when a stack is in an "in progress" state, or otherwise not updatable ( Just brainstorming: in_progress: wait
in_progress_behavior: wait
operation_in_progress: wait
not_ready: wait
|
|
I vote for |
|
Cool, I like |
|
Yeah, |
phobologic
left a comment
There was a problem hiding this comment.
Wow, this got crazy simple - it seems like we likely will want some tests though for this new status, even though it's just an extension of the Pending status.
|
|
||
|
|
||
| PENDING = PendingStatus() | ||
| WAITING = PendingStatus(reason="waiting") |
There was a problem hiding this comment.
It might be worth something like waiting on previous update for the reason, just to be more explicit.
|
@ejholmes could we get this PR rebased and merged in? We had people in the chatroom asking for it. |
Add `in_progress` option to stack config.
When stacker attempts to update a stack that's already in
UPDATE_IN_PROGRESS, the existing behavior is to throw an exception:In a CI/CD environment where lots of concurrent changes are happening, this can be problematic.
This PR adds a new per-stack
in_progressoption, which allows you to configure the behavior of stacker when the stack isUPDATE_IN_PROGRESSorCREATE_IN_PROGRESS. The default is the current behavior (error out), but can be set towait, which will cause stacker to wait for the stack to be updateable before proceeding.