fix(v10/cloudflare): Enforce flush timeout across Workflow lifecycle - #24582
Merged
Merged
Conversation
JPeer264
marked this pull request as ready for review
September 22, 2026 09:35
JPeer264
requested review from
isaacs and
mydea
and removed request for
a team
September 22, 2026 09:35
chargome
approved these changes
Sep 22, 2026
JPeer264
enabled auto-merge (squash)
September 22, 2026 09:36
Contributor
size-limit report 📦
|
JPeer264
force-pushed
the
backport-v10-cloudflare-workflow-flush-timeout
branch
from
September 22, 2026 09:53
97cf07a to
891b5a3
Compare
Member
Member
Author
Member
47 tasks
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.



Backport of: #24483
Differences to the original PR
packages/cloudflare/src/workflows.ts: not changed. v10 has no invocation state (flushPointReached) and no eager envelope delivery, so later Workflow steps cannot inherit an earlier step's flush point. The step flush on v10 already runs inside the step's span callback, so thewithScope(scopeForStep, ...)change is not necessary either.workflows/step-flushintegration suite: setstraceLifecycle: 'stream', because it asserts streamed span containers and those are not the default on v10. The Vite config enables_experimental.autoInstrumentation.cloudflare-workers-send-to-sentryE2E app and todev-packages/test-utils/src/cli.ts. Neither exists on v10.flush-timeoutintegration suite: removed thecacheClientdimension and theCACHE_CLIENTvar, because v10 has nocacheClientoption and every client is per-invocation. The Vite config enables_experimental.autoInstrumentation, which v10 requires forinstrument.server.ts.packages/cloudflare/src/client.ts: dropped the comment line aboutcacheClient: falseand v12.packages/cloudflare/test/client.test.ts: added only the new flush-lock timeout test. The otherflush()tests in that block are not on v10.packages/cloudflare/test/request.test.ts,test/workflow.test.ts: not changed. The Durable Object tests that the original edited do not exist on v10, and the WorkflowwaitUntilcount on v10 is already 3.