Skip to content

chore(examples/cdk): Unpin CDK CLI in devDependencies of CDK examples #615

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

Merged
merged 1 commit into from
Mar 8, 2022

Conversation

SH4DY
Copy link
Contributor

@SH4DY SH4DY commented Mar 3, 2022

Description of your changes

With aws-cdk as a devDependency and instructing users to run npm run cdk deploy -all it can happen that aws-cdk-lib stops being compatible. In other words: Pinning the CDK CLI version can lead to issues with the runtime dependency on the CDK library.

I ran into this today with "aws-cdk": "^2.0.0" and "aws-cdk-lib": "2.14.0". Receiving the following error on npm run cdk deploy -all:

This CDK CLI is not compatible with the CDK library used by your application. Please upgrade the CLI to the latest version. (Cloud assembly schema version mismatch: Maximum schema version supported is 15.0.0, but found 16.0.0)

I believe unpinning (^) the CLI for example projects is reasonable and prevents interested users from running into versioning issues on their first contact with the project.

How to verify this change

'npm run cdk deploy -all' successful

Related issues, RFCs

PR status

Is this ready for review?: YES
Is it a breaking change?: NO

Checklist

  • My changes meet the tenets criteria
  • I have performed a self-review of my own code
  • I have commented my code where necessary, particularly in areas that should be flagged with a TODO, or hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have made corresponding changes to the examples
  • My changes generate no new warnings
  • The code coverage hasn't decreased
  • I have added tests that prove my change is effective and works
  • [ x] New and existing unit tests pass locally and in Github Actions
  • Any dependent changes have been merged and published in downstream module
  • The PR title follows the conventional commit semantics

Breaking change checklist

  • I have documented the migration process
  • I have added, implemented necessary warnings (if it can live side by side)

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@dreamorosi dreamorosi added the dependencies Changes that touch dependencies, e.g. Dependabot, etc. label Mar 3, 2022
@dreamorosi dreamorosi added this to the production-ready-release milestone Mar 3, 2022
@dreamorosi
Copy link
Contributor

Hi @SH4DY thanks for opening the PR.

The change you're proposing makes sense, thanks for spotting it.

I like that you explained your thought process in the PR body; ideally next time we would appreciate if you could open an issue first and discuss the changes there before moving forward with a PR as described in the Contributing guidelines of the project.

@dreamorosi dreamorosi requested review from ijemmy and dreamorosi March 3, 2022 15:36
@dreamorosi dreamorosi requested a review from flochaz March 7, 2022 09:09
@dreamorosi dreamorosi merged commit 55ab5e9 into aws-powertools:main Mar 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Changes that touch dependencies, e.g. Dependabot, etc.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants