fix(miniflare): allow tcp connection when a outboundService is configured#13999
Conversation
🦋 Changeset detectedLatest commit: f935c02 The changes in this PR will be included in the next version bump. This PR includes changesets to release 5 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 |
|
Codeowners approval required for this PR:
Show detailed file reviewers |
|
✅ All changesets look good |
There was a problem hiding this comment.
I'm Bonk, and I've done a quick review of your PR.
This PR adds the connect_pass_through compatibility flag to the custom fetch service worker used for outboundService, so that TCP connect events pass through instead of failing when there's no connect handler.
- Missing the same fix for
SCRIPT_CUSTOM_NODE_SERVICE(medium severity): Thenode-style custom service handler (line ~473) has the identical structure -- a service worker script with only afetchlistener, also constructed inmaybeGetCustomServiceService. It would have the same TCP passthrough failure if used as an outbound service. It should also receive theconnect_pass_throughandexperimentalcompatibility flags. Specifically, at line 474, the block:
serviceWorkerScript: SCRIPT_CUSTOM_NODE_SERVICE,
compatibilityDate: "2022-09-01",
bindings: [should become:
serviceWorkerScript: SCRIPT_CUSTOM_NODE_SERVICE,
compatibilityDate: "2022-09-01",
compatibilityFlags: ["connect_pass_through", "experimental"],
bindings: [|
Review posted successfully on PR #13999. Here's a summary of the review: The fix itself is correct -- adding One actionable issue found: The |
create-cloudflare
@cloudflare/kv-asset-handler
miniflare
@cloudflare/pages-shared
@cloudflare/unenv-preset
@cloudflare/vite-plugin
@cloudflare/vitest-pool-workers
@cloudflare/workers-editor-shared
@cloudflare/workers-utils
wrangler
commit: |
workers-devprod
left a comment
There was a problem hiding this comment.
Codeowners reviews satisfied
Fixes n/a.
A picture of a cute animal (not mandatory, but encouraged)