-
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
fix(cli): --exclusively
leads to 0 stacks being selected
#21663
Conversation
The new concurrency logic introduced in #20345 was checking for all dependencies to a stack to have been deployed previously for the stack to be unblocked, but if not all stacks are selected, they will never become unblocked. Because there was no check on being "complete" at the end, this silently leads to no stacks being deployed and the CLI no-opping. Fix by only waiting for selected stacks among the dependencies, and adding a safeguard at the end to make sure we deployed all stacks successfully (or failed halfway through).
packages/aws-cdk/lib/deploy.ts
Outdated
// We shouldn't be able to get here, but check it anyway | ||
const neverUnblocked = Object.entries(deploymentStates).filter(([_, s]) => s === 'pending').map(([n, _]) => n); | ||
if (neverUnblocked.length > 0) { | ||
throw new Error(`The following stacks never became unblocked: ${neverUnblocked.join(', ')}`); |
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.
Should we add the Cut us a ticket
prompt too?
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.
Definitely want some tests here.
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
The new concurrency logic introduced in #20345 was checking for all
dependencies to a stack to have been deployed previously for the stack
to be unblocked, but if not all stacks are selected, they will never
become unblocked.
Because there was no check on being "complete" at the end, this silently
leads to no stacks being deployed and the CLI no-opping.
Fix by only waiting for selected stacks among the dependencies, and
adding a safeguard at the end to make sure we deployed all stacks
successfully (or failed halfway through).
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license