Prod Squad

How software gets shipped: Git, environments, CI/CD, feature flags, rollbacks

The path from a developer's laptop to real users, and the release tools PMs use to ship faster with less risk.

6 min readAll levels#shipping#git#ci cd#environments
Ask about this lesson
On this page

PMs plan launches, but code reaches users through a pipeline engineers own. Understanding that pipeline (branches, environments, automated tests, deploys, flags and rollbacks) helps you plan realistically, de-risk launches, and talk sensibly about "when can this go out?".

Why interviewers ask this

Execution and technical rounds ask things like "How would you roll out a risky change?" or "Something broke after a release, what do you do?". Interviewers want to hear that you separate deploying code from releasing a feature, use staged rollouts and flags, and know how teams recover from bad releases.

The framework

1. Git and code review

Engineers work on branches, open a pull request, get a teammate's review, and merge into the main branch. Small, frequent changes are safer than giant ones.

2. Environments

  • Local/dev: a developer's machine.
  • Staging: a production-like copy for testing integrations, QA and demos.
  • Production: real users and real data. Staging catches a lot, but not everything: real traffic, real data and real devices still surprise teams.

3. CI/CD

flowchart LR
    C["Code change<br/>pull request"] --> CI["CI: automated tests<br/>and checks"]
    CI -->|pass| ST["Deploy to staging"]
    ST --> QA["QA and sign-off"]
    QA --> P["Deploy to production<br/>flag off"]
    P --> F["Feature flag on<br/>1% then 10% then 100%"]
    F -->|problem| RB["Flag off or roll back"]
  • Continuous Integration: every change automatically builds and runs tests.
  • Continuous Delivery/Deployment: passing changes flow to production automatically or with one click. Teams with good CI/CD deploy many times a day.

4. Feature flags: deploy is not release

A feature flag is a switch around new code. You can deploy code with the flag off, then turn it on for internal staff, then 1%, 10%, 50% and 100% of users, or for specific segments. Flags also power A/B tests, and act as kill switches. The cost: old flags pile up and must be cleaned up.

5. Rollbacks and roll-forwards

If a release causes problems: turn off the flag (seconds), roll back to the previous version (minutes), or ship a quick fix ("roll forward"). Some things can't be rolled back easily, such as database migrations, sent emails and mobile app releases, so they need extra care.

6. Mobile is different

App store review takes time, users update slowly, and you can't force everyone onto a fix. Use server-side flags and remote configuration to control mobile features without a new release.

7. Release rhythm and communication

Many teams follow a release train: web deploys continuously, mobile ships every week or two on a fixed day. Knowing the rhythm lets you plan launch dates, marketing and support readiness around it, and tells you the realistic time to get a fix to users.

Worked example

Question: "We're launching a redesigned checkout to all users. How would you roll it out safely?"

Sample answer:

"Checkout is our money path, so I'd separate deployment from release and expand gradually with clear go/no-go criteria.

Before launch: the new checkout ships behind a feature flag, tested in staging with real payment sandbox accounts, on the main devices and browsers. We agree success and guardrail metrics: checkout conversion (primary), payment errors, p95 latency and support tickets.

Rollout:

  1. Internal employees for a few days (dogfooding).
  2. 1% of users for 24 hours, watching errors and latency closely.
  3. 10%, then 50%, as an A/B test against the old checkout, long enough to see a full weekly cycle.
  4. 100% if conversion is equal or better and guardrails are healthy.

Go/no-go criteria at each step: payment error rate no worse than control, no sev-1 bugs, conversion within the agreed range.

If something goes wrong: turn the flag off. That's instant and it's why we used one. Support has a script, and we have a channel for real-time monitoring during each ramp.

After launch: remove the old checkout code and the flag within a sprint or two, so we don't carry technical debt."

Common mistakes

  • Big-bang launches to 100% of users at once.
  • Treating deploy and release as the same thing.
  • No rollback plan for risky changes.
  • Forgetting irreversible steps like data migrations or emails.
  • Leaving flags in the code forever.

Interviewer tips

What "great" sounds like:

  • "Deploy is not release: the code ships dark behind a flag."
  • "We'd ramp 1%, 10%, 50%, with go/no-go criteria agreed in advance."
  • "The flag is our kill switch: seconds to turn off, versus minutes for a rollback."
  • "The data migration is the irreversible part, so it gets its own plan."
  • "For mobile, we'd use remote config, because we can't force an app update."

Practice questions

Answer one in a mock interview and get graded instantly.

  1. 1.We're launching a redesigned checkout to all users. How would you roll it out safely?

    Practice this →
  2. 2.What's the difference between deploying and releasing a feature, and why does it matter?

    Practice this →
  3. 3.A release caused a spike in errors on Android only. What are your options?

    Practice this →

Finished reading?