Repository navigation
Conversation
…method returns workerd keeps a Durable Object invocation open until its pending timers fire, so an SDK timer that outlives the method makes every invocation longer, and billed. The suite instruments the worker with the Sentry Vite plugin and runs a tail worker in the same `wrangler dev` process. It asserts that DO fetch, propagated RPC and alarm invocations end within 250 ms. They take a few ms locally, and about 500 ms with the segment-end flush timer of span streaming. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
JPeer264
force-pushed
the
jp/cloudflare-do-invocation-duration-test
branch
from
October 19, 2026 09:19
adedc8a to
a64b786
Compare
Contributor
size-limit report 📦
|
JPeer264
marked this pull request as ready for review
October 19, 2026 09:27
JPeer264
requested review from
isaacs and
mydea
and removed request for
a team
October 19, 2026 09:27
This branch has not been deployed
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.
follow up to #25490
This adds an integration test that checks that the SDK does not keep Durable Object invocations open after the method returns. A tail worker in the same
wrangler devprocess records each DO invocation, and the test asserts that a DOfetch, a propagated RPC call and analarmend within 250 ms.Why
workerd keeps a DO invocation open, and billed, until its pending timers fire (#25489). The unit test in #25490 only checks the segment-end flush timer. This test fails for any SDK timer that is still pending when a DO method returns.
Without #25490, the test fails with
fetchat 507 ms, RPC at 502 ms andalarmat 500 ms. With it, they take 2 to 15 ms.Known issues