Skip to content

No rollback command: rolling a Worker back needs a hand-built deployments create #106

Not planned

Description

@joeblew999

cf version: 1.0.0-beta.5, macOS

What's missing: a way to roll a Worker back. cf cli search "roll back a worker to a previous version" returns nothing relevant (the matches are containers rollouts and radar), and there's no workers rollback or versions deploy.

What works today, by hand:

  1. cf workers deployments list --worker <name> --per-page 100 gives the history, newest first.
  2. Pick the previous deployment's main version.
  3. cf workers deployments create --worker <name> --strategy percentage --versions '[{"version_id":"<old>","percentage":100}]'.

Traffic converged to the old version in about 15 s. It works, but it needs JSON juggling, and it's the command you reach for under pressure.

Proposal: cf workers rollback [--worker <name>] [--version <id>] [--message <text>], defaulting to the Worker in the project config and the previous deployment's main version. It should support --dry-run like the generated commands (the deployments POST, shown before it's sent). AGENTS.md says new commands belong in Forge as overlays, so this may be a Forge overlay over the deployments API.

Found while evaluating cf for a dev workflow: https://github.com/joeblew999/cf-cli-test (findings/lifecycle.md). Related: #68 (no tail).

Activity

  1. gatezh commented on Oct 9, 2026

    @gatezh

    Another use case: rollback from CI. We roll back through a workflow_dispatch job that runs wrangler rollback, and that is the only reason the project would still need wrangler.jsonc next to cloudflare.config.ts after migrating. The hand-built deployments create works, but a CI step needs a few things it doesn't give:

    • Non-interactive by default: --yes handling like wrangler rollback, including Wrangler's "secrets changed since that version" confirmation.
    • The Worker name for a mode from the config (cf workers rollback --mode production), so the job doesn't hard-code <name>-production.
    • A default target: the previous version that served 100% of traffic, which is what wrangler rollback does with no version ID.
    • --message recorded on the deployment, so the reason shows up in the deployments list.
    • --dry-run that prints the target version before anything changes, as proposed above.
  2. workers-devprod commented on Nov 24, 2026

    @workers-devprod
    Collaborator

    Thanks for the suggestion, and for writing up the CI use case too. A Worker rollback command isn't part of cf yet: for now that's done with cf workers deployments create, as you describe. We track feature requests in Discussions, so we've moved this to #761. Please follow and upvote it there.

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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions