Skip to content

Run Miniflare's tests on the Node.js version workers-sdk tests with - #8189

Merged
bartlomieju merged 2 commits into
mainfrom
biwanczuk/miniflare-test-workers-sdk-node
Nov 3, 2026
Merged

bartlomieju merged 2 commits into
mainfrom
biwanczuk/miniflare-test-workers-sdk-node

Conversation

@bartlomieju

@bartlomieju bartlomieju commented Nov 3, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

The Run Miniflare tests job in the Build & Release workflow has failed on every push to main
since Nov 2 ~04:00 UTC. The browser rendering suite (test/plugins/browser/index.spec.ts) times
out in beforeAll(warmChromeInstall) after 10 minutes.

The job installed Node.js lts/*, which started resolving to Node.js 26.13.0 between the last
passing run (Node 24.22.1) and the first failing one. Both runs used the same workers-sdk commit
(ca55031d).

This PR makes the job use workers-sdk's own install-dependencies action, so Miniflare runs on the
Node.js version workers-sdk tests with (currently 22.23.4).

This problems has been reported in Miniflare in issue cloudflare/workers-sdk#16522 (Oct 27), open and unassigned. PR cloudflare/workers-sdk#16648 (Nov 2, awaiting review) moves Miniflare to @puppeteer/browsers@^3.2.6, which would render this fix not needed.

Root cause

Miniflare installs Chrome with @puppeteer/browsers@2.10.6, which unzips it with
extract-zip@2.0.1 → yauzl@2.10.0 → fd-slicer@1.1.0.

  • At EOF, fd-slicer's ReadStream._read sets this.destroyed = true and then calls push(null),
    possibly with data still buffered.
  • When zlib applies backpressure, pipe() pauses the source. When zlib drains, pipe() calls
    resume().
  • Node.js 26 makes pause()/resume() no-ops on destroyed streams
    (nodejs/node@958373413c, "stream: noop pause/resume on destroyed streams"). The buffered data is
    never delivered, the entry's pipeline() never settles and extract() never resolves.

Reproduced locally:

Setup Node 24 Node 26
@puppeteer/browsers@2.10.6 install of Chrome 126 OK, 18s hangs after all 160 MB are downloaded
extract-zip on a 300 KB deflated entry OK hangs, output cut off at 262,104 bytes
Same, with yauzl overridden to 3.4.0 – OK

workers-sdk's CI runs on Node.js 22 and has no Node.js 26 job, which is why it passes there. The
Node.js 26 incompatibility is a workers-sdk issue to fix separately.

Notes

  • install-dependencies runs pnpm install --frozen-lockfile where this job used to run
    pnpm install.
  • The job already runs workers-sdk's code (pnpm install, the test suite), so using its
    composite action adds no new trust.
  • The job can't be exercised before merge: the workflow runs on pushes to main and on
    workflow_dispatch, which also publishes.

The release workflow's Miniflare job installed `lts/*`, which now
resolves to Node.js 26. Under Node.js 26 the browser rendering tests
hang in their `beforeAll` until the 10 minute hook timeout, failing the
job on every push to main since Nov 2.

Miniflare installs Chrome with @puppeteer/browsers 2.x, which unzips it
with extract-zip and yauzl 2.10, whose fd-slicer read stream sets
`destroyed = true` at EOF while it may still have data buffered. Node.js
26 makes resume() a no-op on destroyed streams (nodejs/node@958373413c),
so once zlib applies backpressure the entry never finishes and the
extraction never resolves.

workers-sdk itself tests on Node.js 22 and does not run on Node.js 26
yet, so use its install-dependencies action, which keeps this job on
the version workers-sdk tests with.
@bartlomieju
bartlomieju requested review from a team as code owners November 3, 2026 16:46

@clanky-the-clanker clanky-the-clanker Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Superseded by the review of e57b9657.

This review, of ed0abbac

✅ Approved — A small CI-only change that hands Node.js and dependency setup to workers-sdk's own setup action. No issues found.

The decision is advisory: this review is a comment and never approves, blocks or requests changes on the pull request.


✅ All checks passed

📋 Code Quality: ✅ LGTM

The miniflare-test job now uses workers-sdk's install-dependencies composite action, which resolves correctly because workers-sdk is checked out at the workspace root. The build and test steps after it are unchanged and still have pnpm and Node.js available.


📝 Documentation: ✅ LGTM

The new workflow comment says what the job does now and follows the repository's comment guidelines.


Reviewed commit: ed0abbac

@clanky-the-clanker clanky-the-clanker Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

✅ Approved — A small CI-only change that hands Node.js and dependency setup to workers-sdk's own setup action. No issues found.

The decision is advisory: this review is a comment and never approves, blocks or requests changes on the pull request.


✅ All checks passed

📋 Code Quality: ✅ LGTM

The miniflare-test job now uses workers-sdk's install-dependencies composite action, which resolves correctly because workers-sdk is checked out at the workspace root. The build and test steps after it are unchanged and still have pnpm and Node.js available.


📝 Documentation: ✅ LGTM

The new workflow comment says what the job does now and follows the repository's comment guidelines.


Reviewed commit: e57b9657 — same changes as ed0abbac, so this is that commit's review (no new review was run; line numbers are as of ed0abbac)

@bartlomieju
bartlomieju merged commit 50d8b30 into main Nov 3, 2026
23 checks passed
@bartlomieju
bartlomieju deleted the biwanczuk/miniflare-test-workers-sdk-node branch November 3, 2026 18:26
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.

3 participants