Release Management and Change Control Questions
Planning and governing releases: release cadence and trains, release versioning (semantic versioning, tagging, hotfix and release branches), approval gates and sign-off, go/no-go and launch-readiness decisions, release checklists, change freezes, risk-tiered change classification and pre-approved changes, change advisory and emergency-change workflows with audit trails and compliance evidence, release communication, gating releases on reliability budget, and coordinating a release across multiple services or teams, including breaking interface or schema changes with consumer deprecation timelines. The concern is the process and governance of releasing production changes, not how a deployment is executed, how pipelines are built, or how release health is measured after shipping.
A fix requires changing an interface contract that 20 internal services depend on. How do you coordinate the release so consumers are not broken: compatibility approach, deprecation timeline, tracking consumer migration, and finding dependencies nobody documented?
Sample Answer
The idea in plain words
Never change a shared contract in place. Add the new shape beside the old one, move consumers over at their own pace with a deadline, measure who has moved, and remove the old shape only when the data says nobody uses it. This is the expand/contract pattern (also called parallel change): expand the interface to support both old and new, migrate callers, then contract by removing the old. With 20 consumers owned by other teams, the hard parts are not technical: they are knowing who the consumers really are, giving them a believable timeline, and keeping the deadline credible.
A contract here means the agreed shape and meaning of an API, event or schema that other services rely on. For example, the old contract returns {"id": "o-1", "price": 19.99}; the fix needs the new contract {"id": "o-1", "amount": {"value": 19.99, "currency": "USD"}}, where price becomes a nested amount.value. Changing price in place would break every consumer that reads it. A consumer is a service that calls or reads it; the provider owns it.
Step 1: a change proposal and impact analysis
Before writing code, publish a short written proposal (an RFC, a request for comments) in the shared place where all teams look. Contents:
- What changes and why the fix needs it (including whether the old behaviour is a bug that consumers now depend on; see Hyrum's Law below).
- The new contract and the compatibility approach.
- Impact analysis: the list of known consumers (from the registry), the discovered consumers (Step 4), and for each: owner, how they use it, risk level, and expected migration effort.
- For schema migrations that span services: the order of steps (expand the schema, dual-write, backfill, switch reads, stop old writes, contract) and which team does what. In a tiny example with a table of 1,000,000 orders: expand adds a new column
amount_value; dual-write makes every new or changed order write bothpriceandamount_value; backfill copiespriceintoamount_valuefor the 1,000,000 existing rows, in batches of 10,000 (100 batches) so the database is not overloaded; then readers switch toamount_value; then the old writes topricestop; and finally contract dropsprice. - Timeline, rollback plan, and who decides on exceptions.
Review it with the consumer owners, not just the provider team. Hyrum's Law says that with enough users, every observable behaviour of an interface will be depended on by somebody, whatever the documentation says, so "undocumented" is not the same as "unused".
Step 2: choose the compatibility approach
| Approach | Use when | Cost |
|---|---|---|
| Additive change in place (new optional field, tolerant readers: consumers that ignore fields they do not know) | The change can be purely additive | Lowest. Requires consumers to ignore unknown fields |
| Versioned side-by-side (v1 and v2 endpoints, or a new event type) | The meaning or shape changes | You run both for the migration period |
| Compatibility shim (a small adapter in which the provider translates new to old for stragglers) | A few consumers cannot move before the deadline | Extra code that needs its own sunset date |
| Flag per consumer (provider behaves differently by caller identity) | A bug fix changes behaviour | Per-caller state to track and clean up |
My default: versioned side-by-side, with the old version frozen (bug fixes for security only), plus a shim only if a specific consumer has a documented reason. Never make an existing field stricter in place.
Step 3: the deprecation timeline
Illustrative schedule (calendar weeks from the proposal):
| Week | Milestone |
|---|---|
| 0 | Proposal published; consumer owners named |
| 2 | New version live, old version unchanged; migration guide, test environment and example code available |
| 2 to 7 | Migration window; deprecation notices on responses from the old version; weekly burn-down (a count of consumers still to migrate, falling toward zero) shared |
| 8 | Brownout 1: the old version fails for a short, announced period to flush out missed callers |
| 10 | Brownout 2: longer; last chance to find hidden callers |
| 12 | Sunset (the date the old version is switched off): old version removed once the exit criteria below hold |
12 weeks is 84 days. The length should come from the slowest realistic consumer, including any batch job on a long cycle.
Exit criteria for removal (all required): zero calls to the old version from identified consumers for a period that covers the longest known job cycle, every consumer owner confirmed in writing, and the brownouts passed with no surprises. Check that the timeline fits: the longest known cycle is a monthly job (about 30 days), so the zero-call stretch must be at least 30 days. The migration window ends at week 7, which leaves weeks 7 to 12, or 5×7=35 days, with no calls to the old version, longer than 30 days. A monthly job that had not moved would have called the old version at some point in that stretch and been seen, and the brownouts at weeks 8 and 10 fall inside it to flush out the rest. A quarterly job would need a longer timeline or a scheduled test run. A deadline can move only by a written decision from a named person with a new date, so it does not drift.
Step 4: finding dependencies nobody documented
Use several sources, because each misses something:
- Caller identity in telemetry. Require a client identifier on every request (a header or a credential), then count distinct callers in access logs, gateway logs or the service mesh (an infrastructure layer that proxies service-to-service calls and can log each one) over a window long enough to catch monthly and quarter-end jobs.
- Distributed traces (records that follow one request across the services it touches) and network flow logs (records of which host connected to which, and when) to find callers that do not send an identifier.
- Code search across all repositories for the endpoint path, the client library, the event name or the schema field.
- Schema and event registry subscriptions, and database grants for shared tables.
- Ask the teams, and cross-check against a list of owners of batch jobs and dashboards.
- Brownouts, as above. They find the callers that logs missed or that only run rarely.
Worked example (assumed numbers): the registry lists 16 consumers. Ninety days of gateway logs show 20 distinct caller identities, so 4 consumers were undocumented. Two of the 4 are monthly reporting jobs which a 30-day window could have missed, which is why the window matters.
Step 5: track migration
One table, reviewed weekly, with a named owner for each consumer:
| Consumer | Owner | Status | Share of calls on old version | Blocker |
|---|
Two numbers drive it: consumers migrated out of 20, and share of traffic still on the old version. They can disagree: one large consumer can be 80% of traffic while being 1 of 20 services. Report both. Escalate to the consumer's manager when a consumer has made no progress for two review cycles; the escalation is about a deadline, not blame.
Steps 1 to 5 are the core for any engineer who owns or consumes a shared contract. Steps 6 and 7 add what QA owns and what a team with machine-learning or reporting consumers must also do; a backend developer can read them as the questions to ask those teams.
Step 6: QA orchestration for a coordinated expand/contract migration
When a feature needs several services to migrate together, QA owns the test matrix across old and new versions at each step:
- Consumer-driven contract tests: each consumer publishes the expectations it relies on (for example "
amount.valueis a number"); the provider's build runs them. - A version-pair matrix (provider old or new, consumer old or new) in an integration environment, covering the mixed states that will exist during the migration.
- End-to-end checks of the feature after each step, and a data check after backfills (row counts and sampled values agree between old and new).
Step 7: notifying model and data consumers
When shared feature code changes (for example, a function that computes the inputs to machine-learning models, or a shared table's column logic), the consumers are often models and dashboards, and their breakage is silent: a model keeps running but with shifted inputs. Treat them as consumers with owners (the lineage records, the record of which inputs and which job runs produced each output, tell you who they are):
- Version the shared code and publish a change log with the exact definition change.
- Publish a diff of the outputs on a sample before the switch: the distribution of the changed feature, old versus new.
- Notify every model and dashboard owner from the lineage records, and require each to validate (re-evaluate or retrain, as needed) before they move to the new version.
- Keep the old version available in parallel until each owner confirms.
Common mistakes
- Trusting the documented consumer list.
- A 30-day log window for a service with quarterly consumers.
- A deadline with no brownouts and no named person who can extend it.
- Making the migration the consumers' emergency instead of agreeing the timeline with them.
Explain semantic versioning. Give an example of a change that should bump MAJOR, one that bumps MINOR and one that bumps PATCH, and say how version numbers are used by consumers and by release automation.
Sample Answer
The idea in plain words
Semantic versioning (SemVer) is a convention for numbering releases so the number itself tells a consumer how risky an upgrade is. A change is backward compatible when software written against the old version keeps working, unchanged, against the new one, and backward incompatible (a breaking change) when some such software can stop working. A version has three parts, MAJOR.MINOR.PATCH, for example 2.4.1. You raise MAJOR when you make a change that can break existing users, MINOR when you add something backward compatible, and PATCH when you only fix a bug without changing what the software promises. The promise being versioned is called the public contract (the API, the schema, the documented behaviour that others depend on). SemVer is a promise made by people, so it is only as good as your discipline and your checks.
The rules
- MAJOR (X.0.0): a backward-incompatible change to the public contract. Minor and patch reset to 0. Example: version 2.4.1 removes the
getUser(id)function, or renames a field in a JSON response fromuserNametousername. Code written against 2.x can fail against 3.0.0, so the next version is 3.0.0. - MINOR (x.Y.0): new functionality that is backward compatible. Patch resets to 0. Example: 2.4.1 adds an optional
localeparameter or a new endpoint. Existing callers keep working, so the next version is 2.5.0. Marking something deprecated (still working, planned for removal) is also a minor change; removing it later is a major one. - PATCH (x.y.Z): a backward-compatible bug fix with no contract change. Example: 2.4.1 fixes a crash when a list is empty. The next version is 2.4.2.
- Pre-release and build labels.
3.0.0-rc.1is a pre-release (a candidate that sorts before3.0.0);3.0.0+build.5carries build metadata, which is ignored when comparing versions. The order is1.0.0-alpha<1.0.0-beta<1.0.0-rc.1<1.0.0. - Version 0.y.z means initial development: anything may change at any time. Version 1.0.0 is the point where you declare a stable public contract.
- A released version is immutable (it is never edited after publication). If a published 2.4.2 is wrong, publish 2.4.3 instead of editing it.
How consumers use the number
Consumers write a version range in their dependency file so they pick up safe updates automatically and are protected from unsafe ones. In the npm ecosystem, ^2.4.1 means "at least 2.4.1 but below 3.0.0" and ~2.4.1 means "at least 2.4.1 but below 2.5.0". For versions below 1.0.0 the caret is tighter: ^0.2.3 allows only up to below 0.3.0, because in the 0.y.z phase a minor bump may break things. Other ecosystems have their own range syntax, so check the package manager's documentation. A consumer reading a changelog also uses the number as a triage signal: a patch bump can usually be merged after the tests pass, a minor bump deserves a glance, and a major bump needs a reading of the migration notes and a planned upgrade.
How release automation uses the number
Pipelines can compute and enforce versions. A common approach is to write commit messages in a convention such as Conventional Commits, where fix: means patch, feat: means minor, and a ! after the type or a BREAKING CHANGE: footer (a line at the end of the commit message) means major. A release tool then reads the commits since the last tag, picks the highest bump, creates a git tag (a permanent named label attached to one commit, for example v2.5.0), writes the changelog (a human-readable list of what changed in each release) and publishes the package. Teams can also compare the old and new API description in the pipeline (a schema diff, a tool that compares two versions of an interface description and lists what was added, removed or changed, or an API-compatibility checker, a tool that decides whether such differences would break existing callers) and fail the build if a change that removes or alters something is labelled as a minor or a patch. This turns the promise into a checked rule.
Worked example of one cycle: the last tag is v2.4.1. Three commits land: fix: handle empty list, feat: add locale parameter, and feat!: remove getUser. The highest bump among them is major, so the tool produces v3.0.0. If only the first two had landed, the highest is minor and the tool produces v2.5.0. If only the first had landed, it produces v2.4.2.
SemVer for data libraries and feature definitions
SemVer is not limited to services and packages. A shared data transformation library, or a set of feature definitions used by machine learning models and dashboards, also has a public contract, and the contract is its output schema and meaning, not only its function signatures. A feature here is a named input column, such as avg_order_value_30d, that a machine-learning model learns from, and retraining means fitting the model again on newer data. Models trained on a feature expect a certain type, unit and definition, much as a caller expects a function's parameter types; a backend reader can treat this as an API whose response is a table.
- Major: removing or renaming an output column, changing a column's type or unit (seconds to milliseconds), or changing what a feature means. Example:
avg_order_value_30dchanges from including refunded orders to excluding them. The code still runs, but every model trained on the old values now sees a shifted input, so this is a breaking change. - Minor: adding a new output column or a new feature, when consumers read columns by name and ignore ones they do not know. If a consumer validates the exact column set, an added column breaks it, so state in the contract which rule applies.
- Patch: a fix with no change to schema or to values that anyone depends on, such as a faster implementation that produces identical output. A bug fix that changes output values is the awkward case: by strict SemVer it is a patch, but because retrained models and reports will shift, many teams treat a value-changing fix as at least a minor with a clear note, or a major if the change is large. Choose a rule, write it down and apply it consistently.
Pitfalls
Treating the number as marketing (bumping major for a big launch); shipping a breaking change as a minor "just this once", which teaches consumers to distrust ranges; not defining the public contract, so nobody can say what counts as breaking; and relying on the label without a compatibility check. Also remember that a major bump on a library does not remove the old version: maintain the previous major with security fixes for a stated period, otherwise consumers cannot upgrade on their own schedule.
A release requires coordinated changes across three interdependent services. Give a plan covering sequencing, compatibility rules, how to decouple the release from the deploy, and what happens if one service fails its readiness checks.
Sample Answer
The idea in plain words
When three services must change together, the safe plan is to make sure no service ever needs another to be released at the same instant. You do this in two moves. First, order the changes and make each one backward compatible, so the old and new versions of every service can run together. Second, separate deploy (putting new code on servers) from release (turning the new behaviour on for users) with feature flags (runtime switches that enable or disable a code path). Then the three deploys are boring, and the one risky moment, the release, is a switch you can flip back.
Scenario (assumed for illustration): checkout calls pricing, and pricing calls catalog. The change adds a tax-class field: catalog starts providing it, pricing uses it to compute tax, and checkout shows a tax line to the customer.
Sequencing: providers before consumers
A provider is the service whose interface others call; a consumer is the one that calls it. To ship code dark is to deploy it with its feature flag off, so it is on the servers but unused. Deploy in dependency order, providers first:
- Catalog: add the new field to its responses, additive only.
- Pricing: deploy code that reads the field when present, behind a flag that is off.
- Checkout: deploy code that displays the tax line, behind a flag that is off.
- Turn flags on in the same order: pricing first, then checkout.
- Turn flags off in the reverse order if needed: checkout first, then pricing.
Why this order: when a consumer is deployed first, it asks a provider for something the provider cannot yet give. When a provider is deployed first and the change is additive, the old consumers do not notice.
Compatibility rules
- Additive only in the first phase. Additive means the change only adds things. New fields are optional; no field is renamed, removed or made required.
- Tolerant readers. Every consumer ignores fields it does not know and supplies a default when an expected new field is missing. For example, pricing reading a catalog response
{"sku": "A1", "price": 100.00}must not fail becausetax_classis absent, and an old pricing reading{"sku": "A1", "price": 100.00, "tax_class": "reduced"}must not fail on the extra field. - N and N-1 compatibility. Call the newest version of a service N and the one before it N-1. Any version must work with both N and N-1 of its neighbours, because rollbacks and staggered deploys produce mixed versions.
- Contract tests. Automated tests that fail the build if a provider change breaks a consumer's expectations. In the consumer-driven form, each consumer writes down what it relies on (for example "the response has
priceas a number") and the provider's build runs those expectations, so a provider cannot break a consumer by accident. - Removal comes later. Old fields, or the old code path, are deleted in a separate, later release once no consumer uses them. This is the contract step of the expand/contract pattern (expand with new things, migrate, then contract by removing old things).
Mixed-version table for the catalog to pricing link:
| Catalog | Pricing | Works? | Why |
|---|---|---|---|
| old | old | yes | Starting state |
| new | old | yes | The extra field is ignored |
| new | new, flag off | yes | The field is read only when the flag is on |
| old | new, flag on | no | Field missing and the flag demands it |
The fourth row is the hazard. It occurs if catalog is rolled back while pricing's flag is on. Handle it with the flag-off-in-reverse-order step and, in addition, make pricing fall back to a default tax class when the field is absent so a catalog rollback degrades the display rather than breaking checkout.
What the customer actually sees in row 4, with assumed numbers: before this change every item was taxed at a flat 20 percent (the standard class). With the new field, an item with tax_class: "reduced" is taxed at 5 percent. For an item priced 100.00, pricing with the field present returns tax 5.00 and a total of 105.00. If catalog is rolled back, the field is missing, pricing falls back to the standard class, and returns tax 20.00 and a total of 120.00, exactly what the customer would have paid before the feature existed. So the fallback degrades to the old behaviour instead of erroring. Choosing the fallback class equal to the pre-feature rule is what keeps it from inventing a new wrong number.
The same table for the other dependency, pricing to checkout, with the flags as shown:
| Pricing | Checkout | Works? | Why |
|---|---|---|---|
| old | old | yes | Starting state |
| new, flag on (returns a tax line) | old | yes | Old checkout ignores the extra field and shows the total |
| new, flag off | new, flag off | yes | Neither side uses the tax line |
| old | new, flag on | degraded | Checkout expects a tax line, finds none, and as a tolerant reader shows the total without it |
This is why flags go off in the reverse order of turning them on. Checkout is pricing's consumer. If pricing's flag went off first, checkout (flag still on) would keep asking for a tax line that pricing no longer sends, which is row 4 of this second table. Turning checkout off first means it stops asking before pricing stops answering.
Decoupling release from deploy
Each of the three services ships its code dark, with the flag off. Deploy then carries no user-visible change and can be rolled back like any normal deploy. The release is the flag flip, done by percentage (for example 1%, then larger steps) with health checks between steps (looking at error rate and latency before widening the percentage), and can be reversed in seconds without a new deploy. Flags need an owner and a removal date, because stale flags become hidden branches that nobody tests.
When one service fails its readiness checks
A readiness check is an automated test that a newly deployed instance is healthy and can serve traffic (for example, it starts, connects to its dependencies and answers a test request). Decide in advance what each failure means:
| Failing service | What is already deployed | Action |
|---|---|---|
| Catalog | Nothing downstream started | Stop. Roll back or fix catalog. Pricing and checkout are not deployed |
| Pricing | Catalog is deployed (additive, harmless) | Do not deploy checkout. Leave catalog in place. Fix or roll back pricing only |
| Checkout | Catalog and pricing are deployed with flags off | Flags remain off. Users see no change. Fix or roll back checkout only |
| Any service after flags are on | Mixed live behaviour | Turn flags off in reverse order, then investigate |
The rule: a failed readiness check stops the sequence at that point; it does not force a rollback of the earlier services, because the earlier steps are dark and backward compatible. That is the practical payoff of the design. If the plan required all three to roll back together, you would have recreated the coupling you were avoiding.
Define a time limit for the investigation. If the failing service is not healthy within the agreed window, roll that service back and keep the flags off. The release owner, a named person, makes the call.
Common mistakes
- Planning a "big bang" simultaneous deploy and trying to make it atomic.
- Making the new field required in the first step.
- Flipping the flag in the wrong order.
- Having no test for the mixed-version cases above.
- Rolling back only the code after a data-shape change when rows already carry the new shape.
Define the release gate for a production schema change on a shared database or warehouse, such as removing a column. What validations and approvals protect downstream consumers, and how is the change promoted across environments?
Sample Answer
The idea in plain words
Removing a column from a table that other teams read is dangerous for two reasons. It cannot be undone by redeploying code, because the data is gone unless you restore a backup. And you usually cannot see everyone who depends on it: dashboards, scheduled jobs, exports, machine-learning features and analysts' saved queries. A release gate is a set of checks and approvals a change must pass before it moves forward. For a column removal the gate has one job: produce evidence that nobody still needs the column, and make the removal happen in stages so that every stage except the last can be reversed cheaply.
The gate, in the order it runs
1. Classify the change. An automated schema comparison in the pull request detects the removal and labels it breaking (an additive change, such as a new nullable column, meaning one that is allowed to hold no value, does not need this gate; the statement that does need it looks like ALTER TABLE analytics.customers DROP COLUMN legacy_segment;). The label blocks the merge until the steps below are complete.
2. Automated validations.
| Check | What it proves | Pass condition |
|---|---|---|
| Usage in the query log (the database's record of every statement it ran, with who ran it and when; the sample query below shows the idea) | Who reads or writes the column | Zero reads and writes over the look-back window (how far back you search), or every reader listed and migrated. The window must cover the longest consumer cycle: if a report runs once a quarter, the window must be longer than a quarter (about 92 days), so use 100 days or more |
| Lineage (a map of which tables, jobs and dashboards derive from this column) | Downstream objects you cannot see in the query log | Every downstream object has an owner and a migration status |
| Compatibility check against consumers | The consumers' queries still run without the column | Their test queries pass against a copy of the schema with the column removed |
| Dry run (a rehearsal of the real migration) on a production-sized copy | Duration and locking behaviour of the real migration (a lock makes other sessions wait while the change runs) | Completes within the agreed window and does not block writers (sessions trying to insert or update rows) longer than the agreed limit |
| Backup and restore | The undo path exists | A recent snapshot exists and a restore of this table was tested |
| Retention check | The data is not required by law or contract | Compliance confirms the column is not subject to a retention or audit obligation |
3. Approvals. The data owner approves. Each registered consumer owner approves or provides evidence of zero use. A database or platform engineer approves the operational plan. Compliance approves if the retention check found anything. An approval records who, when and what they saw, so the audit trail can answer "who allowed this".
4. Staged removal. This is what makes the change reversible.
| Stage | Action | Undo | What a consumer sees |
|---|---|---|---|
| A | Stop writing the column (change writers; keep the column) | Redeploy the previous writers, then backfill the rows written in the meantime | Old rows keep their values; new rows hold empty values in that column, so a reader that still uses it silently gets stale or empty data. This is why the usage check must already be clean |
| B | Hide it: consumers read through a view (a saved query that presents the table) or a permission set that no longer exposes the column | Restore the previous view or permission | A query that names the column fails with a clear error, which is the signal to find and fix that consumer |
| C | After a quiet period, physically drop the column | Restore from backup, which is slow and may lose data written since the snapshot | Same as stage B; nothing changes for consumers, but the undo is now slow |
5. Promotion across environments. The same versioned migration script is applied in development, then staging, then production. Never edit it between environments, and never apply a hand-typed change in production. Staging holds production-shaped data (masked, meaning personal values are replaced with realistic fake ones) so the dry run is realistic. Each promotion requires the previous environment's checks to pass and a stated soak time (how long the change runs in one environment before the next promotion, so that slow problems such as a weekly job failing have a chance to show). Production runs in a low-traffic window with the owner reachable.
6. Post-deploy verification. After each stage: error count for queries mentioning the column (expected 0), row counts of the table unchanged, freshness of dependent tables (they updated on schedule), success of dependent jobs for one full run of the slowest schedule, dashboards render, and no new support questions. If any fails, the undo for that stage is applied and the change returns to step 2.
7. Documentation and runbooks. Update the data dictionary (the written list of tables and columns and what they mean) and the catalogue entry, the runbook for each affected pipeline (so the on-call engineer is not paged by a failure that the runbook still describes the old way), and the change log. Close the change only when these are done.
Worked example (invented table and numbers)
The change: remove the column legacy_segment from the table analytics.customers. The query log over 100 days shows:
| Consumer | Reads of the column | Action |
|---|---|---|
| Churn dashboard | 1,240 | Migrate to the new segment column |
| Nightly export job | 90 | Migrate the job's query |
| Analysts' ad hoc queries | 7 | Notify; ask each owner to confirm |
| Total | 1,337 | (1,240 + 90 + 7) |
The table above comes from a query like the one below. Run on a tiny invented log (a table with the date, the consumer name and the statement text; real platforms name these differently), it prints:
import sqlite3
from datetime import date, timedelta
today = date(2026, 3, 31)
db = sqlite3.connect(":memory:")
db.execute("CREATE TABLE query_log (logged_at TEXT, consumer TEXT, query_text TEXT)")
def add(consumer, n, text):
for i in range(n):
day = today - timedelta(days=i % 100)
db.execute("INSERT INTO query_log VALUES (?, ?, ?)", (day.isoformat(), consumer, text))
add("churn_dashboard", 1240, "SELECT legacy_segment, COUNT(*) FROM analytics.customers GROUP BY 1")
add("nightly_export", 90, "SELECT id, legacy_segment FROM analytics.customers")
add("analyst_adhoc", 7, "SELECT id FROM analytics.customers WHERE legacy_segment = 'smb'")
add("other_reports", 500, "SELECT id, segment FROM analytics.customers")
cutoff = (today - timedelta(days=100)).isoformat()
query = """
SELECT consumer, COUNT(*) AS reads
FROM query_log
WHERE logged_at > ? AND query_text LIKE '%legacy_segment%'
GROUP BY consumer
ORDER BY reads DESC
"""
total = 0
for consumer, reads in db.execute(query, (cutoff,)):
print(f"{consumer:<16}{reads:>6}")
total += reads
print(f"{'total':<16}{total:>6}")
Output
churn_dashboard 1240
nightly_export 90
analyst_adhoc 7
total 1337
A text search for the column name misses a statement written as SELECT *, which reads the column without naming it. That is why the lineage check and the compatibility check run alongside the log search rather than instead of it.
The gate cannot pass: the usage check shows 1,337 reads, not 0. Work list: migrate two consumers, notify the analysts, then re-run the check.
Timeline once consumers are migrated: day 0 announcement; day 14 stage A (writers stop); day 21 stage B (view hides the column, 14 + 7); day 51 stage C (physical drop after a 30-day quiet period, 21 + 30). During days 21 to 51 any consumer that breaks can be fixed in minutes by restoring the view. The usage check is re-run on day 51 and must still show 0 reads.
Rollback plan, stated explicitly
| Where we are | Rollback |
|---|---|
| Before stage A | Close the change |
| Stage A or B | Restore writers or the view. Existing values are intact; rows written during stage A hold empty values in the column and are backfilled from the source system |
| After stage C | Restore the table from the snapshot taken immediately before the drop; accept loss of rows written after it, or replay them from the source system |
Stage C is the only irreversible step, so it carries the most evidence and the longest wait.
Common mistakes
- Trusting the owner's memory of consumers instead of the query log.
- A look-back window shorter than the slowest consumer's cycle.
- Applying the same script by hand in production, or changing it between environments.
- Dropping the column in the same release that stops writing it.
- Forgetting the runbooks, so the first sign of a missed dependency is a page.
Build a release checklist for a backend service, grouped by pre-merge, pre-release, release and post-release. Explain why each item is there, who signs off on it, and how you keep the checklist from becoming a ritual nobody reads.
Sample Answer
The idea in plain words
A release checklist is a short list of checks a team runs every time it ships, so that the things that went wrong in the past cannot go wrong quietly again. A good item names a specific failure it prevents, has one owner who signs it off (a sign-off is a recorded "I checked this and it is acceptable"), and leaves evidence a person can look at. The danger is the opposite: a long list of ticks nobody reads. The design below groups items into the four phases the question names and then covers how to keep the list alive.
Terms used: a release candidate is the exact build you intend to ship; canary means sending a small share of real traffic to the new version first; rollback means returning production to the previous version; SRE is site reliability engineering, the team that owns production reliability; QA is quality assurance. CI (continuous integration) is a server that builds and tests every change automatically. An immutable artifact is a built package that is never modified after it is built, so the file you tested is the file you ship. A staged rollout sends the new version to a growing share of users in steps, and health gates are automatic checks (error rate and latency within limits) that must pass before the next step. A feature flag is a configuration switch that turns a feature on or off without a deploy. A change freeze is a period in which only emergency deploys are allowed. A go/no-go is a last yes or no decision against the written criteria. A shim is a temporary piece of compatibility code. Smoke tests are a few fast checks that the main user paths work. A regression suite re-runs old tests to catch things that used to work and broke. Exploratory testing is a tester probing the changed areas freely, without a script. API contract tests check that responses keep the agreed shape (field names and types).
The checklist
Assumed service: a backend service behind an API, with a relational database, deployed with a staged rollout. Seventeen items in four phases.
| # | Phase | Item | Why it is there | Sign-off |
|---|---|---|---|---|
| 1 | Pre-merge | Change reviewed by a code owner who is not the author | A second reader catches logic and design errors the author is blind to | Engineering |
| 2 | Pre-merge | Automated tests (unit, integration, API contract) pass as a required check | Stops known regressions from entering the main branch | QA owns the suite; CI enforces |
| 3 | Pre-merge | Dependency and secret scans are clean | Known-vulnerable libraries and leaked credentials are cheap to catch here and costly later | Security |
| 4 | Pre-merge | Any database or config change works with both the old and the new code | During a rollout, old and new versions run side by side, and a rollback puts the old code against the new schema | Engineering |
| 5 | Pre-release | Release candidate built once, versioned, stored as an immutable artifact | What you tested must be exactly what you ship, and it must be traceable | Engineering |
| 6 | Pre-release | Regression suite plus targeted exploratory testing of the changed areas on the release candidate in staging | Automated tests only cover what someone thought to write | QA |
| 7 | Pre-release | Behaviour matches the agreed acceptance criteria; release notes drafted | Confirms we built what was asked and that support can explain it | Product |
| 8 | Pre-release | Written rollback plan, including what happens to data written by the new version | Rollback of code does not undo data changes | SRE |
| 9 | Pre-release | Dashboards and alerts cover the new code paths; on-call engineer briefed | You cannot react to what you cannot see | SRE |
| 10 | Release | No change freeze, no conflicting deploy, on-call staffed | Avoids shipping into a window where nobody can respond | SRE |
| 11 | Release | Staged rollout with automated health gates (error rate, latency) at each step | Limits the number of customers hit by a bad release | SRE |
| 12 | Release | Release owner gives a final go/no-go just before the deploy | One named person confirms items 1 to 11 are really done | Release owner |
| 13 | Release | Running version, flags and config match the release candidate | Catches a wrong artifact or a missed flag | Engineering |
| 14 | Post-release | Watch window: named signals reviewed for an agreed period | Some failures appear only after traffic ramps up | SRE |
| 15 | Post-release | Production smoke tests on the critical user paths | Confirms the main journeys work in the real environment | QA |
| 16 | Post-release | Release notes published; release record updated with version, time and approvals | Support, product and auditors need the record | Product |
| 17 | Post-release | Temporary flags, shims and old migration steps scheduled for removal | Leftover scaffolding becomes the next incident | Engineering |
Item 4 in a tiny example. Say a release adds an optional nickname column to a users table. Release A adds the column as nullable (allowed to be empty) while no code reads it: the old code ignores the column, so it keeps working, and a rollback to the old code is harmless. Release B starts writing and reading nickname. Making the column required, or renaming or dropping a column the old code reads, in the same release would break the old code during the staged rollout (old and new versions run together) and again after a rollback. That is the failure item 4 prevents.
If a team could only start with five items, start with 2 (automated tests as a required check), 4 (changes that work with old and new code), 8 (a rollback plan), 11 (staged rollout with health gates) and 14 (a watch window). They are the ones that stop a bad change from spreading and shorten recovery; the rest raise confidence and traceability.
Count check: the phases hold 4, 5, 4 and 4 items, which sums to 17. Sign-off counts: Engineering 5 (items 1, 4, 5, 13, 17), QA 3 (items 2, 6, 15), Product 2 (items 7, 16), Security 1 (item 3), SRE 5 (items 8, 9, 10, 11, 14), release owner 1 (item 12). That is 5 + 3 + 2 + 1 + 5 + 1 = 17.
Sign-off for a minor, backward-compatible release
A minor release adds behaviour without breaking existing callers (for example, an optional new field in an API response). The usual sign-off groups (engineering, QA, product, security, SRE) do not all need to do equal work:
- Engineering signs the code review, the build and the flag/config match.
- QA signs the regression and smoke results. Because the change is additive, the regression run is the key evidence, and the new-field tests are the targeted part.
- Product signs acceptance and the release notes. It does not need to approve the rollout steps.
- Security signs through the automated scan. A human review is triggered only by a defined condition: a change to authentication or authorisation, new personal-data handling, or a new class of dependency.
- SRE signs the rollback plan, monitoring and the staged rollout. For a purely additive change with a flag, the rollback plan can be one line: turn the flag off.
The rule is that sign-off effort scales with risk, and the checklist says which condition raises it.
Keeping the checklist from becoming a ritual
- Every item cites the failure it came from. If nobody can say what goes wrong without it, delete it.
- Automate what a machine can check, and enforce it in the pipeline. Items 2, 3, 5, 11 and 13 can be gates, not ticks.
- Require evidence, not a tick. Each sign-off links to the test run, the dashboard or the approval, so a spot check can compare the claim with the proof.
- Tier by risk. A minor additive release uses a lighter path than a change that touches a database migration or payments. One checklist for everything trains people to skim.
- Prune and grow on a schedule. Review the list after every incident and on a regular cadence. An item that has not failed or changed a decision in a long stretch is a candidate to automate or remove; a new failure adds one item.
- Keep it short enough to finish. If completing it takes longer than people will tolerate, the pressure will turn it into ticking without checking.
Common mistakes
- A checklist with 60 items and no owners.
- Sign-offs that are really "I was told it was fine".
- Treating a green checklist as proof of safety. It records that known checks were done; it does not find unknown problems, which is why the staged rollout and watch window exist.
Unlock Full Question Bank
Get access to all 7 Release Management and Change Control interview questions and detailed answers.
Sign in to ContinueJoin thousands of developers preparing for their dream job.