-
-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
Add parity tests and refactor logic for CFn stack resource updates #6780
Merged
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
whummer
changed the title
Add parity tests and refactor logic for stack resource updates
Add parity tests and refactor logic for CFn stack resource updates
Aug 30, 2022
dominikschubert
approved these changes
Aug 30, 2022
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.
LGTM 👍
The workaround is fine for me for now. As you've said, this will be changed/removed at a later point anyway.
Parity 🚀 🚀
pinzon
pushed a commit
that referenced
this pull request
Aug 30, 2022
pinzon
pushed a commit
that referenced
this pull request
Aug 30, 2022
pinzon
added a commit
that referenced
this pull request
Aug 30, 2022
* result handler for Kms Key * fix result handler invocation * add parity tests and refactor logic for CFn stack resource updates (#6780) Co-authored-by: Waldemar Hummer <waldemar.hummer@gmail.com>
macnev2013
pushed a commit
to macnev2013/localstack
that referenced
this pull request
Sep 4, 2022
macnev2013
pushed a commit
to macnev2013/localstack
that referenced
this pull request
Sep 4, 2022
* result handler for Kms Key * fix result handler invocation * add parity tests and refactor logic for CFn stack resource updates (localstack#6780) Co-authored-by: Waldemar Hummer <waldemar.hummer@gmail.com>
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.
Add parity tests and add a number of smaller fixes in the logic for CloudFormation stack resource updates. Addresses #6155
The main issue with the sample shared by the user is that SAM deployment was hanging, as the stack/resource status was incorrectly reported as
CREATE_COMPLETE
instead ofUPDATE_COMPLETE
. This led to the discovery of a few more issues, which are now fixed, and covered by parity tests.Summary of changes:
CREATE_COMPLETE
orUPDATE_COMPLETE
, depending on the operation and prior existence of resources within the stacksamlocal
to hang when deploying the sample in samlocal not returning on second and later deploys #6155)Parameter
instances are not being returned from the list of stack resources inDescribeStackResources
stack_name
fromapply_changes(..)
methodtest_cfn_with_multiple_route_tables
and parity test it against AWS - previously we were creating/asserting 3 route tables instead of 4 (validated against AWS)Note: part of the changes in the PR is to avoid us changing the resource action (from
"Modify"
to"Add"
), and instead introducing a"_deployed"
attribute that allows us to determine whether the resource needs to be created or updated - seeTODO
in the code. This is only a workaround for now, and should be fixed as part of a larger refactoring after introducing model classes for the state of the resources in a stack (e.g., using a cached property). To be discussed in more detail @dominikschubert ... 👍