Skip to content

(pipelines): Fail synth if pinned CDK CLI version is older than CDK library version #15519

@alexpulver

Description

@alexpulver

The error message should recommend to bump the CDK CLI version and deploy it, before updating the CDK library version.

Use Case

CDK Pipelines fails to self-mutate when upgrading CDK library version before the pinned CDK CLI version. The reason is that build stage produces cloud assembly using the new CDK library version, but the self-mutate stage still uses the older pinned CDK CLI version.

Proposed Solution

Check at synth time (e.g., using Aspects) whether cdkCliVersion was used. If so, compare the specified CDK CLI version with the CDK library version of the project.

Currently, if CDK CLI and CDK library versions are upgraded at the same time, the workaround is to re-deploy the pipeline manually.

Other

  • 👋 I may be able to implement this feature request
  • ⚠️ This feature might incur a breaking change

This is a 🚀 Feature Request

Metadata

Metadata

Assignees

No one assigned

    Labels

    @aws-cdk/pipelinesCDK Pipelines libraryclosed-for-stalenessThis issue was automatically closed because it hadn't received any attention in a while.effort/mediumMedium work item – several days of effortfeature-requestA feature should be added or improved.p2package/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