Repository navigation
test(cloudflare): Fix the invocation-duration flake and report request errors - #26459
Merged
s1gr1d merged 2 commits intoNov 17, 2026
Merged
Conversation
`makeRequest` returned `undefined` for a failed request. The test then went on and failed with an assertion on `undefined`, which hid the cause in 23 CI runs. It now throws the error. Also, do not log the sub-worker exit that the teardown causes as an error. Mark the promise of `collectStreamedSpans` as handled, so a test that fails before it awaits the promise does not report a second "Unhandled error".
The test compared one invocation per trigger with a wall-clock limit of 250 ms. On a busy runner, single invocations took 258 to 636 ms without the regression, which failed 11 CI runs in two weeks. A pending SDK timer delays every invocation, and a busy runner delays only some. The test now takes the fastest of five invocations, each on a new Durable Object instance.
Contributor
size-limit report 📦Compared: 7e71f6b (PR test merge using sig/ci-lockfile-webkit-coverage at e7cae46) Against: 6bd0415 (sig/ci-lockfile-webkit-coverage) · base run #66387
|
nicohrubec
approved these changes
Nov 17, 2026
51 tasks done
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.
What
invocation-durationtest takes the fastest of five Durable Object invocations for each trigger. Each invocation uses a new instance.makeRequestof the test runner throws when a request fails. Before, it returnedundefined.collectStreamedSpanspromise does not report a second "Unhandled error".Why
@sentry/cloudflarev11: every instrumented Durable Object invocation stays open ~500 ms after it finishes (span streaming's segment-end timer, even when unsampled) #25489) adds 500 ms to every invocation, so no limit on a single sample can separate the two. The fastest of five can. The new test fails with a 500 ms timer, also when only the first invocation of an instance has the timer.expected undefined to be .... That hid the cause, which was a request that reached the workerd inspector (gone since chore(deps-dev): Bump wrangler from 4.61.0 to 4.156.0 #26009).Second PR of a stack of four, on top of the CI fixes.