Skip to content

fix(miniflare): Fix Durable Object RPC calls from Node.js blocking the event loop#11663

Merged
NuroDev merged 14 commits intomainfrom
fix/miniflare-do-stub-blocking
Dec 17, 2025
Merged

fix(miniflare): Fix Durable Object RPC calls from Node.js blocking the event loop#11663
NuroDev merged 14 commits intomainfrom
fix/miniflare-do-stub-blocking

Conversation

@NuroDev
Copy link
Copy Markdown
Member

@NuroDev NuroDev commented Dec 16, 2025

Fixes #11122.

This fixes Durable Object RPC calls from Node.js blocking the event loop, preventing Promise.race() and timeouts from working correctly.


A picture of a cute animal (not mandatory, but encouraged)

IMG_1284

@NuroDev NuroDev self-assigned this Dec 16, 2025
@NuroDev NuroDev added the miniflare Relating to Miniflare label Dec 16, 2025
@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Dec 16, 2025

🦋 Changeset detected

Latest commit: ab328ee

The changes in this PR will be included in the next version bump.

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

@claude
Copy link
Copy Markdown
Contributor

claude bot commented Dec 16, 2025

Claude finished @NuroDev's task in 36s —— View job


Changeset Review

Reviewing the changeset file(s) in this PR...

Todo List

  • Read changeset guidelines from .changeset/README.md
  • Read changeset file .changeset/hip-clouds-build.md
  • Validate version type (patch/minor/major)
  • Check changelog quality
  • Check for forbidden markdown headers
  • Provide summary and fail if blocking issues found

Review Result

Changeset looks good!

Validation Details

Version Type: ✅ patch for miniflare

  • Correctly identified as a patch (bug fix)
  • No major version bump for wrangler (forbidden rule not violated)

Changelog Quality: ✅ Good

  • Clear title describing the symptom: "Fix Durable Object RPC calls from Node.js blocking the event loop"
  • Well-written body that:
    • Describes the problem (blocking event loop, preventing Promise.race() and timeouts)
    • Explains the previous behavior
    • Explains what the fix does
  • Appropriate level of detail for a bug fix

Markdown Headers: ✅ None used

  • No h1/h2/h3 headers that would break changelog formatting

Package Coverage: ✅ Correct

  • Only miniflare is affected, which is correctly specified

The changeset follows all guidelines and provides sufficient context for users to understand the bug fix.


@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new bot commented Dec 16, 2025

create-cloudflare

npm i https://pkg.pr.new/create-cloudflare@11663

@cloudflare/kv-asset-handler

npm i https://pkg.pr.new/@cloudflare/kv-asset-handler@11663

miniflare

npm i https://pkg.pr.new/miniflare@11663

@cloudflare/pages-shared

npm i https://pkg.pr.new/@cloudflare/pages-shared@11663

@cloudflare/unenv-preset

npm i https://pkg.pr.new/@cloudflare/unenv-preset@11663

@cloudflare/vite-plugin

npm i https://pkg.pr.new/@cloudflare/vite-plugin@11663

@cloudflare/vitest-pool-workers

npm i https://pkg.pr.new/@cloudflare/vitest-pool-workers@11663

@cloudflare/workers-editor-shared

npm i https://pkg.pr.new/@cloudflare/workers-editor-shared@11663

@cloudflare/workers-utils

npm i https://pkg.pr.new/@cloudflare/workers-utils@11663

wrangler

npm i https://pkg.pr.new/wrangler@11663

commit: ab328ee

Copy link
Copy Markdown
Contributor

@petebacondarwin petebacondarwin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't merge this unless someone else also approves, as this is a hairy bit of the code base - but LGTM!

@NuroDev NuroDev marked this pull request as ready for review December 16, 2025 19:41
@NuroDev NuroDev requested a review from a team as a code owner December 16, 2025 19:41
Copy link
Copy Markdown
Contributor

@ascorbic ascorbic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For the same reason as Pete I won't give this a final approval as I don't know that part of the codebase at all, but the code itself looks good.

Co-authored-by: Dario Piotrowicz <dario@cloudflare.com>
Copy link
Copy Markdown
Member

@dario-piotrowicz dario-piotrowicz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lol I've reviewed the changes but I'm in the same boat as Pete and Matt 😅

If this works locally anyways and passes all the tests I think it'd be safe to merge 🙂

@github-project-automation github-project-automation bot moved this from Untriaged to Approved in workers-sdk Dec 17, 2025
@NuroDev NuroDev merged commit 737c0f4 into main Dec 17, 2025
52 of 54 checks passed
@NuroDev NuroDev deleted the fix/miniflare-do-stub-blocking branch December 17, 2025 13:20
@github-project-automation github-project-automation bot moved this from Approved to Done in workers-sdk Dec 17, 2025
petebacondarwin pushed a commit that referenced this pull request Dec 17, 2025
…ng the event loop (#11664)

* Add Miniflare logic to mark DO stubs as async

* Added tests to check for blocking DO stubs

* Added changeset

* Updated backport tests

* Updated changeset description
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

miniflare Relating to Miniflare

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Durable object hanging tests while preventing timeouts

5 participants