Skip to content

test(cloudflare): Fix the invocation-duration flake and report request errors - #26459

Merged
s1gr1d merged 2 commits into
sig/ci-lockfile-webkit-coveragefrom
sig/test-cloudflare-request-errors
Nov 17, 2026
Merged

s1gr1d merged 2 commits into
sig/ci-lockfile-webkit-coveragefrom
sig/test-cloudflare-request-errors

Conversation

@s1gr1d

@s1gr1d s1gr1d commented Nov 17, 2026 •

Copy link
Copy Markdown
Member

What

  • The invocation-duration test takes the fastest of five Durable Object invocations for each trigger. Each invocation uses a new instance.
  • makeRequest of the test runner throws when a request fails. Before, it returned undefined.
  • The runner does not log the sub-worker exit of the teardown as an error. A test that fails before it awaits a collectStreamedSpans promise does not report a second "Unhandled error".

Why

Second PR of a stack of four, on top of the CI fixes.

`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.
@github-actions

Copy link
Copy Markdown
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

⚠️ Baseline mismatch: 3 sig/ci-lockfile-webkit-coverage commit(s) in the PR build are missing from the baseline. Their size changes also affect this comparison. Compare commits. Re-run once sig/ci-lockfile-webkit-coverage's baseline build for e7cae46 finishes.

Path Size % Change Change
@sentry/browser 30.1 kB - -
@sentry/browser - with treeshaking flags 28.3 kB - -
@sentry/browser - with treeshaking flags tracing without tracing 28.2 kB - -
@sentry/browser (incl. Tracing) 52.28 kB - -
@sentry/browser (incl. Tracing + Span Streaming) 52.29 kB - -
@sentry/browser (incl. Tracing, Profiling) 55.25 kB - -
@sentry/browser (incl. Tracing, Replay) 92.82 kB - -
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 81.6 kB - -
@sentry/browser (incl. Tracing, Replay with Canvas) 97.21 kB - -
@sentry/browser (incl. Tracing, Replay, Feedback) 110.6 kB - -
@sentry/browser (incl. Feedback) 47.73 kB - -
@sentry/browser (incl. sendFeedback) 30.69 kB - -
@sentry/browser (incl. FeedbackAsync) 35.69 kB - -
@sentry/browser (incl. Metrics) 31.43 kB - -
@sentry/browser (incl. Logs) 31.71 kB - -
@sentry/browser (incl. Metrics & Logs) 32.37 kB - -
@sentry/react 32.11 kB - -
@sentry/react (incl. Tracing) 54.95 kB - -
@sentry/vue 38.29 kB - -
@sentry/vue (incl. Tracing) 55.24 kB - -
@sentry/svelte 30.12 kB - -
@sentry/remix (Remix 3 client bundle) 58.06 kB - -
CDN Bundle 31.87 kB - -
CDN Bundle (incl. Tracing) 52.7 kB - -
CDN Bundle (incl. Logs, Metrics) 34.67 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) 55.26 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) 75.7 kB - -
CDN Bundle (incl. Tracing, Replay) 90.72 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) 93.33 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) 96.09 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) 98.69 kB - -
CDN Bundle - uncompressed 92.98 kB - -
CDN Bundle (incl. Tracing) - uncompressed 155.45 kB - -
CDN Bundle (incl. Logs, Metrics) - uncompressed 101.33 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed 163.08 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed 231.44 kB - -
CDN Bundle (incl. Tracing, Replay) - uncompressed 275.61 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed 283.24 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 287.4 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed 295.02 kB - -
@sentry/nextjs (client) 58.57 kB - -
@sentry/sveltekit (client) 53.57 kB - -
@sentry/core/server 44.8 kB - -
@sentry/core/browser 14.4 kB - -
@sentry/node 151.35 kB -0.01% -7 B 🔽
@sentry/node/import (ESM hook with diagnostics-channel injection) 83.3 kB - -
@sentry/node - without tracing 88.56 kB -0.01% -6 B 🔽
@sentry/node - without channel injection 140.31 kB -0.01% -5 B 🔽
@sentry/aws-serverless 98.93 kB -0.01% -6 B 🔽
@sentry/cloudflare (withSentry) - minified 206.47 kB - -
@sentry/cloudflare (withSentry) 479.22 kB - -
@sentry/nextjs/cloudflare (withSentry) - minified 231.83 kB - -

View base workflow run

@s1gr1d
s1gr1d added this pull request to stack #26475 November 17, 2026 12:41
@s1gr1d
s1gr1d marked this pull request as ready for review November 17, 2026 12:50
@s1gr1d
s1gr1d requested a review from JPeer264 November 17, 2026 12:50
@s1gr1d
s1gr1d merged commit 96af3b8 into develop Nov 17, 2026
58 checks passed
@s1gr1d
s1gr1d deleted the sig/test-cloudflare-request-errors branch November 17, 2026 13:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants