-
Notifications
You must be signed in to change notification settings - Fork 4k
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
feat(cli): re-introduce --concurrency
option
#21681
feat(cli): re-introduce --concurrency
option
#21681
Conversation
This reverts commit 2ad2163.
This PR adds #20345's `--concurrency` to `cdk watch` mode. Given that `cdk watch` is a wrapper around `deploy`, this is a simple matter of passing the `concurrency` option along. Fixes #21597 ---- ### All Submissions: * [x] Have you followed the guidelines in our [Contributing guide?](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) ### Adding new Unconventional Dependencies: * [ ] This PR adds new unconventional dependencies following the process described [here](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md/#adding-new-unconventional-dependencies) ### New Features * [ ] Have you added the new feature to an [integration test](https://github.com/aws/aws-cdk/blob/main/INTEGRATION_TESTS.md)? * [ ] Did you use `yarn integ` to deploy the infrastructure and generate the snapshot (i.e. `yarn integ` without `--dry-run`)? *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
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).
…0345-relm/concurrent-deploys2
deploymentStates[stack.id] = 'deploying'; | ||
|
||
await deployStack(stack).catch((err) => { | ||
deploymentStates[stack.id] = 'failed'; |
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.
Minor point: wouldn't it be better to have this assignment inside the catch
block? This way, no matter where an error happens, we're sure that it will set the state to failed
and not block the queue.
@Mergifyio update |
✅ Branch has been successfully updated |
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.
Adding do-not-merge in case you want to address @otaviomacedo's comment
@Mergifyio update |
✅ Branch has been successfully updated |
Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
Re-rolls #20345, after it had to be reverted in #21664.
Includes the fix necessary to make sure that
--exclusively
works (#21663), and includescdk watch --concurrency
as well (#21598).Closes #21663.