aws/aws-cdk

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

alexpulver opened this issue · 2 comments

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

This issue has not received any attention in 1 year. If you want to keep this issue open, please leave a comment below and auto-close will be canceled.