Interview Prep/Real-World Interview/Deployments and releases

A release passed every test in staging but broke in production. How do you investigate?

IntermediateScenarioDeployments and releases
Answer

Situation read → "Worked in staging" means staging differs from prod somewhere. The job is to find the difference fast, after mitigating.

What I'd do →

  1. Roll back or toggle off the feature flag to stop the impact.
  2. Diff the environments systematically:
helm get values api -n staging > stg.yaml
helm get values api -n prod > prd.yaml
diff stg.yaml prd.yaml
kubectl get cm,secret -n prod -l app=api -o yaml | grep -v resourceVersion
  1. Check the usual suspects: data volume (a query fine on 10k rows dies on 50M), real traffic patterns, config and feature flags, IAM permissions only granted in staging, network policies, and third-party endpoints pointing at sandboxes.
  2. Pull prod logs and traces for the failing requests and compare with staging.
  3. Add the missing coverage: a prod-like dataset in staging, or a canary step in prod.

Why → Most "prod-only" bugs are config, data scale or permissions, not code.

Interview tip → Admit staging will never equal prod, which is why canaries and feature flags exist.

All Real-World Interview questions Roadmap: Interview readiness

More on Deployments and releases