Skip to content

fix: start transferred MessagePort in fetch-sync worker#9198

Merged
petebacondarwin merged 2 commits intocloudflare:mainfrom
kylecarbs:main
May 12, 2025
Merged

fix: start transferred MessagePort in fetch-sync worker#9198
petebacondarwin merged 2 commits intocloudflare:mainfrom
kylecarbs:main

Conversation

@kylecarbs
Copy link
Copy Markdown
Contributor

@kylecarbs kylecarbs commented May 10, 2025

This was causing running Miniflare in Bun tests to hang indefinitely.

Fixes oven-sh/bun#16240

  • Tests
    • TODO (before merge)
    • Tests included
    • Tests not necessary because: no effect under node.js
  • Wrangler / Vite E2E Tests CI Job required? (Use "e2e" label or ask maintainer to run separately)
    • I don't know
    • Required
    • Not required because: no effect under node.js
  • Public documentation
    • TODO (before merge)
    • Cloudflare docs PR(s):
    • Documentation not necessary because: no public change
  • Wrangler V3 Backport

@kylecarbs kylecarbs requested a review from a team as a code owner May 10, 2025 16:23
@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented May 10, 2025

🦋 Changeset detected

Latest commit: 326424d

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

This PR includes changesets to release 5 packages
Name Type
miniflare Patch
@cloudflare/pages-shared Patch
@cloudflare/vite-plugin Patch
@cloudflare/vitest-pool-workers Patch
wrangler Patch

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

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.

Cool. Thanks for adding this.
In Node.js is appears that this is unnecessary as it is implied by attaching a message listener.
But I can see that is where Node.js diverges from the Web standard API.

I'll add a changeset for good measure. Since this has no effect on Node.js and we don't officially support Bun, I don't see any value in adding an extra test for this functionality.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented May 12, 2025

A Wrangler prerelease is available for testing. You can install this latest build in your project with:

npm install --save-dev https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/14967789028/npm-package-wrangler-9198
Prereleases for other packages:

cloudflare-workers-bindings-extension:

wget https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/14967789028/npm-package-cloudflare-workers-bindings-extension-9198 -O ./cloudflare-workers-bindings-extension.0.0.0-v58887391e.vsix && code --install-extension ./cloudflare-workers-bindings-extension.0.0.0-v58887391e.vsix

create-cloudflare:

npx https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/14967789028/npm-package-create-cloudflare-9198 --no-auto-update

@cloudflare/kv-asset-handler:

npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/14967789028/npm-package-cloudflare-kv-asset-handler-9198

miniflare:

npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/14967789028/npm-package-miniflare-9198

@cloudflare/pages-shared:

npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/14967789028/npm-package-cloudflare-pages-shared-9198

@cloudflare/unenv-preset:

npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/14967789028/npm-package-cloudflare-unenv-preset-9198

@cloudflare/vite-plugin:

npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/14967789028/npm-package-cloudflare-vite-plugin-9198

@cloudflare/vitest-pool-workers:

npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/14967789028/npm-package-cloudflare-vitest-pool-workers-9198

@cloudflare/workers-editor-shared:

npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/14967789028/npm-package-cloudflare-workers-editor-shared-9198

@cloudflare/workers-shared:

npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/14967789028/npm-package-cloudflare-workers-shared-9198

@cloudflare/workflows-shared:

npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/14967789028/npm-package-cloudflare-workflows-shared-9198

Note that these links will no longer work once the GitHub Actions artifact expires.

kylecarbs and others added 2 commits May 12, 2025 09:43
This was causing running Miniflare in Bun tests to hang indefinitely.
@petebacondarwin petebacondarwin added this pull request to the merge queue May 12, 2025
Merged via the queue into cloudflare:main with commit 2cc8197 May 12, 2025
44 of 52 checks passed
@github-project-automation github-project-automation bot moved this from Untriaged to Done in workers-sdk May 12, 2025
@workers-devprod workers-devprod added the contribution [Holopin] Recognizes an open-source contribution, big or small label May 12, 2025
@holopin-bot
Copy link
Copy Markdown

holopin-bot bot commented May 12, 2025

Congratulations @kylecarbs, the maintainer of this repository has issued you a holobyte! Here it is: https://holopin.io/holobyte/cmaky49q457540dl4b0tytov6

This badge can only be claimed by you, so make sure that your GitHub account is linked to your Holopin account. You can manage those preferences here: https://holopin.io/account.
Or if you're new to Holopin, you can simply sign up with GitHub, which will do the trick!

emily-shen pushed a commit that referenced this pull request May 12, 2025
… worker (#9211)

* fix: start transferred MessagePort in fetch-sync worker

This was causing running Miniflare in Bun tests to hang indefinitely.

* add changeset

---------

Co-authored-by: Kyle Carberry <kyle@carberry.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

contribution [Holopin] Recognizes an open-source contribution, big or small

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

Cloudflare wrangler's getPlatformProxy hangs when run with bun

3 participants