Skip to content

feat(docker): upgrade node runtime to 24.22.1 - #293

Open
zahin-mohammad wants to merge 2 commits into
masterfrom
zahinmohammad/wcn-3304-advanced-wallets-node-24
Open

zahin-mohammad wants to merge 2 commits into
masterfrom
zahinmohammad/wcn-3304-advanced-wallets-node-24

Conversation

@zahin-mohammad

@zahin-mohammad zahin-mohammad commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Moves the runtime from Node 22.23.4 to 24.22.1, following the same move in BitGoJS (BitGo/BitGoJS#10023). This is a major-version change, separate from the 22.x security patch in #291.

  • Dockerfile (builder + production) and integration-tests.Dockerfile (builder + runner): node:24.22.1-alpine@sha256:6a1c190e17215d844926b0677f4bf87273ff7d5e54db06d3b5b5863ab0b09a3d. The digest is the index digest from docker pull + docker inspect, the same method the Dockerfile's "To update" comment documents.
  • .nvmrc and the CI node-version pins (pull_request.yaml, build-and-test.yaml): 24.22.1.
  • README prerequisite: 24.22.1 or higher. package.json engines (>=22.12.0) is unchanged: it is an install-compatibility floor, not a runtime selector.

Warning: heap cap added to the integration image

On Node 24 the integration suite was OOM-killed (docker inspect showed OOMKilled=true); on Node 22 it passes. Node 24's default heap limit in the test container is about 2.2 GB, and memory climbs past 2 GB during ts-node compilation. With --max-old-space-size=1536 or 3072 the suite passes. I set NODE_OPTIONS=--max-old-space-size=3072 on the runner stage only. This hides rather than explains the growth, so it needs a decision: keep the cap, or investigate why ts-node allocates more on Node 24. The production image is unaffected.

Verification

Run locally on the final commit (native arm64 Docker builds; amd64 emulation SIGKILLs the suite on this Mac for both Node versions):

  • Production and integration images build, including native addon compilation.
  • node --version is v24.22.1 in both images.
  • Production image boots: "Advanced Wallet Manager started successfully" (TLS off, fake key provider URL, ALLOW_PLAINTEXT_KEY_PROVIDER=true). I did not observe a health endpoint response.
  • npm run test:integration in the runner image: 29 passing, twice in a row.
  • Not run locally: npm test (unit suite) and lint. CI covers those, and CI's amd64 runners are the first test of the exact amd64 digest.

Not covered: a production rollout. Deploy evidence (running node --version, deployed digest, rollback criteria) still belongs to WCN-3713.

Ticket: WCN-3304

🤖 Generated with Claude Code

@linear-code

linear-code Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

WCN-3304

PLAT-2228

zahin-mohammad and others added 2 commits October 21, 2026 16:29
Move the builder, production and integration-tests images, .nvmrc and
the CI node-version pins from 22.23.4 to 24.22.1 with the re-resolved
node:24.22.1-alpine digest, matching the Node 24 move in BitGoJS.

Node 24 sizes its default heap at about 2.2 GB in the test container and
ts-node compilation exhausts it, so the integration runner caps the heap
explicitly with --max-old-space-size=3072.

Ticket: WCN-3304

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Ticket: WCN-3304

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@zahin-mohammad
zahin-mohammad force-pushed the zahinmohammad/wcn-3304-advanced-wallets-node-24 branch from e7e77ad to 035ab5c Compare October 21, 2026 20:30
@zahin-mohammad
zahin-mohammad marked this pull request as ready for review October 21, 2026 21:28
@zahin-mohammad
zahin-mohammad requested review from a team as code owners October 21, 2026 21:28

@danielpeng1 danielpeng1 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider these two:

  1. these workflows: release-to-ghcr.yaml:33,69 and audit-api-spec.yaml:21,74 still use Node '22'. Read the version from .nvmrc so they match the image and CI:

    node-version-file: .nvmrc
  2. integration-tests.Dockerfile:27: use 4096 to match CI (build-and-test.yaml:181):

    NODE_OPTIONS=--max-old-space-size=4096 \

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants