Skip to content

Conversation

austin-mc
Copy link
Contributor

This PR introduces wrangler support for the upcoming the Media binding.

  • Tests
    • Tests included
    • Tests not necessary because:
  • Public documentation
    • Cloudflare docs PR(s):
    • Documentation not necessary because: Not public yet, docs to follow
  • Wrangler V3 Backport
    • Wrangler PR:
    • Not necessary because: new feature

@austin-mc austin-mc self-assigned this Oct 3, 2025
@austin-mc austin-mc requested a review from a team as a code owner October 3, 2025 14:43
@austin-mc austin-mc added e2e Run wrangler + vite-plugin e2e tests on a PR skip-v3-pr Skip validation of presence of a v3 backport PR labels Oct 3, 2025
Copy link

changeset-bot bot commented Oct 3, 2025

🦋 Changeset detected

Latest commit: 1daabfc

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

@github-project-automation github-project-automation bot moved this to Untriaged in workers-sdk Oct 3, 2025
@austin-mc austin-mc force-pushed the achristiansen/media-binding-wrangler-new branch from 6f1e934 to 3ac5c00 Compare October 3, 2025 14:43
Copy link

pkg-pr-new bot commented Oct 3, 2025

create-cloudflare

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

@cloudflare/kv-asset-handler

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

miniflare

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

@cloudflare/pages-shared

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

@cloudflare/unenv-preset

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

@cloudflare/vite-plugin

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

@cloudflare/vitest-pool-workers

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

@cloudflare/workers-editor-shared

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

wrangler

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

commit: 1daabfc

@austin-mc
Copy link
Contributor Author

austin-mc commented Oct 3, 2025

@penalosa on Monday would you mind giving this another review? I fixed everything from your comments on the last PR

@austin-mc austin-mc force-pushed the achristiansen/media-binding-wrangler-new branch 2 times, most recently from d0d671b to 324dd74 Compare October 13, 2025 13:56

const mf = new Miniflare({
compatibilityDate: "2025-01-01",
compatibilityDate: "2025-09-06",
Copy link
Contributor

Choose a reason for hiding this comment

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

I assume that this is when the media binding became available in production?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Correct

}

if (bindings.media && remoteBindingsEnabled) {
warnOrError("media", bindings.media.remote, "always-remote");
Copy link
Contributor

Choose a reason for hiding this comment

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

should always-remote throw an error if the user has specified remote:false explicitly?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

IMO yeah it should, but I'm hesitant to make a change here since this matches what the AI/MTLS/etc bindings do

(getFlag("REMOTE_BINDINGS") && media.remote === true) ||
media.remote === undefined
? false
: undefined,
Copy link
Contributor

Choose a reason for hiding this comment

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

Oh I see. undefined here means "not supported".
I wonder if we could be more explicit with a symbol or string or something?

Copy link
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.

Pressed submit too soon.
I meant to say "approved with nits".

@github-project-automation github-project-automation bot moved this from Untriaged to Approved in workers-sdk Oct 13, 2025
@austin-mc austin-mc force-pushed the achristiansen/media-binding-wrangler-new branch from 324dd74 to fb9c0a8 Compare October 13, 2025 22:06
@austin-mc austin-mc force-pushed the achristiansen/media-binding-wrangler-new branch from fb9c0a8 to 1daabfc Compare October 14, 2025 14:48
@austin-mc austin-mc merged commit dd5f769 into main Oct 14, 2025
50 of 54 checks passed
@austin-mc austin-mc deleted the achristiansen/media-binding-wrangler-new branch October 14, 2025 18:16
@github-project-automation github-project-automation bot moved this from Approved to Done in workers-sdk Oct 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

e2e Run wrangler + vite-plugin e2e tests on a PR skip-v3-pr Skip validation of presence of a v3 backport PR

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants