[wrangler] Add Flagship auto-provisioning#14640
Conversation
🦋 Changeset detectedLatest commit: 766b54b The changes in this PR will be included in the next version bump. This PR includes changesets to release 11 packages
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 |
|
✅ All changesets look good |
|
UnknownError: "Overloaded" |
|
@ericclemmons Bonk workflow failed. Check the logs for details. View workflow run · To retry, trigger Bonk again. |
@cloudflare/autoconfig
@cloudflare/config
create-cloudflare
@cloudflare/deploy-helpers
@cloudflare/kv-asset-handler
miniflare
@cloudflare/pages-shared
@cloudflare/unenv-preset
@cloudflare/vite-plugin
@cloudflare/vitest-pool-workers
@cloudflare/workers-auth
@cloudflare/workers-editor-shared
@cloudflare/workers-utils
wrangler
commit: |
|
Review posted successfully to PR #14640. Summary of the actionable issue found: Dry-run / inherit handling missing for draft flagship bindings ( |
1ac9b1b to
fa0b8f6
Compare
|
Codeowners approval required for this PR:
Show detailed file reviewers
|
edmundhung
left a comment
There was a problem hiding this comment.
I'm a bit concerned about making app_id optional here. Flagship has no local implementation and is always routed through the remote binding proxy, which requires an app_id.
With a draft binding such as { binding: "FLAGS" }, wrangler dev would fail to start with FLAGS bindings must have an "app_id" field.
Most draft bindings have a local implementation as a fallback during development, so Flagship is an unusual case here. 🤔
Co-authored-by: Edmund Hung <edmund@cloudflare.com>
3174672 to
00e4df1
Compare
Opted to model this after Agent Memory, where local development relies on remote-only resources. (Updated PR description with manual validation) |
|
Codeowners approval required for this PR:
Show detailed file reviewers
|
Enables https://developers.cloudflare.com/flagship/ bindings for automatic provisioning: https://developers.cloudflare.com/workers/wrangler/configuration/#automatic-provisioning
A picture of a cute animal (not mandatory, but encouraged)
🐯
Manual validation
Prerequisites: use an account with Workers and Flagship access, and authenticate with
wrangler loginif needed.Expected: Wrangler exits before starting the dev server with:
Actual:
Expected: Wrangler automatically creates a Flagship app named
$WORKER_NAME-flags, reports output similar to the following, and deploys successfully:Actual:
Expected:
wrangler.jsoncnow contains a non-emptyapp_id, andflagship apps getreturns the app named$WORKER_NAME-flags.Actual:
{ "name": "flagship-autoprovision-1784129957", "main": "index.js", "compatibility_date": "2026-07-15", "flagship": [ { "binding": "FLAGS", "app_id": "74ebaf8f-5d53-416a-be42-a4bae43f1908" } ] }%Expected: Wrangler establishes a remote connection, lists
env.FLAGSas a remote Flagship binding, and reports that the server is ready. In another terminal:Expected:
{"flagshipBindingAvailable":true}Actual:
{"flagshipBindingAvailable":true}wrangler dev, then remove the Worker and the provisioned Flagship app:Actual: