Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions crates/edgezero-cli/src/args.rs
Original file line number Diff line number Diff line change
Expand Up @@ -381,8 +381,9 @@ pub struct RollbackArgs {
/// Production only: the version to re-activate. Fastly exposes no
/// metadata to tell a previously-live version from a staged one, so
/// the rollback target CANNOT be inferred; it is captured before the
/// deploy that superseded it (see `deploy`'s `previous-version`) and
/// passed here. Required for a production rollback; ignored for staging.
/// deploy that superseded it (`active-version`, or the deploy-fastly

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Parenthetical lists two different kinds of thing: (`active-version`, or the deploy-fastly action's `previous-version` output) joins a command and an output with one comma, so the first item reads as if it were also an output name. This renders verbatim in --help.

Suggested:

/// deploy that superseded it (run `active-version` before that deploy,
/// or wire the deploy-fastly action's `previous-version` output) and
/// passed here. Required for a production rollback; ignored for staging.

/// action's `previous-version` output) and passed here. Required for
/// a production rollback; ignored for staging.
#[arg(long)]
pub rollback_to: Option<String>,
/// Platform service id to roll back. Required.
Expand Down
5 changes: 3 additions & 2 deletions crates/edgezero-cli/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -516,8 +516,9 @@ pub fn run_rollback(args: &RollbackArgs) -> Result<(), String> {
return Err(
"a production rollback requires --rollback-to (the version to re-activate). Fastly \
exposes no metadata to infer it, so it must be captured before the deploy that \
superseded it -- use `deploy`'s `previous-version` output. Pass --staging to \
deactivate a staged version instead."
superseded it -- run `active-version` before deploying (the deploy-fastly GitHub \

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Names the command but not its output key: active-version prints version=<N>, not previous-version=<N>. An operator scripting the capture runs it, gets a version= line, and has to infer that this is the value to pass to --rollback-to later. Naming the key closes that gap:

superseded it -- run `active-version` (it prints `version=<N>`) before deploying, \

action does this and exposes it as its `previous-version` output). Pass --staging \
to deactivate a staged version instead."

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤔 No forward path for the operator reading this: "run active-version before deploying" describes what should already have happened. Whoever reads this string is mid-incident, past that point, with no captured target — the hint is now true but still leaves them stuck.

The guide covers manual recovery (deploy-github-actions.md L465-472) but the error does not point anywhere. One more clause would:

... exposing it as its `previous-version` output. If it was never captured, choose
the target from the service's version history -- Fastly cannot identify it for you.
Pass --staging to deactivate a staged version instead.

Non-blocking — the PR as written is already strictly better than what it replaces.

.to_owned(),
);
}
Expand Down
Loading