fix(miniflare): Create WebSocketPair after fetching target WebSocket#13737
Conversation
🦋 Changeset detectedLatest commit: 0f5e8d5 The changes in this PR will be included in the next version bump. 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 |
Changeset ReviewFile:
|
| Criterion | Status |
|---|---|
| Version Type | ✅ Patch is appropriate for bug fix |
| Changelog Quality | ✅ Detailed description explaining the race condition, root cause, and fix |
| Markdown Headers | ✅ No h1/h2/h3 headers |
| Analytics | ✅ N/A - no analytics changes |
| Dependabot | ✅ N/A - not a dependency update |
| Experimental Features | ✅ N/A - bug fix for existing feature |
Notes
- Version type: Patch is correct for a bug fix addressing a race condition
- Description quality: Excellent - clearly explains:
- The specific problem (race condition on Windows when Chrome hasn't started accepting connections)
- Root cause (returning endpoint before socket was ready)
- The fix (probing
/json/versionwith retry/backoff) - Additional safety net (retrying transient connection failures)
✅ All changesets look good
|
After thorough review of all the substantive changes:
No logic bugs, security issues, backward compatibility violations, or incorrect API behavior found. LGTM |
There was a problem hiding this comment.
Devin Review found 1 potential issue.
⚠️ 1 issue in files not directly in the diff
⚠️ AGENTS.md "Requirements" section not updated after Node.js minimum version bump (AGENTS.md:85)
The PR changes the minimum Node.js version from 20 to 22 across all package.json engines fields, the root volta config, bin/wrangler.js, and wrangler-banner.ts, but does not update AGENTS.md which still states Node.js >= 20 under Development Guidelines > Requirements (AGENTS.md:85). A developer or agent following AGENTS.md would attempt to use Node.js 20, only to be rejected by the engines constraint in package.json:57 ("node": ">=22.0.0").
View 5 additional findings in Devin Review.
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: |
1a88c28 to
fd81c1d
Compare
fd81c1d to
807fc66
Compare
workers-devprod
left a comment
There was a problem hiding this comment.
Codeowners reviews satisfied
Wait for Chrome's DevTools port to actually accept connections before returning from launchBrowser, and retry transient connection failures when the binding worker reaches Chrome. Fixes flaky ConnectEx (#1225) and WSARecv (#64) errors observed when running miniflare browser rendering tests on Windows CI.
…in browser rendering Move WebSocketPair creation and server.accept() to after the fetch call to ensure the target WebSocket is established before creating the proxy pair.
807fc66 to
0f5e8d5
Compare
Move WebSocketPair creation and server.accept() to after the fetch call to ensure the target WebSocket is established before creating the proxy pair.
Extends and builds upon #13734
A picture of a cute animal (not mandatory, but encouraged)