Fix rollback hint to reference a capture route that exists - #352
Open
aram356 wants to merge 1 commit into
Open
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Addresses #350. The
run_rollbackmissing-target error told operators to usedeploy'sprevious-versionoutput, but no such output exists: the CLI's production deploy emits onlyversion=<N>.previous-versionis produced one layer up, by thedeploy-fastlyGitHub action'scapture-previous.sh, which runsactive-versionbefore deploying. An operator following the hint mid-incident found nothing to use.Change
Reword the hint in
run_rollbackand the matching--rollback-todoc comment inRollbackArgsto name the capture routes that actually exist: runactive-versionbefore deploying, or wire thedeploy-fastlyaction'sprevious-versionoutput. Two strings, no behavior change. The docs site already attributesprevious-versionto the action correctly, so it needs no edit.Why not option 1 (emit
previous-versionfrom 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
deploycommand 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 -- --checkpassescargo clippy -p edgezero-cli --all-targets --all-features -- -D warningspassescargo test -p edgezero-clipassesgit grep previous-version crates/shows only the corrected references; no test pins the old hint textCloses #350