Repository navigation
Fail early when createTestHarness() cannot start its proxy under Bun - #15845
dario-piotrowicz wants to merge 1 commit into
Conversation
🦋 Changeset detectedLatest commit: 0d71c0e The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 packages
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 |
|
LGTM |
@cloudflare/autoconfig
@cloudflare/build-output-utils
@cloudflare/codemods
@cloudflare/config
@cloudflare/containers-shared
create-cloudflare
@cloudflare/deploy-helpers
@cloudflare/kv-asset-handler
miniflare
@cloudflare/pages-functions
@cloudflare/pages-shared
@cloudflare/runtime-types
@cloudflare/unenv-preset
@cloudflare/vite-plugin
@cloudflare/vitest-plugin
@cloudflare/workers-auth
@cloudflare/workers-editor-shared
@cloudflare/workers-utils
wrangler
commit: |
|
I put the change from my issue comment up as #15846, targeting this branch so it reads as a diff on top of your commit. It keeps your detection and the timeout helper, and moves where they fire:
The PR has a test that boots a real ProxyWorker under Node and sends the control request the way Bun does. Against this branch's ProxyWorker it times out, which reproduces the hang without Bun. The red macOS check there is the miniflare R2 Merge it in or take the idea, whichever suits you. |
… doors The guard in cloudflare#15845 ran inside listen(), so under Bun it also refused server.getWorker().fetch(), which never goes through the ProxyWorker and worked before. Move the check to server.fetch(), and have the ProxyWorker answer with a 503 once a control request arrives without its payload, so requests to the listen() URL fail loudly instead of queueing forever.
Fixes #15717
When Bun does not deliver the proxy control request required by Miniflare,
createTestHarness()now throws an actionable startup error. This prevents the process from remaining idle while every request to the test harness hangs indefinitely.A picture of a cute animal (not mandatory, but encouraged)