Skip to content

Cloudflare deploy: a deployment-changed stop before activation leaves Void's 0% deployment, and every later deploy is refused #895

Open

Description

@davidgustys

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

  • void 1.6.2, @void/deploy-cloudflare 1.6.2, framework mode (TanStack Start), void deploy from 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@0 deployment is left as the newest. The next deploy's first read (dist/index.mjs around line 204) requires exactly one version at 100% and refuses anything else.
  • void project rollback can'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

Proposal

  1. Before deciding deployment-changed at 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.
  2. 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.
  3. 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.
  4. Fix the two messages.

Happy to share more timings if useful.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions