platform: interrupted install ignores a replacement runtime token and never updates deployed Workers
I maintainer di solito rispondono entro 1 giorno
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 35/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- typescript
Direzione di ricerca
Start in packages/void/src/cli/platform-lifecycle.ts, where configured() prefers the checkpoint token over the environment variable and the rejected-token recovery runs only for drafts on a TTY. Then read platform-installer-secrets.ts and platform-install-workers.ts to see how workerSecretUpdates is built and why existing Workers receive no CF_API_TOKEN update. Done means a resumed install uses an explicit replacement token and pushes it to existing API and proxy Workers, with tests covering both paths; the maintainer has not yet chosen the behaviour.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Summary
Suppose void platform install stops after it has created resources or deployed the API and proxy Workers, and the operator then has to replace the runtime token, for example because the original was revoked or rotated. Resuming with VOID_PLATFORM_RUNTIME_CLOUDFLARE_API_TOKEN=<replacement> void platform install --resume --name <id> has two problems:
- The CLI keeps using the runtime token saved in the checkpoint and ignores the replacement in the environment.
- Even when the replacement is used, Workers that are already deployed keep their old
CF_API_TOKENsecret.
Where this happens (v1.5.0)
The saved token wins once the install is past the draft stage.
-
A resumed install counts as a "setup draft" only while it has no resources and no API URL: https://github.com/voidzero-dev/void/blob/afeeff6a4d72682f6cfb6c947e9a2c29393c00a6/packages/void/src/cli/platform-setup-draft.ts#L32-L40
-
For any later stage,
configured()prefers the checkpoint value over the environment variable: https://github.com/voidzero-dev/void/blob/afeeff6a4d72682f6cfb6c947e9a2c29393c00a6/packages/void/src/cli/platform-lifecycle.ts#L915 and https://github.com/voidzero-dev/void/blob/afeeff6a4d72682f6cfb6c947e9a2c29393c00a6/packages/void/src/cli/platform-lifecycle.ts#L936-L939 -
The recovery for a rejected token (clear the saved token, then prompt for a replacement) only runs for a draft on a TTY: https://github.com/voidzero-dev/void/blob/afeeff6a4d72682f6cfb6c947e9a2c29393c00a6/packages/void/src/cli/platform-lifecycle.ts#L969-L1043
So a non-draft resume with a revoked saved token fails verification every time, and an environment replacement does not help.
Existing Workers never receive the new token.
- The install path builds its secrets without
updateExistingWorkers, soworkerSecretUpdatesis empty: https://github.com/voidzero-dev/void/blob/afeeff6a4d72682f6cfb6c947e9a2c29393c00a6/packages/void/src/cli/platform-lifecycle.ts#L1154-L1169 and https://github.com/voidzero-dev/void/blob/afeeff6a4d72682f6cfb6c947e9a2c29393c00a6/packages/void/src/cli/platform-installer-secrets.ts#L193-L196 - A Worker whose plan action is not
createcounts as existing: https://github.com/voidzero-dev/void/blob/afeeff6a4d72682f6cfb6c947e9a2c29393c00a6/packages/void/src/cli/platform-install-workers.ts#L274-L281 - An existing Worker only receives secrets listed in
workerSecretUpdates: https://github.com/voidzero-dev/void/blob/afeeff6a4d72682f6cfb6c947e9a2c29393c00a6/packages/void/src/cli/platform-installer-secrets.ts#L518-L553 - Everything else is uploaded as
inheritfrom the active version: https://github.com/voidzero-dev/void/blob/afeeff6a4d72682f6cfb6c947e9a2c29393c00a6/packages/void/src/cli/cf-version-api.ts#L137-L142
So if the old token still verifies, the API and proxy Workers already deployed in the interrupted run keep running with it. Revoking it later breaks app deploys from the platform. Today, only the installed-platform maintenance path passes updateExistingWorkers: true: https://github.com/voidzero-dev/void/blob/afeeff6a4d72682f6cfb6c947e9a2c29393c00a6/packages/void/src/cli/platform-management.ts#L575-L585
#569 made interrupted credential updates resumable on that maintenance path. The install-resume path does not appear to feed a replacement runtime token into the same mechanism.
Synthetic repro
- Run
void platform install --workers-devand interrupt it after the API and proxy Workers are deployed but before it finishes, for example by stopping at a later failing step. - Revoke the runtime token in Cloudflare and create a replacement with the same permissions.
- Run
VOID_PLATFORM_RUNTIME_CLOUDFLARE_API_TOKEN=<replacement> void platform install --resume --name <id>. - Runtime token verification uses the saved (revoked) token and fails.
- Variant: if step 2 does not revoke the old token, the resume completes, but the API and proxy Workers still hold the old token.
Questions
- On a non-draft resume, should an explicit
VOID_PLATFORM_RUNTIME_CLOUDFLARE_API_TOKENwin over the saved checkpoint value, as it already does for drafts? - When the resolved runtime token differs from the saved one, should resume push
CF_API_TOKENto the existing API and proxy Workers through the existingworkerSecretUpdatesand intent mechanism? Or would you prefer that resume refuses and points to a separate command?
I'm happy to open a PR for whichever behaviour you prefer.
Prepared with Claude Code on behalf of @iPLAYCAFE-dev; reviewed by the maintainer of this account.
- 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
- 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 voidzero-dev/void
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
voidzero-dev/void#677 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 30/100
voidzero-dev/void#689 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 52/100
voidzero-dev/void#686 ·
I maintainer di solito rispondono entro 1 giorno
-
`VoidActionError.message` ignores the server's message, though the docs show it to usersForse già presa Una pull request collegata a questa issue è aperta o già unita. Aperta
Difficoltà 3/5 1-2 giorni Idoneità per principianti 52/100
voidzero-dev/void#680 ·
I maintainer di solito rispondono entro 1 giorno
-
`withValidator({ body })` rejects the multipart bodies that `useForm` and `action()` send for filesAperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
voidzero-dev/void#679 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di voidzero-dev/void
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
riverqueue/river#1576 ·
I maintainer di solito rispondono entro 1 giorno
-
[bug] A prompt queued during a run is assessed without its textForse già presa @jwiegley l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
DevMortimer/pi-warden#211 ·
I maintainer di solito rispondono entro 1 giorno
-
enhancement
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 84/100
mattermost/compass-design#191 ·
I maintainer di solito rispondono entro 1 giorno
-
Add unit tests for the organization admin role checkForse già presa @SaffuSafwan l’ha presa oggi. Apertaarea/core good first issue help wanted
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 90/100
elmohq/elmo#1095 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
HorusGoul/trizum#559 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno