-
Notifications
You must be signed in to change notification settings - Fork 164
Add in_progress option to stack config.
#678
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
Conversation
phobologic
left a comment
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 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.