Skip to content
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

Raise DependencyNotYetSatisfied instead of KeyError when secret is not yet populated #8220

Merged
merged 5 commits into from May 3, 2023

Conversation

dfangl
Copy link
Member

@dfangl dfangl commented Apr 28, 2023

Motivation

Currently, we just raise a KeyError when a key is not present in the secret we had a Ref to. However, it is possible that this key will be filled by another resource, for example a SecretTargetAttachement in the future, which was prevented by the immediate error.

Also, the Execution Status used for the short circuit condition is not actually available in the return value of the API call: https://docs.aws.amazon.com/AWSCloudFormation/latest/APIReference/API_DescribeChangeSet.html

Changes

  • Raise DependencyNotYetSatisfied instead of KeyError when secret is not yet populated, to be able to wait for another resource to populate it correctly. If this is never the case, the stack will still fail, but it will not fail immediately anymore on the first try.
  • Raise a ShortCircuitWaitException when execution status is "EXECUTE_FAILED" instead of "ROLLBACK_COMPLETE".

@github-actions
Copy link

github-actions bot commented Apr 28, 2023

LocalStack Community integration with Pro

1 954 tests   1 718 ✔️  1h 14m 37s ⏱️
       2 suites     236 💤
       2 files           0

Results for commit b0468ff.

♻️ This comment has been updated with latest results.

Copy link
Member

@dominikschubert dominikschubert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Good catch 👍

@dfangl dfangl merged commit fd9a553 into master May 3, 2023
22 checks passed
@dfangl dfangl deleted the hackathon-cfn branch May 3, 2023 14:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants