Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Cloudflare deploy refuses placement.region (targeted placement) once the Worker has secrets

Aperta
#546 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
38/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
typescript
Ambito
cloud, devops

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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

  1. Set cloudflare: { placement: { region: 'aws:us-east-1' } } in void.config.ts.
  2. void secret put SOME_SECRET
  3. void 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.

Lingua principale
TypeScript
Stelle
402
Fork
32
Merge medio
10h 18m
PR unite (30g)
113

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di voidzero-dev/void

Tutte le issue di voidzero-dev/void

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.