Skip to content

feat(canary): rollback script + release-pipeline doc (Phase 4) - #989

Merged
HongmingWang-Rabbit merged 1 commit into
stagingfrom
feat/canary-rollback-script
Apr 19, 2026
Merged

HongmingWang-Rabbit merged 1 commit into
stagingfrom
feat/canary-rollback-script

Conversation

@HongmingWang-Rabbit

Copy link
Copy Markdown
Contributor

Summary

Last piece of the canary workstream. Adds the manual escape hatch + a single doc to point new ops at.

What's in

`scripts/rollback-latest.sh ` — uses `crane` to retag `:latest` ← `:staging-` for both the platform + tenant images. Pre-checks the target tag exists and verifies the `:latest` digest after the move so a typo can't silently promote the wrong thing. Prod tenants auto-update within 5 min.

`docs/architecture/canary-release.md` — the one-page map of the pipeline: how PR → main → `:staging-` → canary smoke → `:latest` works, how to add a canary tenant, how to roll back, and what the gate explicitly does NOT catch (prod-only data, config drift, cross-tenant bugs).

Why shell-only

No code in CP or workspace-server. Safe to land independently of Phase 1.5/2/3 PRs still in review.

Test plan

  • `shellcheck scripts/rollback-latest.sh` clean
  • `bash -n` passes
  • Real-world: next time canary promotes a bad image, run `scripts/rollback-latest.sh ` and confirm prod heals within one auto-update cycle

🤖 Generated with Claude Code

Closes the canary loop with the escape hatch and a single place to
read about the whole flow.

scripts/rollback-latest.sh <sha>
  uses crane to retag :latest ← :staging-<sha> for BOTH the platform
  and tenant images. Pre-checks the target tag exists and verifies
  the :latest digest after the move so a bad ops typo doesn't
  silently promote the wrong thing. Prod tenants auto-update to the
  rolled-back digest within their 5-min cycle. Exit codes: 0 = both
  retagged, 1 = registry/tag error, 2 = usage error.

docs/architecture/canary-release.md
  The one-page map of the pipeline: how PR → main → staging-<sha> →
  canary smoke → :latest promotion works end-to-end, how to add a
  canary tenant, how to roll back, and what this gate explicitly does
  NOT catch (prod-only data, config drift, cross-tenant bugs).

No code changes in the CP or workspace-server — this PR is shell
+ docs only, so it's safe to land independently of the other Phase
{1,1.5,2,3} PRs still in review.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@HongmingWang-Rabbit
HongmingWang-Rabbit merged commit 4df81c9 into staging Apr 19, 2026
9 checks passed
molecule-ai Bot pushed a commit that referenced this pull request Apr 21, 2026
feat(canary): rollback script + release-pipeline doc (Phase 4)
@HongmingWang-Rabbit
HongmingWang-Rabbit deleted the feat/canary-rollback-script branch April 24, 2026 00:09
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