Cloudflare deploy refuses placement.region (targeted placement) once the Worker has secrets
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 38/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- typescript
Research direction
Start with packages/void/src/cli/cf-version-api.ts and inspect placementFromOutput, then trace the Cloudflare deploy flow that uploads and deploys Worker versions. Compare the beta version endpoint behavior with the classic Wrangler upload path; the issue describes several possible approaches but leaves the design open. Done means targeted placement works for Workers with secrets without risking deployment of a version whose placement was dropped.
Written by the indexing model from the issue text.
Description
Summary
void deploy --platform cloudflare refuses cloudflare.placement with a region (also host / hostname) once the Worker has any secret. The only option left is { mode: 'smart' }.
Cloudflare placement.region cannot be deployed while the Worker has secrets. Remove cloudflare.placement from void.config.ts, or set it to { mode: 'smart' }.
Thrown from placementFromOutput in packages/void/src/cli/cf-version-api.ts (still present in v1.2.1).
Why it matters
Targeted placement is how you keep a Worker next to a single-region database. Our Worker talks to Postgres in us-east-1 through Hyperdrive, so we need placement: { region: 'aws:us-east-1' }. Smart placement takes time to learn and doesn't guarantee that. Almost every production Worker has secrets, so in practice this rule rules out targeted placement for real apps on Void. Plain Wrangler deploys the same config with no problem.
Repro
- Set
cloudflare: { placement: { region: 'aws:us-east-1' } }invoid.config.ts. void secret put SOME_SECRETvoid deploy --platform cloudflare: refused with the error above.
Notes
The code comment says this is on purpose: the Workers beta version endpoint can drop the target, and an atomic upload goes live before a read-back could catch it. Some possible ways forward:
- Fall back to Wrangler's / the classic upload path when targeted placement is set, or
- Upload a version without deploying it, read it back to confirm
placement, then deploy it, or - Deploy and then verify (and roll back on a mismatch), behind an opt-in flag.
Seen on 1.1.12, still present in 1.2.1.
- Dominant language
- TypeScript
- Stars
- 402
- Forks
- 32
- Avg merge
- 10h 18m
- Merged PRs (30d)
- 113
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from voidzero-dev/void
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
voidzero-dev/void#529 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 1/5 1-3 hours Newbie friendliness 78/100
voidzero-dev/void#428 ·
Maintainers usually reply within 1 day
-
Auth config regeneration in dev can reuse a cached configPossibly taken @Brooooooklyn claimed this today. Open
Difficulty 4/5 3-5 days Newbie friendliness 35/100
voidzero-dev/void#550 ·
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 46/100
voidzero-dev/void#547 ·
Maintainers usually reply within 1 day
-
Pages: actions commit the `?actionName` URL to historyPossibly taken A pull request linked to this issue is open or already merged. Open
Difficulty 3/5 1-2 days Newbie friendliness 56/100
voidzero-dev/void#527 ·
Maintainers usually reply within 1 day
All issues in voidzero-dev/void
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
db-ux-design-system/core-web#8613 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
bug:new
Difficulty 1/5 Under an hour Newbie friendliness 78/100
callstackincubator/simlock#934 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
gchq/LD-Explorer#286 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
foxglove/mcap#1907 · 1 comment ·
Maintainers usually reply within 1 day