Repository navigation
[miniflare] Report tail event forwarding failures between dev sessions - #14993
Conversation
🦋 Changeset detectedLatest commit: d655dd8 The changes in this PR will be included in the next version bump. This PR includes changesets to release 8 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 |
|
The change is correct and self-contained. The fix properly converts the LGTM |
|
✅ All changesets look good |
@cloudflare/autoconfig
@cloudflare/build-output-utils
@cloudflare/config
create-cloudflare
@cloudflare/deploy-helpers
@cloudflare/kv-asset-handler
miniflare
@cloudflare/pages-functions
@cloudflare/pages-shared
@cloudflare/unenv-preset
@cloudflare/vite-plugin
@cloudflare/vitest-pool-workers
@cloudflare/workers-auth
@cloudflare/workers-editor-shared
@cloudflare/workers-utils
wrangler
commit: |
17a9026 to
1bb5d48
Compare
workers-devprod
left a comment
There was a problem hiding this comment.
Codeowners reviews satisfied
1bb5d48 to
98ae808
Compare
`tail()` returned the forwarding RPC's promise from inside a `try`/`catch`, so the rejection a departed peer produces landed outside the `try` and escaped as an unhandled rejection. The `catch` only ever guarded the synchronous `JSON` work, so a peer going away produced no diagnostic at all. Await the call so the rejection is caught and reported.
98ae808 to
d655dd8
Compare
Found while investigating the Windows
fixtures/dev-registryflake (#14989 has the wider write-up). Independent of that flake and of #14989 — this stands on its own.ExternalServiceProxy.tail()forwards tail events to a tail consumer running in another local dev session. It did:returning the promise from inside thetrymeans thecatchonly ever guarded the synchronousJSONwork. The rejection that a departed peer actually produces settled aftertail()had already returned, so it escaped as an unhandled rejection and the warning never fired.Verified: with a registered peer whose debug port has gone away, the pre-change code produces no diagnostic at all.
awaiting the call routes the rejection into the existingcatch.Tests
Added
reports a failure to forward tail events to a departed peer, which establishes tail forwarding between two sessions, disposes the peer so the registry entry outlives its debug port, and asserts the warning is emitted. It fails onmain(times out — the warning never arrives) and passes with the change. Ran 3x in isolation plus the full miniflare suite (1012 passed) to check it isn't order-dependent.A picture of a cute animal (not mandatory, but encouraged)
Note
This is a contribution from an AI agent: opencode, claude-opus-5.