-
Notifications
You must be signed in to change notification settings - Fork 313
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
[Resolve #1483] Handle errors in change sets #1486
Merged
alex-harvey-z3q
merged 6 commits into
Sceptre:master
from
alex-harvey-z3q:ah/1483-change-sets
Aug 3, 2024
Merged
[Resolve #1483] Handle errors in change sets #1486
alex-harvey-z3q
merged 6 commits into
Sceptre:master
from
alex-harvey-z3q:ah/1483-change-sets
Aug 3, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This adds code to handle the case of failures in stack groups that have missing or errored stacks when creating, describing and executing change-sets. Before this, any stack group that contained a stack that had been deleted, or had errored out, resulted in all change set operations on that stack group failing. The reason for this is no error or exception handling had ever been added for change sets, but assumed all stacks in the stack group were clean and could respond to the change set APIs. For example, deleting change sets might error out with: ``` % sceptre delete -y network.yaml sceptre-network The Change Set will be delete on the following stacks, if applicable: network "An error occurred (ValidationError) when calling the DeleteChangeSet operation: Stack [test-e2e-direct-connect] does not exist" ``` This is particularly an issue for sites that employ as best practice analysis of change sets for safety prior to launching updates. This patch adds the missing error handling for `delete_change_set`, `create_change_set`, `describe_change_set` and `execute_change_set`.
for more information, see https://pre-commit.ci
Integration test run: https://github.com/Sceptre/sceptre/actions/runs/9833270322/job/27143230127 |
zaro0508
requested changes
Jul 16, 2024
for more information, see https://pre-commit.ci
zaro0508
approved these changes
Aug 2, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This adds code to handle the case of failures in stack groups that have missing or errored stacks when creating, describing and executing change-sets.
Before this, any stack group that contained a stack that had been deleted, or had errored out, resulted in all change set operations on that stack group failing.
The reason for this is no error or exception handling had ever been added for change sets, but assumed all stacks in the stack group were clean and could respond to the change set APIs.
For example, deleting change sets might error out with:
This is particularly an issue for sites that employ as best practice analysis of change sets for safety prior to launching updates.
This patch adds the missing error handling for
delete_change_set
,create_change_set
,describe_change_set
andexecute_change_set
.Testing
I have tested this locally using a stack group with 4 stacks. I deleted one of these stacks. Then:
delete_change_set:
create_change_set:
describe_change_set:
Now I delete that stack/change-set again and rerun:
Create again and then:
_execute_change_set:
Note that I did this testing on the release branch which included
#1480
PR Checklist
[Resolve #issue-number]
.poetry run tox
) are passing.poetry run pre-commit run --all-files
).and description in grammatically correct, complete sentences.
Approver/Reviewer Checklist
Other Information
Guide to writing a good commit