fix(e2e-sandbox): restore cloud-assembly-schema <=53 compatibility after aws-cdk-lib bump#752
Merged
Merged
Conversation
…a <=53 compat aws-cdk-lib >=2.258.0 ships @aws-cdk/cloud-assembly-schema v54, but the Amplify sandbox deployer bundled with @aws-amplify/backend-cli supports cloud-assembly-schema up to 53.x.x only. Floating ^2.246.0 to 2.260.0 made `ampx sandbox` synth emit a v54 manifest the deployer could not read, breaking the e2e-sandbox deploy on main. Pin aws-cdk-lib to 2.257.0 (highest patched >=2.246.0 version still emitting schema <=53) across the private e2e-tests workspaces. Verified via standalone CDK synth: 2.257.0 emits cdk.out *.assets.json version 53.0.0; 2.260.0 emits 54.0.0. Also close the remaining open Dependabot alerts via root resolutions: - js-yaml -> ^4.2.0 (GHSA-h67p-54hq-rp68; removes straggler 3.14.2) - webpack-dev-server -> ^5.2.5 (GHSA-mx8g-39q3-5c79) - http-proxy-middleware -> ^2.0.10 (GHSA-64mm-vxmg-q3vj) aws-cdk-lib stays >=2.246.0 so GHSA-999r-qq7v-r334 remains fixed; all prior Dependabot fixes intact.
🦋 Changeset detectedLatest commit: 8f5d822 The changes in this PR will be included in the next version bump. This PR includes changesets to release 0 packagesWhen changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
osama-rizk
approved these changes
Jun 24, 2026
osama-rizk
approved these changes
Jun 24, 2026
bobbor
approved these changes
Jun 24, 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.
Problem
After #749 bumped
aws-cdk-libto^2.246.0(remediating GHSA-999r-qq7v-r334), the post-merge Sandbox E2E Tests job onmainbegan failing during synth→deploy with a cloud-assembly schema mismatch:The caret range
^2.246.0floats toaws-cdk-lib@2.260.0, which depends on@aws-cdk/cloud-assembly-schema@^54.0.0and therefore emits schema 54.0.0 into*.assets.json. The deployer that reads that manifest —@aws-amplify/backend-cli@1.8.3(the currentlatest) via@aws-amplify/backend-deployer— only supports cloud-assembly-schema ≤ 53.x.x. The result is a hard failure whenampx sandboxreads the synthesized manifest.Only the sandbox workspace is affected because it is the only e2e workspace that performs a real
ampx sandboxsynth→deploy that reads the asset manifest. Thenode/vite/webpack/exports-testworkspaces consume a pre-deployedamplify_outputs.jsonand never synth, so they did not surface the mismatch. Thepr.ymlchecks run no e2e synth job, so the regression only appeared post-merge inpush-main-release.yml.Issue number, if available: N/A (post-merge regression introduced by #749)
Changes
Root cause — the schema 53→54 boundary. Querying the npm registry for the
@aws-cdk/cloud-assembly-schemadependency of eachaws-cdk-librelease establishes the exact boundary:@aws-cdk/cloud-assembly-schema*.assets.jsonversion^53.x.x^54.0.0So
2.258.0is the firstaws-cdk-libversion that emits schema 54, and2.257.0is the highest version that is both patched (≥ 2.246.0, so GHSA-999r-qq7v-r334 stays fixed) and still emits schema 53 (deployer-compatible).Option B is impossible. Bumping the deployer to support schema 54 is not an option:
@aws-amplify/backend-cli@1.8.3is already thelatestpublished version, and no newer release supports schema 54.Fix — Option A (minimal, scoped): pin all five e2e workspaces to the exact version
aws-cdk-lib@2.257.0(exact, no caret). The exact pin is required because the sandbox workspace'sclean/install:no-lockscripts delete the lockfile and run a freshyarn install, so a caret range would re-float to 2.260.0.Files changed:
packages/e2e-tests/{sandbox,node,vite,webpack,exports-test}/package.json—aws-cdk-lib:^2.246.0→2.257.0yarn.lock— regenerated:aws-cdk-lib@2.260.0→2.257.0,@aws-cdk/cloud-assembly-schema@54.5.0→53.28.0(no^54.xrefs remain)Bonus — three additional open Dependabot alerts closed (moderate; currently open on
main):js-yamlresolutions with a single global"js-yaml": "^4.2.0", which evicts a remainingjs-yaml@3.14.2straggler (pulled transitively viaread-yaml-file). Verified theread-yaml-filesafeLoadpath is not exercised by this monorepo (changeset statusruns clean), so the 3→4 bump is safe.^5.2.4→^5.2.5+ direct dep bump inpackages/e2e-tests/webpack/package.json."http-proxy-middleware": "^2.0.10".A changeset (
.changeset/fix-e2e-sandbox-cloud-assembly-schema.md) is included for thecheck-changesetgate; it is empty (no published-package changes) since this only touches e2e test infra and dev tooling.Corresponding docs PR, if applicable: N/A
Validation
Empirical schema proof. Because a real sandbox deploy requires live AWS
us-west-2credentials, schema compatibility was proven by synthesizing a standalone CDK app with eachaws-cdk-libversion and inspecting theversionfield in the generatedcdk.out/*.assets.json. The emitted schema is a function of theaws-cdk-libversion (its bundled@aws-cdk/cloud-assembly-schema), not of stack contents:*.assets.jsonversionBuild + test suite (local, Node 24 / Yarn 4.13.0):
yarn install --immutable— ✅ exit 0 (lockfile consistent; no^54.xcloud-assembly-schema refs)yarn build— ✅ 4/4 tasksyarn check:api— ✅ 2/2 tasks (no API surface changes)yarn lint— ✅ 3/3 tasksyarn test:scripts— ✅ 4/4yarn e2e-exports— ✅ fresh install withaws-cdk-lib@2.257.0+ rollup build, exit 0yarn changeset status --since origin/main— ✅ exit 0Pre-existing failure (not introduced here): the
integration-testspackage fails locally withTS2304: Cannot find name '__filename'(itstsconfig.jsonsets"types": ["jest"], excluding@types/node). This passes 60/60 in CI and is logically independent of anaws-cdk-libversion pin — it fails identically on a cleanmaincheckout.This PR changes only e2e test-infra dependency pins, dev-tooling resolutions, and the lockfile — there is no runtime or type-level behavior change to the published packages, so no new automated tests are required. The functional change (sandbox synth emitting deployer-compatible schema 53) is validated by the standalone synth proof above and will be exercised end-to-end by the post-merge Sandbox E2E Tests job.
Checklist
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.