-
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
(cli): cdk deploy specific-stack
should not synthesize all stacks
#26421
Comments
cdk deploy specific-stack
should not synthesize all stackscdk deploy specific-stack
should not synthesize all stacks
Hi @Dzhuneyt , thanks for reaching out.
let me know if this doesn't help. |
This issue has not received a response in a while. If you want to keep this issue open, please leave a comment below and auto-close will be canceled. |
@khushail that's actually a different scenario. What you are describing is: The issue I describe is: Any chance this issue can be reopened? I missed the time window before GH bot closed it. |
|
Describe the bug
When synthesizing or deploying a single stack, CDK synthesizes ALL stacks that are part of the app, regardless of any
.addDependency()
clauses.Expected Behavior
I would expect CDK to synthesize only the stack that was requested as well as its direct dependencies.
Current Behavior
CDK synthesizes the whole app, causing a tremendous overhead and bad developer experience.
A typical setup of splitting the stacks by lifecycle:
e.g. Layer 1 - DB stacks, VPC/Networking stacks, Storage stacks
Layer 2 - Compute
Layer 3 - Domains and Certificates and CloudFront related
When working on Layer 2 stuff on a daily basis, one is forced to "wait" for the Layer 1 stacks to be synthesized all the time, considering that they rarely change and I've never requested to deploy them (e.g. I'm only deploying some specific stack from Layer 2).
Reproduction Steps
Create a DB stack
Create an API Gateway stack
Create a stack to hold a bunch of Lambdas
Don't touch the DB or API Gateway stacks
Work on the Lambdas on a daily basis (a typical setup for a lot of companies)
Synthesize and deploy the Lambda stacks
You get a bunch of latency in the whole list of stacks being synthesized
Possible Solution
Propagate the provided stack name to the framework, so CDK can skip the synthesis of skipped stacks
Additional Information/Context
No response
CDK CLI Version
2.43.1 (build c1ebb85)
Framework Version
No response
Node.js Version
18
OS
MacOS
Language
Typescript
Language Version
No response
Other information
No response
The text was updated successfully, but these errors were encountered: