Skip to content

(cdk-pipelines): newStyleStackSynthesis confusion #18572

@adambro

Description

@adambro

link to reference doc page

https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.pipelines-readme.html

Describe your issue?

I've stumbled upon this on CDK Pipelines API doc (from module README), where it the "@aws-cdk/core:newStyleStackSynthesis": true is a requirement. I guess v2 has the new style by default, right?

It is mentioned on this reference page twice. One is the confusing case for v2, the other could be informative for v1 users, but maybe should be in migration guide instead?

When started to look into code I've found that if newStyleStackSynthesis is true then DefaultStackSynthesizer is used (instead of LegacyStackSynthesizer), just like this API doc says:

* @default - `DefaultStackSynthesizer` if the `@aws-cdk/core:newStyleStackSynthesis` feature flag

My project is started on CDK 2.0.0 and is 2.8.0 now, so it should not be necessary any more and using new style by default.

My cdk.json does not have this setting at all, so I'd assume it would be false (meaning legacy synthesizer). This is how I would conclude from the docs and from the feature flags code that I've read. However when I've checked one of my stacks it was using DefaultStackSynthesizer - that is expected behavior, but not what's documented.

Metadata

Metadata

Assignees

No one assigned

    Labels

    @aws-cdk/pipelinesCDK Pipelines librarydocumentationThis is a problem with documentation.effort/smallSmall work item – less than a day of effortfeature-requestA feature should be added or improved.p2

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions