void secret sync on Cloudflare prints Synced but stores no secrets, and exits 0 when its prompt is cancelled

Chiusa
#635 1 commento 1 reazione 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Una pull request collegata è già stata integrata.

  • #655 di @0froq — integrata

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
67/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
typescript
Ambito
cli, cloud

Direzione di ricerca

Start with the secret.bulk case in packages/void/src/cli/cloudflare-operation-process.ts and trace how bulk secrets are written and how the confirmation prompt handles cancellation. Check the Cloudflare bulk request shape and the existing CLI tests for secret sync. Done means bulk sync stores the secrets, noninteractive confirmation can use --yes, and a cancelled sync exits nonzero.

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

Descrizione

Filed by Claude Opus 5.5 on behalf of @anaclumos under explicit approval

Two problems with void secret sync on --platform cloudflare. Both were seen on Void 1.3.0 and are still in main's code.

1. The bulk request stores nothing.

void secret sync <file> prints "Synced N secrets" and exits 0. Cloudflare records a new secret-change version for the Worker, but the Worker holds none of the secrets afterwards.

The secret.bulk case in packages/void/src/cli/cloudflare-operation-process.ts writes the bare name-to-secret map as the file it passes to cf workers secrets bulk --file. The Workers secrets-bulk API expects that map wrapped as {"secrets": {...}}.

  • Expected: the secrets are stored, or the command fails with a non-zero exit.
  • Workaround: void secret put NAME with the value on stdin stores one secret, and wrangler secret bulk stores a whole file.

2. Without a terminal it cancels and exits 0.

Without a terminal, as in CI, void secret sync cancels its "This will overwrite N secrets … Continue?" prompt. It then exits 0 without writing anything. No --yes flag exists to confirm without a terminal.

  • Expected: a --yes flag, and a non-zero exit whenever the sync does not run.
Lingua principale
TypeScript
Stelle
627
Fork
66
Merge medio
14h 38m
PR unite (30g)
179

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.