Skip to main content

Release and Rollback Clinic

The clinic is where you break prod on purpose, roll it back under a timer, and ship a real migration.

Retrieval Prompts

  1. State the expand-contract migration pattern in two sentences.
  2. State three rollback triggers that you would act on without discussion.
  3. State why a feature flag does not replace a rollback plan.
  4. State the three smoke-test checks for a capstone.
  5. State the rule for when expand-contract is required vs when additive-only is safe.

Compare and Distinguish

Separate these pairs clearly:

  • expand migration vs contract migration
  • rollback vs roll-forward
  • release toggle vs permanent config switch
  • liveness check vs readiness check

Common Mistake Check

For each statement, identify the error:

  1. "My migration tool has --rollback so I can always revert data changes."
  2. "Rolling back is shameful; we always roll forward."
  3. "The smoke test calls /healthz and that's enough."
  4. "I'll leave the feature flag in place indefinitely, just in case."
  5. "I shipped a rename and a contract in the same PR to save a deploy."

Mini Application

Do all four, each with a written artifact:

  1. Rollback rehearsal. Deliberately deploy a known-bad image to staging (or to prod during an agreed quiet hour). Time the rollback. Write library/raw/rollback-rehearsals/001.md with timestamps to the minute, the trigger used, and the command that restored service.
  2. Expand-contract migration. Pick one non-additive schema change. Ship the expand half in one release with up+down SQL committed. Ship the contract half in a later release. Commit library/raw/migrations/<id>.md with one paragraph on what the overlap window protects.
  3. Smoke test suite. Commit scripts/smoke.sh with the three checks from the concept page and wire it into the pipeline's deploy step.
  4. Feature flag lifecycle. Introduce one flag this week. Deploy with it off. Flip it on. Retire it within 2 sprints and delete both branches in a single PR.

Evidence Check

This page is complete only if:

  • library/raw/rollback-rehearsals/001.md exists with a real timer in minutes
  • at least one expand-contract migration pair is visible in git
  • a smoke failure in CI blocks promotion (verified by intentionally breaking an endpoint once)
  • at least one feature flag has been introduced and retired during the semester

If any of those is aspirational, the clinic is not done -- repeat the missing part.