chore(node): upgrade to Node 24.15.0 LTS#20557
Draft
dschom wants to merge 30 commits into
Draft
Conversation
8fc1937 to
c14e4a7
Compare
In Node 24, lambdas.shift() empties the queue before the awaited fn() finishes, so isDone() resolved before event.reason.set() was called, causing sinon stubs to see 0 calls in one test and leaked calls in the next.
…tartup Services (fxa-content-server at port 3030, auth-server, etc.) crashed on startup in Node 24 because intel/mozlog calls util.isError which was removed. Add --require to NODE_OPTIONS so all pm2-managed services inherit the polyfill.
…fill pm2 env.NODE_OPTIONS overrides (not merges) the parent env, stripping the --require polyfill set in start-services.sh. Change all pm2 configs to extend process.env.NODE_OPTIONS so the polyfill is inherited by every service process.
- Add --pass-with-no-tests to playwright runner so phone-only files assigned to non-phone parallel nodes don't fail with 'No tests found' - Mark vpnIntegration test as fixme (already done on main in 3127f9c, known flaky on cached-signin click in CI)
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.
Summary
.nvmrc, rootpackage.json#engines, all Dockerfiles, CircleCI executors, and GitHub Actions workflows.pm2-all.shsemver check into a shared_scripts/check-node-version.shwith a prominent failure banner, and wires it intopackage.json#preinstallso the warning fires onyarn install(not just onyarn start).mozilla/fxa-circleci:ci-{builder,test-runner,functional-test-runner}-v8→-v9so the Node-24 images publish to fresh tags and other branches still on Node 22 keep pulling-v8while we migrate.Closes FXA-12766.
Why this change
Node 22 is no longer the active LTS line; Node 24.15.0 is. Per the ticket, the upgrade also unlocks new built-in libraries (e.g.
node:test,node:sqlite, nativefetch) we may pull in as follow-ups to drop npm deps. The Jira ticket flagged a concern that "Nx has problems with v22" — read as Nx package v22 (we're on Nx 21.2.4 today). This PR keeps Nx pinned and only verifies Nx 21.2.4 works on Node 24; any Nx upgrade is a separate ticket.What's in this PR
Version pins
.nvmrc:22.15→24.15.0package.jsonengines.node:^22.15.1→^24.15.0Startup checks (the "people-know-to-switch" piece)
_scripts/check-node-version.sh— shared semver check, runs without semver installed (bare-major fallback) so it works pre-yarn-install. Emits a multi-line banner pointing atnvm install $(cat .nvmrc) && nvm use._scripts/pm2-all.sh— replaces the inline check with a call to the shared script.package.json#preinstall— chains_scripts/check-package-manager.sh && _scripts/check-node-version.shso the warning fires onyarn install.Docker images
_dev/docker/mono/Dockerfile:node:22.15.1-bullseye-slim→node:24.15.0-bookworm-slim(Node 24 dropped Debian 11)_dev/docker/ci/Dockerfile:cimg/node:22.15.1→cimg/node:24.15.0(test-runner +-browsersfunctional-test-runner + the inline comment)_dev/docker/ci-lockfile-generator/Dockerfile:cimg/node:22.15.1→cimg/node:24.15.0CircleCI
cimg/node:22.15.1→24.15.0(executors at config.yml:53, 65 and inline at 1072, 1334)mozilla/fxa-circleci:ci-*-v8→-v9(executors + the build/push commands)GitHub Actions
deploy-storybooks.yml: hardcodednode-version: '22'→node-version-file: '.nvmrc'l10n-gettext-extract.yml: stalenode-version: 18→'24'(this one runs before checkout, so the file form isn't possible)Test plan
nvm install $(cat .nvmrc) && nvm useresolves to Node 24.15.0yarn installsucceeds and the new preinstall check prints✅ Node version is compatiblenvm use 22,yarn installfails fast with the new banner pointing atnvm install $(cat .nvmrc) && nvm useyarn start mzaboots auth/settings/admin under Node 24nx run-many -t test-unit --projects=fxa-auth-server,fxa-settings,fxa-sharedpasses (validates Nx 21.2.4 on Node 24 — the open Jira risk)nx run-many -t lint --allpassesdocker build -f _dev/docker/mono/Dockerfile -t fxa-mono:node24-test .succeeds (validates bullseye → bookworm)docker build -f _dev/docker/ci/Dockerfile --target test-runner .succeeds (validatescimg/node:24.15.0)force-deploy-fxa-ci-imagespipeline parameter somozilla/fxa-circleci:ci-{builder,test-runner,functional-test-runner}-v9get built and pushed without depending on ayarn.lockchangecimg/node:24.15.0and the new-v9imagesdeploy-storybooks,l10n-gettext-extract) succeed on Node 24Out of scope (follow-ups)
🤖 Generated with Claude Code