-
Notifications
You must be signed in to change notification settings - Fork 39
fix(cdk-assets): fails installation when new dependencies are released #603
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
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Relates to #597 |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #603 +/- ##
=======================================
Coverage 79.01% 79.01%
=======================================
Files 46 46
Lines 7085 7085
Branches 791 791
=======================================
Hits 5598 5598
Misses 1468 1468
Partials 19 19
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
c5ebd30
to
ab2764e
Compare
ab2764e
to
ba8482e
Compare
ba8482e
to
05e1785
Compare
Signed-off-by: github-actions <[email protected]>
mrgrain
approved these changes
Jun 24, 2025
github-merge-queue bot
pushed a commit
that referenced
this pull request
Jun 27, 2025
…a program (#661) Ever since #603, the file references an external package that is not installed during installation of `cdk-assets`. This causes: ```console Error: Cannot find module '@aws-cdk/cdk-assets-lib' Require stack: - /usr/local/lib/node_modules/cdk-assets/bin/docker-credential-cdk-assets.js - /usr/local/lib/node_modules/cdk-assets/bin/docker-credential-cdk-assets at Module._resolveFilename (node:internal/modules/cjs/loader:1140:15) at Module._load (node:internal/modules/cjs/loader:981:27) at Module.require (node:internal/modules/cjs/loader:1231:19) at require (node:internal/modules/helpers:177:18) at Object.<anonymous> (/usr/local/lib/node_modules/cdk-assets/bin/docker-credential-cdk-assets.js:16:26) at Module._compile (node:internal/modules/cjs/loader:1364:14) at Module._extensions..js (node:internal/modules/cjs/loader:1422:10) at Module.load (node:internal/modules/cjs/loader:1203:32) at Module._load (node:internal/modules/cjs/loader:1019:12) at Module.require (node:internal/modules/cjs/loader:1231:19) { code: 'MODULE_NOT_FOUND', requireStack: [ '/usr/local/lib/node_modules/cdk-assets/bin/docker-credential-cdk-assets.js', '/usr/local/lib/node_modules/cdk-assets/bin/docker-credential-cdk-assets' ] } ``` To fix, lets bundle this script as well (in addition to the standard `cdk-assets` entrypoint). --- By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license --------- Signed-off-by: github-actions <[email protected]> Co-authored-by: github-actions <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Because
cdk-assets
CLI depends on floating versions of dependencies, it may break when new 3rd party dependencies are released, or when it is installed just around the time a new version of AWS SDKv3 gets released (because that has hundreds of packages that all refer to each other by specific version, but they're subject to publishing/replication latency so they don't all become instantaneously available).We used to generate a shrinkwrap file for the
cdk-assets
CLI but apparently that didn't work because we're still getting reports of breakage.Instead, we'll resort to bundling the dependencies of
cdk-assets
into the CLI itself, so it cannot go wrong.Because the
cdk-assets
package does double duty as a CLI package as well as a library package, we can't just naively stick theBundleCli
job onto the package: doing that would remove all the bundled dependencies from thepackage.json
list, which breaks its function as a library.Instead, we're splitting the
cdk-assets
package in two:cdk-assets
: will continue to contains the CLI, which will be bundled@aws-cdk/cdk-assets-lib
: the core portion of the assets publishing, available as a library.Because
cdk-assets
can no longer be used as a library, we have bumped the major version to4
to indicate this change in API surface. In CDK pipelines we installcdk-assets@latest
, so it will automatically pick up major version 4 once released.(While this PR is strictly speaking a breaking change, I'm not adding any "breaking change" markers into the PR description, because this is changing many files across multiple packages, and I don't trust the automatic major version bumping script to not accidentally MV bump something I didn't intend to)
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license