Interview Prep/Real-World Interview/Deployments and releases

How do you make sure a deploy is safe to roll back?

IntermediateScenarioDeployments and releases
Answer

Situation read → Rollback safety is designed in before release, not discovered during an incident.

What I'd do →

  1. Immutable, versioned artifacts: images tagged with the Git SHA and referenced by digest, so "previous version" is exact.
  2. Config versioned alongside code (Helm values in Git, GitOps), so rolling back the app also rolls back its config.
  3. DB changes follow expand-and-contract: the new schema works with the old code, so rolling back code is always safe.
  4. Feature flags for risky behaviour, so "rollback" can be a toggle.
  5. Test the rollback path: run helm rollback or the Argo revert in staging as part of release.
helm history api -n staging
helm rollback api 41 -n staging --wait
  1. Message and cache format changes must be readable by both versions.

Why → A rollback that has never been tested is a hope, not a plan.

Interview tip → Name expand-and-contract explicitly.

All Real-World Interview questions Roadmap: Interview readiness

More on Deployments and releases