Skip to content

(CLI): The DefaultStackSynthesizer executes change sets for no-op nested stacks #16959

@donkersgoed-postnl

Description

@donkersgoed-postnl

What is the problem?

In an environment with nested stacks, two subsequent deploys without changes between them result in a full (slow) deployment. This has been solved for the LegacyStackSynthesizer (see #6346 and #6046), but the issue is present again with the DefaultStackSynthesizer.

Reproduction Steps

Using the DefaultStackSynthesizer create a stack with nested stacks and run a cdk deploy.

What did you expect to happen?

No deployment and the following (verbose) output:

luc-IntegrationTestDev: checking if we can skip deploy
luc-IntegrationTestDev: skipping deployment (use --force to override)

 ✅  IntegrationTestCdkStack (luc-IntegrationTestDev) (no changes)

What actually happened?

A changeset is created and executed.

CDK CLI Version

1.122.0

Framework Version

No response

Node.js Version

v16.8.0

OS

MacOS 10.15.7 (19H1419)

Language

Python

Language Version

Python (3.8.12)

Other information

When I use the LegacyStackSynthesizer on the same code base, the results are as expected. When I switch to the DefaultStackSynthesizer, I get the results described above.

Metadata

Metadata

Assignees

Labels

bugThis issue is a bug.effort/smallSmall work item – less than a day of effortp1package/toolsRelated to AWS CDK Tools or CLI

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions