fix: add _setupNodeVersion to CDK and E2E test setup functions#3460
Closed
adrianjoshua-strutt wants to merge 1 commit into
Closed
fix: add _setupNodeVersion to CDK and E2E test setup functions#3460adrianjoshua-strutt wants to merge 1 commit into
adrianjoshua-strutt wants to merge 1 commit into
Conversation
…inux The _setupCDKTestsLinux and _setupE2ETestsLinux functions load the .nvm cache from S3 but never call _setupNodeVersion to activate it. This causes the test phases to fall back to the Docker image's system Node (v18.15.0) instead of using the configured AMPLIFY_NODE_VERSION (v24.12.0). This became a Sev2 when lru-cache v11+ was published to npm, which requires Node 20+ (uses diagnostics_channel.tracingChannel()). Since the test phases were running Node 18, all 83 canary alarms fired across all regions. Every other function in shared-scripts.sh (_buildLinux, _runGqlE2ETests, _runCanaryTest, _deploy, etc.) already calls _setupNodeVersion — these two were the only ones missing it. Also removes the 'yarn config set ignore-engines true' workaround in _setupE2ETestsLinux which was masking this same underlying issue.
Member
Author
|
Closing to push directly to upstream instead of from a fork. |
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
Data Canary alarms are failling because the CDK canary test steps run on Node.js v18.15.0 instead of the configured v24.12.0.
Root Cause
_setupCDKTestsLinuxand_setupE2ETestsLinuxinshared-scripts.shload the.nvmcache from S3 vialoadCacheFromBuildJobbut never call_setupNodeVersion $AMPLIFY_NODE_VERSIONto activate NVM. This means the test phases fall back to the Docker image's system Node (v18.15.0).When
lru-cachev11+ was published to npm. This version usesdiagnostics_channel.tracingChannel(), which only exists in Node.js >= 20.5.0. Since the test phases were running Node 18, every canary test crashes with:Every other function in
shared-scripts.shcorrectly calls_setupNodeVersion:Only
_setupCDKTestsLinuxand_setupE2ETestsLinuxwere missing it.Testing
The
build_linuxphase already uses_setupNodeVersionsuccessfully with Node 24.12.0 — this change makes the test phases consistent with it.