Repository navigation
Description
Summary
When void deploy --platform cloudflare stops with deployment-changed just before activation, it leaves its own staging deployment (live@100, new@0) as the Worker's newest deployment. Every later deploy is then refused with "The existing Worker must have one deployed version receiving all traffic", and no Void command clears it. One stale read turned into two hours without deploys for us.
This is related to #891 (lagging Cloudflare lists) but is a different check with a different result: #891's stops leave nothing behind that blocks the next deploy; this one does.
Environment
void1.6.2,@void/deploy-cloudflare1.6.2, framework mode (TanStack Start),void deployfrom GitHub Actions (GitHub-hosted runner)- A Worker with D1, R2, Durable Objects, on an EU account
- Observed on 2026-11-20, 17:59 to 20:08 UTC. The Worker had passed 26 deploys in a row before, and deploys passed again by themselves from 20:19
Observed
Times are UTC.
| Time | Event |
|---|---|
| 17:59 | Void uploads the new version, stages it at 0% beside the live version, readiness passes, then the deploy stops: "another Cloudflare operation superseded this deployment. Void restored triggers for the active version …" |
| 17:59 to 19:50 | The Worker's newest deployment stays live@100, new@0. Five more deploys each stop at once: "The existing Worker must have one deployed version receiving all traffic" |
| 19:50 | We deploy the live version alone at 100% through Cloudflare's API. Deploys get past that check again |
Cloudflare records no other writer on the Worker in that time: no deployment or version exists between Void's own staging deployment and our fix. Read later, the deployments list showed exactly what the check expects. Our logs show which check failed, not what Void read, so "the read came back before the list showed Void's own staging deployment" is an inference. Measured by hand that evening, the deployments list showed a new deployment about 40 s after the write at 19:50 and about 2 s after at 20:04.
Where it comes from
In @void/deploy-cloudflare 1.6.2, dist/index.mjs, around line 1562: after staging the candidate, Void reads the current deployment once (ownerBeforeActivation) and compares it with stagedVersionPercentages(previous.versionId, versionId). On a mismatch it returns:
reason: "deployment-changed",
rollback: "not-needed",
triggerRepair: "succeeded"- There is no retry, so a read that doesn't yet show Void's own write fails the deploy.
triggerRepair: "succeeded"is a constant here: nothing is repaired or undone, but the message says "Void restored triggers for the active version".- Void's own
live@100, new@0deployment is left as the newest. The next deploy's first read (dist/index.mjsaround line 204) requires exactly one version at 100% and refuses anything else. void project rollbackcan't clear it, because it offers only versions other than the active one, and the fix needed is "deploy the active version alone again".
Two messages that say something untrue
- "Void restored triggers for the active version" after this stop, when nothing was restored (above).
- "No version was uploaded; production traffic is unchanged" after the after-upload check failed (
inheritance-source-changed, the case in Cloudflare deploy stops on a lagging Worker version list (inheritance-source-changed, triggers-failed) #891): the version had been uploaded 7 s earlier and was left unused on top.
Proposal
- Before deciding
deployment-changedat this point, retry the read until it shows Void's own staging deployment, with a bounded wait (the same schedule as whatever Cloudflare deploy stops on a lagging Worker version list (inheritance-source-changed, triggers-failed) #891 settles on). A real concurrent writer still fails every retry. - When the stop is decided anyway, undo Void's own 0% staging deployment if it is still the newest, by deploying the previous version alone again. If that isn't safe, say plainly that the staging deployment was left and how to clear it.
- Let a deploy that finds exactly
live@100, candidate@0, where the candidate is an unactivated Void upload, either recover or name the command that does. Today the only way out is Cloudflare's dashboard or API. - Fix the two messages.
Happy to share more timings if useful.
Metadata
Metadata
Assignees
Labels
Type
Fields
Priority
Activity
hyfdev commentedon Nov 27, 2026
With #927, a deploy that stops before activation removes its 0% staging when a fresh read still shows that exact staging deployment.
When it can't confirm that, it leaves the staging in place and says so.
A Worker stuck at
live@100, candidate@0, from 1.6.2 or from that case, still refuses every deploy, and no Void command clears it.I tried clearing it with
void project rollback <live>, but that isn't safe enough:Proposed solution
A cleanup-only form that names the stuck deployment by its ID:
It deploys that deployment's live version alone at 100% only when
<deployment-id>is still the newest deployment and splits traffic exactly 100/0. Otherwise it refuses, with no fallback to an ordinary rollback.The deploy refusal would print this command with the ID, after asking the user to confirm in the Cloudflare dashboard that the 0% version is the one the failed deploy uploaded.
A lagging list can still hide a deploy from the last minute or so, and this command can't rule that out; that's why it asks for the dashboard check first.
I can take this on if this command shape works.