[vitest-pool-workers] Ignore workerd's ungraceful TLS disconnect exception logs - #14821
Merged
dario-piotrowicz merged 1 commit intoJul 24, 2026
Conversation
…ption logs Servers and load balancers routinely close idle keepalive connections without sending a TLS close_notify. Nothing fails — the connection is idle — but workerd logs a kj/compat/tls.c++ exception with a full stack trace each time, flooding green runs of any suite that fetches real HTTPS endpoints. Filter it like the other non-actionable "disconnected: ..." messages already in ignoreMessages. Fixes cloudflare#14820 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
🦋 Changeset detectedLatest commit: adc9090 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
workers-devprod
requested review from
a team and
dario-piotrowicz
and removed request for
a team
July 23, 2026 15:07
Contributor
|
Codeowners approval required for this PR:
Show detailed file reviewers |
@cloudflare/autoconfig
@cloudflare/config
create-cloudflare
@cloudflare/deploy-helpers
@cloudflare/kv-asset-handler
miniflare
@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: |
dario-piotrowicz
approved these changes
Jul 24, 2026
dario-piotrowicz
left a comment
Member
There was a problem hiding this comment.
Looks good to me! Thanks for the fix @mishushakov! 🫶
(Also I hope this extra log hasn't been too annoying for you, sorry about that 🥹)
I'm merging your PR right away, the fix should be out with the next vitest-pool-workers package release on Tuesday 🙂
workers-devprod
approved these changes
Jul 24, 2026
workers-devprod
left a comment
Contributor
There was a problem hiding this comment.
Codeowners reviews satisfied
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #14820.
When tests make real
fetch()calls to external HTTPS endpoints, servers and load balancers routinely close idle keepalive connections without sending a TLSclose_notify. No request fails — the connection is idle, and undici/Bun/Deno silently discard the same event — but workerd logs akj/compat/tls.c++:429: disconnected: peer disconnected without gracefully ending TLS sessionexception with a full unsymbolized stack trace each time, flooding otherwise green runs (real-world example: 10+ occurrences in a passing 393-test suite).Since the pool installs its own
handleStructuredLogsand users can't override Miniflare's log handling from the vitest config, the only place to filter this is the pool'signoreMessageslist — which already suppresses the equivalent non-TLS shapes (disconnected: operation canceled,disconnected: WebSocket peer disconnected, …) as "normal operation". This PR adds the TLS variant to the same list, plus a changeset.Note on the accompanying
stack:line: workerd'sJsonLogger::logMessageemits one JSON log entry per kj log call, and kj's exception stringifier includes\nstack: …in the same string, so the exception text and its stack trace arrive as a single structured message — the substring match filters both together, same as the existingdisconnected: …entries.ignoreMessagesentry via the existing.includes()filter (and that unrelated warnings/exception shapes don't); ran the E2B SDK's full 393-test workerd suite against a locally patched pool dist — all green with no change in other output. The TLS disconnect event itself is environment-dependent (triggered reliably on GitHub Actions runners, not on a local network), so an end-to-end assertion isn't practical.🤖 Generated with Claude Code