Skip to content

fix experimental remoteBindings flag not being properly propagated in getPlatformProxy #9840

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

dario-piotrowicz
Copy link
Member

The changes here address the fact that experimental remoteBindings flag that user can set in their getPlatformProxy call is currently not being properly propagated, causing most of the bindings not to actually be treated as remote ones


  • Tests
    • Tests included
    • Tests not necessary because:
  • Public documentation
    • Cloudflare docs PR(s):
    • Documentation not necessary because: bugfix
  • Wrangler V3 Backport
    • Wrangler PR:
    • Not necessary because: bugfix to a non-v3 feature

@dario-piotrowicz dario-piotrowicz requested a review from a team as a code owner July 3, 2025 09:41
Copy link

changeset-bot bot commented Jul 3, 2025

🦋 Changeset detected

Latest commit: 2a0c7dd

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

This PR includes changesets to release 2 packages
Name Type
wrangler Patch
@cloudflare/vitest-pool-workers 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

@dario-piotrowicz dario-piotrowicz requested a review from penalosa July 3, 2025 09:41
@dario-piotrowicz dario-piotrowicz force-pushed the dario/fix-get-platform-proxy-remote-bindings-flag-issue branch from 9559022 to f98c112 Compare July 3, 2025 09:45
@github-project-automation github-project-automation bot moved this to Untriaged in workers-sdk Jul 3, 2025
Copy link

pkg-pr-new bot commented Jul 3, 2025

create-cloudflare

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

@cloudflare/kv-asset-handler

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

miniflare

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

@cloudflare/pages-shared

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

@cloudflare/unenv-preset

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

@cloudflare/vite-plugin

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

@cloudflare/vitest-pool-workers

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

@cloudflare/workers-editor-shared

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

wrangler

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

commit: 2a0c7dd

@dario-piotrowicz dario-piotrowicz added the skip-v3-pr Skip validation of presence of a v3 backport PR label Jul 3, 2025
@dario-piotrowicz dario-piotrowicz force-pushed the dario/fix-get-platform-proxy-remote-bindings-flag-issue branch from f98c112 to c7b5c9c Compare July 3, 2025 10:05
@github-project-automation github-project-automation bot moved this from Untriaged to Approved in workers-sdk Jul 3, 2025

fix experimental remoteBindings flag not being properly propagated in `getPlatformProxy`

The changes here address the fact that experimental remoteBindings flag that user can set in their `getPlatformProxy` call is currently not being properly propagated, causing most of the bindings not to actually be treated as remote ones
Copy link
Contributor

@vicb vicb Jul 3, 2025

Choose a reason for hiding this comment

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

causing most of the bindings

is there a list of bingings impacted instead of "most" ?

Copy link
Contributor

Choose a reason for hiding this comment

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

Looking at the tests it looks like the only diff is KV?

Choose a reason for hiding this comment

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

causing most of the bindings

is there a list of bingings impacted instead of "most" ?

Everything that support "experimental_remote": true as I've experienced. Looking forward to this PR merge to resolve the issue I am having now.

Copy link
Member Author

Choose a reason for hiding this comment

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

causing most of the bindings

is there a list of bingings impacted instead of "most" ?

"most" basically means all the bindings besides service ones, those worked before my changes (because of this erroneous line: https://github.com/cloudflare/workers-sdk/pull/9840/files#diff-564e7822c281c216ba6926ff5334b704657d6c80483b42f46c8de51ef1f1d5ccL209)

I'll clarify this in the changeset 👍

Copy link
Member Author

Choose a reason for hiding this comment

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

causing most of the bindings

is there a list of bingings impacted instead of "most" ?

Everything that support "experimental_remote": true as I've experienced. Looking forward to this PR merge to resolve the issue I am having now.

I'm sorry to have inconvenienced you 😓

If you hit these sort of issues please feel always free to open issues in the repository so that we can help out 🙂

Choose a reason for hiding this comment

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

causing most of the bindings

is there a list of bingings impacted instead of "most" ?

Everything that support "experimental_remote": true as I've experienced. Looking forward to this PR merge to resolve the issue I am having now.

I'm sorry to have inconvenienced you 😓

If you hit these sort of issues please feel always free to open issues in the repository so that we can help out 🙂

No worries, I initially thought the issue was with @astro/cloudflare package, but someone from astro community guide me to here.

Copy link
Member Author

Choose a reason for hiding this comment

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

@vicb I've updated the changeset hopefully it is more clear now

Regarding the tests indeed I've only added a test for KV as I think that it'd be very impractical to test all the possible bindings here, one should hopefully be enough to give us confidence that the flag is being correctly propagated, let me know if you disagree

Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks!

Copy link

@shafkathullah shafkathullah Jul 9, 2025

Choose a reason for hiding this comment

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

@dario-piotrowicz

I see 2 more bugs, think it's related to this getPlatformProxy

  • preview_database_id is not being picked on dev runs ie, when using say @astro/cloudflare adapter and running astro dev
  • environment field is not properly propagated, ie passing that field has no effect, but if wrong value is passed ie, not available in wrangler.jsonc an error is thrown.

also these works fine when running wrangler from CLI ie, wrangler dev so the issue is not with wrangler CLI.

Copy link
Member Author

Choose a reason for hiding this comment

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

Hi @shafkathullah, thanks for letting me know

Could you open 2 bug issues for these?
(If you could also share a minimal reproduction (which only uses getPlatformProxy) that would be great)

@dario-piotrowicz dario-piotrowicz added this pull request to the merge queue Jul 4, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jul 4, 2025
@petebacondarwin petebacondarwin added this pull request to the merge queue Jul 4, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jul 4, 2025
@petebacondarwin petebacondarwin added this pull request to the merge queue Jul 5, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jul 5, 2025
@petebacondarwin petebacondarwin added this pull request to the merge queue Jul 5, 2025
Merged via the queue into main with commit 7c55f9e Jul 5, 2025
34 checks passed
@petebacondarwin petebacondarwin deleted the dario/fix-get-platform-proxy-remote-bindings-flag-issue branch July 5, 2025 07:32
@github-project-automation github-project-automation bot moved this from Approved to Done in workers-sdk Jul 5, 2025
@workers-devprod workers-devprod mentioned this pull request Jul 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
skip-v3-pr Skip validation of presence of a v3 backport PR
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

5 participants