sceptre
sceptre copied to clipboard
Fix update command with change sets for multiple stacks
Resolves #723
Previously the update command would exit if any change sets status was not equal to READY. However, when a stack does not contain any updates, it will not be READY since there is nothing to execute. This should not prevent other change sets to be executed.
Disclaimer: I'm no longer an active user of Sceptre, but following up on the request in my original bug issue.
PR Checklist
- [x] Wrote a good commit message & description [see guide below].
- [ ] Commit message starts with
[Resolve #issue-number]
. - [x] Added/Updated unit tests.
- [ ] Added/Updated integration tests (if applicable).
- [x] All unit tests (
make test
) are passing. - [x] Used the same coding conventions as the rest of the project.
- [x] The new code passes flake8 (
make lint
) checks. - [x] The PR relates to only one subject with a clear title. and description in grammatically correct, complete sentences.
Approver/Reviewer Checklist
- [ ] Before merge squash related commits.
Other Information
Just tested this on my setup, and it works perfectly.
Before, sceptre 2.3.0, when there's a change in "stack2":
...
[2020-07-08 17:04:24] - test/stack1 - Successfully initiated creation of Change Set 'change-set-19d483a0c12c11ea94bf482ae350eabc'
[2020-07-08 17:04:33] - test/stack2 - Successfully initiated creation of Change Set 'change-set-19d483a0c12c11ea94bf482ae350eabc'
[2020-07-08 17:04:45] - test/stack1 - Successfully deleted Change Set 'change-set-19d483a0c12c11ea94bf482ae350eabc'
[2020-07-08 17:04:45] - test/stack2 - Successfully deleted Change Set 'change-set-19d483a0c12c11ea94bf482ae350eabc'
...
After, this PR, when there's a change in "stack2":
...
[2020-07-08 17:08:54] - test/stack1 - Successfully initiated creation of Change Set 'change-set-bbef316cc12c11eaaf59482ae350eabc'
[2020-07-08 17:09:06] - test/stack2 - Successfully initiated creation of Change Set 'change-set-bbef316cc12c11eaaf59482ae350eabc'
<change set overview with apply y/n prompt>
[2020-07-08 17:10:39] - Skipping ChangeSet on Stack: stack1 - there are no changes
[2020-07-08 17:10:41] - test/stack2 AWS::CloudFormation::Stack UPDATE_IN_PROGRESS User Initiated
...
Second run, this PR, when all changes are applied:
...
[2020-07-08 17:14:57] - test/stack1 - Successfully initiated creation of Change Set 'change-set-9e93a836c12d11ea97c5482ae350eabc'
[2020-07-08 17:15:07] - test/stack2 - Successfully initiated creation of Change Set 'change-set-9e93a836c12d11ea97c5482ae350eabc'
"No changes detected"
[2020-07-08 17:15:08] - test/stack1 - Successfully deleted Change Set 'change-set-9e93a836c12d11ea97c5482ae350eabc'
[2020-07-08 17:15:08] - test/stack2 - Successfully deleted Change Set 'change-set-9e93a836c12d11ea97c5482ae350eabc'
...
Thanks for your contribution, great job!
@henrist 2.4.0 has just been released and there is a fix that handles this case when the changeset is executed (so it should catch all cases (create/update etc). Can you let me know if this still remains an issue for you?
@henrist 2.4.0 has just been released and there is a fix that handles this case when the changeset is executed (so it should catch all cases (create/update etc). Can you let me know if this still remains an issue for you?
I'll have a look during the end of the week!
I think this solution should be merged with #1099. There seems to be some overlap. @zaro0508 Thanks for tagging me in this.
@henrist @jfalkenstein Any update on this? This continues to be an issue in 2.7.1
. Is there anything I can do to help get this merged and into the next release? Without it, change sets are basically unusable if you have any references to other stacks.
@henrist @jfalkenstein Any update on this? This continues to be an issue in
2.7.1
. Is there anything I can do to help get this merged and into the next release? Without it, change sets are basically unusable if you have any references to other stacks.
I haven't had time to look into this further, and since I'm not actively using Sceptre for some time I'm unsure if I'm able to prioritize it in near future. Feel free to take over.
@harkylton if you wanted to fork his branch and open a new PR, addressing the comments I made on this PR, we can close this one and I'd be happy to review/engage with you on it.
@jfalkenstein @henrist Here's the updated PR: #1192
Thanks for the quick responses!
Should we close this in favor of https://github.com/Sceptre/sceptre/pull/1192?
@mreeves1 , I agree. Closing this in favor of #1192 since it's been years since there was activity here.