Skip to content

deploy: offer the previous release as a new deployment preview - #187

Open
teddashh wants to merge 1 commit into
feat/deploy-preview-current-versionfrom
feat/deploy-previous-release
Open

teddashh wants to merge 1 commit into
feat/deploy-preview-current-versionfrom
feat/deploy-previous-release

Conversation

@teddashh

Copy link
Copy Markdown
Collaborator

Stacked on #186. Merge #186 first; this PR then retargets to main.

What

Deployment detail now names the previous release: the most recent earlier deployment on the same channel and resource that succeeded on at least one target and ran a different version.

  • Web: an admin form opens the normal create preview with that version and sha256 (batch 1, 600 s timeout). If the artifact is not on the Hub, the page links to the fetch view instead.
  • CLI: deployment show prints the exact deployment preview … command, or the artifact fetch … command when the artifact is missing.
  • API: DeploymentReadSchemaVersion 3 → 4, with a new previous_release field (nullable). The strict client checks identifiers and the sha256, and rejects a previous release that is this same deployment or the same version.

Rolling back is an ordinary new deployment. It goes through the same preview, digest, canary, verification, and audit as any other, so no separate rollback path exists. deploymentActionEligibility now receives the deployment list from its callers, so it is read once.

Tests

  • operator: picks the latest earlier succeeded different-version release on the channel. Four mutations (channel, succeeded, version, ordering) each turn it red.
  • web: the detail page renders the preview form and the fetch link.
  • CLI: detail text includes the next-step command.
  • client: three poisoned previous_release cases are rejected and a valid one is accepted.
  • forbiddenInterfaceCopy now also blocks the old "There is no automatic fleet rollback" sentence.
  • Gate: GATE_RESULT=green (56 Go packages, OPS ok).

🤖 Generated with Claude Code

…s a create preview

Deployment detail now carries previous_release: the latest earlier
deployment on the same channel and resource that has a Hub-succeeded job and
a different version, with its artifact digest and whether the artifact is
still in the Hub catalog. Returning to it is an ordinary create preview with
those inputs, so it goes through the same canary and verification. Detail
schema_version moves to 4.

Web shows a Previous release block (create form for admins, fetch link when
the artifact is gone). CLI `deployment show` prints the exact preview or
fetch command. The rollout status MCP view includes previous_release. The
rollout text no longer says there is no rollback, and the copy guard keeps
that sentence out.

Detail and action previews read the deployment list once and share it
between eligibility and the previous release.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
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.

1 participant