Skip to content

Various fixes/improvements around remote bindings being used as local - #11162

Merged
dario-piotrowicz merged 21 commits into
mainfrom
dario/remote-wrangler-dev--local
Nov 5, 2025
Merged

Various fixes/improvements around remote bindings being used as local#11162
dario-piotrowicz merged 21 commits into
mainfrom
dario/remote-wrangler-dev--local

Conversation

@dario-piotrowicz

@dario-piotrowicz dario-piotrowicz commented Nov 3, 2025

Copy link
Copy Markdown
Member

This PR introduces various fixes/improvements around disabled remote bindings, namely:

  • updates wrangler dev's --local flag's description to clarify that it disables remote bindings. It also undeprecates it and un-hides it.
  • it addresses the fact that wrangler dev --local currently prints local bindings (configured with remote: true) as remote
  • it addresses the fact that some remote bindings, such as AI still worked as remote under wrangler dev --local
  • ensures that remote: false set in startWorker disables remote bindings
  • adds a remoteBindings option to getPlatformProxy and also to the vite plugin to disable the remote aspect of remote bindings (aligned with vitest-pool-workers)

@changeset-bot

changeset-bot Bot commented Nov 3, 2025

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 3db45f9

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

@pkg-pr-new

pkg-pr-new Bot commented Nov 3, 2025

Copy link
Copy Markdown
create-cloudflare

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

@cloudflare/kv-asset-handler

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

miniflare

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

@cloudflare/pages-shared

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

@cloudflare/unenv-preset

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

@cloudflare/vite-plugin

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

@cloudflare/vitest-pool-workers

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

@cloudflare/workers-editor-shared

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

@cloudflare/workers-utils

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

wrangler

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

commit: 3db45f9

… dev` command to clarify that it disables remote bindings, also un-deprecate and un-hide it

fix incorrect implementation
@dario-piotrowicz dario-piotrowicz changed the title Minor improvements/fixes for the wrangler dev's --local flag Various fixes/improvements around remote bindings being used as local Nov 4, 2025
@dario-piotrowicz
dario-piotrowicz marked this pull request as ready for review November 4, 2025 09:24
@dario-piotrowicz
dario-piotrowicz requested a review from a team as a code owner November 4, 2025 09:24
@dario-piotrowicz
dario-piotrowicz force-pushed the dario/remote-wrangler-dev--local branch from 160ed68 to ba50b6a Compare November 4, 2025 10:10
@penalosa

penalosa commented Nov 4, 2025

Copy link
Copy Markdown
Contributor

I think we should unify flags with the Vitest integration, which AFAIK uses remoteBindings: false to disable remote bindings?

@dario-piotrowicz

Copy link
Copy Markdown
Member Author

I think we should unify flags with the Vitest integration, which AFAIK uses remoteBindings: false to disable remote bindings?

you're right, I thought we completely removed that when we released remote bindings 😕

Ok, thanks 🙂, I can use remoteBindings across the board 👍

Comment thread fixtures/get-platform-proxy-remote-bindings/tests/remote-bindings-false.test.ts Outdated
Comment thread fixtures/get-platform-proxy-remote-bindings/tests/remote-bindings-false.test.ts Outdated
Comment thread packages/wrangler/e2e/remote-binding/start-worker-remote-bindings.test.ts Outdated
Comment thread packages/wrangler/src/api/integrations/platform/index.ts Outdated
Comment thread packages/wrangler/src/api/startDevWorker/ConfigController.ts Outdated
Comment thread packages/wrangler/src/api/startDevWorker/types.ts Outdated
Comment thread packages/wrangler/src/dev.ts Outdated
Comment thread packages/wrangler/src/dev.ts Outdated
@github-project-automation github-project-automation Bot moved this from Untriaged to In Review in workers-sdk Nov 4, 2025
@dario-piotrowicz
dario-piotrowicz requested a review from a team November 4, 2025 16:56
@@ -138,3 +138,24 @@ if (!process.env.CLOUDFLARE_ACCOUNT_ID || !process.env.CLOUDFLARE_API_TOKEN) {
});
});
}

describe.only("remote bindings disabled", () => {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

.only?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

sorry, ignore it, I'm just trying to debug a CI windows failure 😓 (before just adding a skipIf(process.platform === 'win32') 😅 )

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Comment thread packages/vite-plugin-cloudflare/src/plugin-config.ts Outdated
Comment thread packages/wrangler/src/api/integrations/platform/index.ts Outdated
Comment thread packages/wrangler/src/dev.ts Outdated

@penalosa penalosa left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Generally looks good, with some nits

@github-project-automation github-project-automation Bot moved this from In Review to Approved in workers-sdk Nov 5, 2025
@dario-piotrowicz
dario-piotrowicz force-pushed the dario/remote-wrangler-dev--local branch from 46d6edb to dbdb75a Compare November 5, 2025 10:58
@dario-piotrowicz
dario-piotrowicz force-pushed the dario/remote-wrangler-dev--local branch 2 times, most recently from aae4e2b to fa36841 Compare November 5, 2025 12:22
@dario-piotrowicz
dario-piotrowicz merged commit c3ed531 into main Nov 5, 2025
39 of 40 checks passed
@github-project-automation github-project-automation Bot moved this from Approved to Done in workers-sdk Nov 5, 2025
@dario-piotrowicz
dario-piotrowicz deleted the dario/remote-wrangler-dev--local branch November 5, 2025 14:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

3 participants