Skip to content

Fix rollback hint to reference a capture route that exists - #352

Open
aram356 wants to merge 1 commit into
mainfrom
fix-rollback-hint-previous-version
Open

Fix rollback hint to reference a capture route that exists#352
aram356 wants to merge 1 commit into
mainfrom
fix-rollback-hint-previous-version

Conversation

@aram356

@aram356 aram356 commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

Problem

Addresses #350. The run_rollback missing-target error told operators to use deploy's previous-version output, but no such output exists: the CLI's production deploy emits only version=<N>. previous-version is produced one layer up, by the deploy-fastly GitHub action's capture-previous.sh, which runs active-version before deploying. An operator following the hint mid-incident found nothing to use.

Change

Reword the hint in run_rollback and the matching --rollback-to doc comment in RollbackArgs to name the capture routes that actually exist: run active-version before deploying, or wire the deploy-fastly action's previous-version output. Two strings, no behavior change. The docs site already attributes previous-version to the action correctly, so it needs no edit.

Why not option 1 (emit previous-version from the CLI deploy)

The production deploy resolves its version from the deploy command's own output first, with the Fastly API only as a fallback, deliberately so manifest deploy command overrides (including test fixtures with dummy credentials) work without API access. Capturing the previous version can only happen via a pre-deploy API call, so option 1 either makes that call mandatory (breaking the override path and adding a new failure mode to every production deploy) or tolerates capture failure (emitting a line scripts cannot rely on, which is worse than no line). The action layer already captures the target fail-closed at the right place; the CLI hint just needs to tell the truth.

Verification

  • cargo fmt -p edgezero-cli -- --check passes
  • cargo clippy -p edgezero-cli --all-targets --all-features -- -D warnings passes
  • cargo test -p edgezero-cli passes
  • git grep previous-version crates/ shows only the corrected references; no test pins the old hint text

Closes #350

The run_rollback missing-target error told operators to use `deploy`'s
`previous-version` output, but the CLI's production deploy emits only
`version=<N>` -- `previous-version` exists only as the deploy-fastly
GitHub action's output, captured by running `active-version` before the
deploy. An operator following the hint mid-incident found nothing to use.

Reword the hint (and the matching --rollback-to doc comment) to name the
real capture routes: run `active-version` before deploying, or wire the
deploy-fastly action's `previous-version` output.

Emitting `previous-version` from the CLI deploy itself was considered
and rejected: it would make a pre-deploy Fastly API call mandatory,
breaking the documented output-parsing path that works under manifest
command overrides with dummy credentials, and a warn-and-continue
capture would produce a line scripts cannot rely on. The action layer
already captures the target fail-closed at the right place.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Rollback error hint references a deploy previous-version output that does not exist

1 participant