fix(deploy): bump aws-cdk-lib to ^2.258.0 to unblock e2e workspace resolution#1469
Merged
Conversation
…solution PRs #1465 and #1468 fixed the bundled CLI's readers (toolkit-lib + cdk-assets-lib) to handle schema 54. Customer deploys via the global CLI install work correctly. However, the e2e test `byo-custom-jwt.test.ts` uses `runLocalCLI`, which spawns `node dist/cli/index.mjs` from the workspace root. From there, Node's module resolution sees the workspace's own `aws-cdk-lib: ^2.248.0` (resolved to 2.257.0) which has a peer-dep `cloud-assembly-schema: ^53.25.0`, hoisting schema 53.28.0 at the top level. `@aws-cdk/cloud-assembly-api` (also hoisted) binds to that top-level schema rather than the nested 54.2.0 copies under toolkit-lib and cdk-assets-lib — so synth still throws AssemblyVersionMismatch in CI. Bumping aws-cdk-lib from ^2.248.0 to ^2.258.0 makes its peer-dep `cloud-assembly-schema: ^54.0.0`, allowing schema 54.2.0 to hoist top-level and cloud-assembly-api to bind to it. Verified: byo-custom-jwt deploy assertion now passes locally against aws-cdk-lib@2.258.0 (writes schema 54). End-user CLI behavior is unchanged (global install resolution was already correct after #1465/#1468).
Contributor
|
Claude Security Review: no high-confidence findings. (run) |
Contributor
Package TarballHow to installgh release download pr-1469-tarball --repo aws/agentcore-cli --pattern "*.tgz" --dir /tmp/pr-tarball
npm install -g /tmp/pr-tarball/aws-agentcore-0.17.0.tgz |
agentcore-cli-automation
approved these changes
Jun 5, 2026
agentcore-cli-automation
left a comment
There was a problem hiding this comment.
Looks good to merge.
Verified the analysis in the description:
aws-cdk-lib@2.258.0indeed pins@aws-cdk/cloud-assembly-schema: ^54.0.0(visible in the regenerated shrinkwrap), so top-level schema hoists at 54.x andcloud-assembly-apibinds to it. The workspace-resolution trap is closed.- No source uses of
aws-cdk-libin CLI runtime code (only a comment inbase-translator.ts), so the version bump is purely for transitive schema alignment — zero behavioral risk. - The vended
src/assets/cdk/package.jsonkeeps^2.248.0, which is still satisfied by 2.258+ at user install time. No need to touch it. - The L3 constructs peer (
aws-cdk-lib: ^2.248.0) remains compatible with^2.258.0. npm-shrinkwrap.jsonis infiles, so global CLI installs stay deterministic and end-user resolution is unaffected — consistent with the description's claim that this isn't a customer-facing fix.
The peer-dependency tightening from ^2.248.0 → ^2.258.0 is the only thing worth noting for any programmatic consumers of @aws/agentcore, but given the package is still 0.x and primarily a CLI bin, that's acceptable.
Contributor
Coverage Report
|
notgitika
approved these changes
Jun 5, 2026
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
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.
Description
PRs #1465 and #1468 fixed the bundled CLI's readers (
@aws-cdk/toolkit-liband@aws-cdk/cdk-assets-lib) to handle cloud-assembly schema 54. End-user deploys via the global CLI install work correctly — that path resolves cleanly because the global install'snode_moduleshas no parallelaws-cdk-libto fight over schema hoisting.However, the e2e test
byo-custom-jwt.test.tscontinued to fail in CI onmain 6/6with the schema-53 error. Investigation showed this is a workspace-resolution trap, not a customer-facing bug:byo-custom-jwt.test.tsusesrunLocalCLI, which spawnsnode dist/cli/index.mjsfrom the workspace root. Node's module resolution starts there. The workspace pulls inaws-cdk-lib@2.257.0(CLI's own dep, used bysrc/assets/cdk/template typechecks and the agent-import translator), whose peercloud-assembly-schema: ^53.25.0hoists the schema package at 53.28.0 top-level.@aws-cdk/cloud-assembly-api— also hoisted, with peer>=53.28.0— then binds to that top-level 53-era schema, even thoughtoolkit-libandcdk-assets-libhave nested 54.2.0 copies that satisfy their own peers. Synth still throwsAssemblyVersionMismatch.This PR bumps the CLI's own
aws-cdk-libfrom^2.248.0to^2.258.0.aws-cdk-lib@2.258.0's peer becomescloud-assembly-schema: ^54.0.0, so npm hoists54.2.0at the top level.cloud-assembly-apithen binds to the right schema. Resolution chain healed.Verification
After applying the bump locally:
Re-ran
e2e-tests/byo-custom-jwt.test.tsagainst the patched CLI withCDK_TARBALLset (mimicking themainmatrix leg), real AWS credentials, real synth + asset publish + CFN deploy:Where it previously threw
Cloud assembly schema version mismatch: Maximum schema version supported is 53.x.x, but found 54.0.0.Changes
package.json:aws-cdk-lib^2.248.0 → ^2.258.0(in bothdependenciesandpeerDependencies).npm-shrinkwrap.json: regenerated.aws-cdk-lib 2.257.0 → 2.258.0; top-levelcloud-assembly-schema 53.28.0 → 54.2.0.No source changes.
Type of Change
Why this isn't a customer issue (and why it should still ship)
agentcoreCLI binary go through~/.../@aws/agentcore/node_modules/, not the workspace. That tree has no parallelaws-cdk-liband resolves schema 54.2.0 cleanly. Customer deploys already work after fix(deploy): bump @aws-cdk/toolkit-lib to read cloud-assembly schema 54 #1465/fix(deploy): bump @aws-cdk/cdk-assets-lib to read schema 54 asset manifests #1468.@aws/agentcorealongside an oldaws-cdk-libcould hit the same hoisting trap (depending on npm version's deduplication heuristics). Pinning the CLI's ownaws-cdk-libpeer to^2.258.0keeps the workspace resolution clean, makes CI green, and prevents this recurring at the next schema bump.Testing
npm run typecheck(passes)npm run lint(no new errors)npm run test:unite2e-tests/byo-custom-jwt.test.ts > deploys with CUSTOM_JWT authorizerpasses against real AWSChecklist