`workers versions list` and `get` return 500 for a Worker with a placement region
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 54/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- typescript
- Ambito
- api
Direzione di ricerca
The report identifies the failing cf workers versions list and get commands and the API endpoint, but says the serialization error comes from the Workers API rather than the CLI. Start by tracing the versions commands to the API request and checking whether this repository contains relevant tests or handling for placement. Done means versions for a Worker with placement can be read successfully, including the placement and startup time.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Summary of the issue
cf workers versions list and cf workers versions get fail with a 500 for any Worker deployed with a placement region. The API cannot serialize the version's placement:
json: error calling MarshalJSON for type *placement.Placement: invalid placement target type:
The Worker is configured in cloudflare.config.ts with:
placement: { region: 'aws:eu-central-1' }
cf deploy accepts this and the Worker runs with it. Only reading a version back fails. The same commands work on a Worker without placement in the same account. cf workers deployments list works on the affected Worker.
Expected behaviour
cf workers versions list --worker-id <worker> returns the versions, including startup_time_ms and the placement, as it does for a Worker without placement.
Version of cf used
1.0.0-beta.12
System information and package versions
System:
OS: macOS 26.7.1
CPU: (11) arm64 Apple M3 Pro
Shell: 5.9 - /bin/zsh
Binaries:
Node: 24.18.0
npm: 11.16.0
pnpm: 12.8.1
Reproduction (optional)
- Deploy a Worker with
placement: { region: 'aws:eu-central-1' }incloudflare.config.ts(cf deploy). cf workers versions list --worker-id <worker> --per-page 1cf workers versions get <version-id> --worker-id <worker>
Both return the 500 below. Running step 2 on a Worker without placement returns its versions normally.
Relevant error logs (optional)
┌ APIError
│ Status code: 500
│ Body: "json: error calling MarshalJSON for type *placement.Placement: invalid placement target type: \n"
│ 500 Internal Server Error · HTTP /accounts/<account_id>/workers/workers/<worker>/versions?per_page=1
└
The error comes from the API (GET /accounts/{account_id}/workers/workers/{worker_id}/versions), not the CLI. It may belong with the Workers API team, but cf has no other way to read a version, so I'm filing it here.
- Lingua principale
- TypeScript
- Stelle
- 916
- Fork
- 53
- Merge medio
- 18h 37m
- PR unite (30g)
- 197
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di cloudflare/cf
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
cloudflare/cf#344 ·
I maintainer di solito rispondono entro 1 giorno
-
upstream
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
cloudflare/cf#262 ·
I maintainer di solito rispondono entro 1 giorno
-
`cf dev` rejects `--port` and `--host` for Vite projects, including the `cf init` templateForse già presa @jamesopstad l’ha presa 12 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
cloudflare/cf#223 · 2 assegnatari ·
I maintainer di solito rispondono entro 1 giorno
-
upstream
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
cloudflare/cf#179 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 58/100
cloudflare/cf#406 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di cloudflare/cf
Issue simili
-
VS Code extension: clickable file links in chat drop the :line suffix, never jump to the lineAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
MoonshotAI/kimi-code#4398 ·
I maintainer di solito rispondono entro 1 giorno
-
Xiaomi Mimo语音识别服务异常Apertapending triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
I maintainer di solito rispondono entro 1 giorno
-
package-lock.json : les binaires natifs macOS et Linux de unrs-resolver ont disparu depuis #1823Apertabug dependencies
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
AxaFrance/design-system#2064 ·
I maintainer di solito rispondono entro 3 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100