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.
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 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.
How do you version and label releases so that hotfixes, patch releases and feature releases are distinguishable, release candidates map cleanly to environments, and any production build can be traced back to the exact source and approvals?
Sample Answer
The idea in plain words
Give every production build one version number that says what kind of change it is, one immutable artifact that is promoted unchanged from environment to environment, and one release record that links the version to the exact source commit, the build, and the approvals. The version answers "what kind of release is this"; the record answers "where did it come from and who approved it". Semantic versioning (SemVer) provides the first: a version is MAJOR.MINOR.PATCH, where MAJOR changes when compatibility breaks, MINOR when backward-compatible features are added, and PATCH for backward-compatible fixes.
For a DevOps or software engineer, the core is the version rules, the release-candidate flow and the traceability chain. The data-artifacts section near the end matters when a release also changes tables or models.
Labelling: feature, patch and hotfix releases
| Release kind | Version change | Example | Source |
|---|---|---|---|
| Feature release | MINOR bump | 2.4.0 to 2.5.0 | Main branch |
| Patch release (planned fix bundle) | PATCH bump | 2.4.0 to 2.4.1 | Release branch for 2.4 (a branch that keeps receiving fixes for the 2.4 line only) |
| Hotfix (urgent production fix) | PATCH bump, flagged in the release record as a hotfix | 2.4.1 to 2.4.2 | A short hotfix branch cut from the production tag |
| Breaking change | MAJOR bump | 2.x to 3.0.0 | Main branch, with a migration plan |
The version tells consumers the compatibility risk; it does not by itself say "urgent". Urgency (hotfix) lives in the release record and, if you want it visible, in the tag message. Keep the number's meaning simple.
Hotfix flow: land the fix on the main branch first whenever you can, cut a short hotfix branch from the tag that is in production, copy the fix onto it, tag, deploy, then merge the hotfix branch into the release branch for 2.4 so later patches include it. If main has moved so far that the fix cannot be written there first, write it on the hotfix branch and port it to main straight away, so the next feature release does not reintroduce the bug.
# start a hotfix from the exact production version
git switch -c hotfix/2.4.2 v2.4.1
# apply the fix commit that already exists on main, recording where it came from
git cherry-pick -x 9f3c2ab
# create an annotated, signed tag for the new version
git tag -a -s v2.4.2 -m "Hotfix: correct tax rounding on refunds"
# publish the tag
git push origin hotfix/2.4.2 v2.4.2
Flag explanations: git switch -c <branch> <start> creates a branch starting at the given tag; git cherry-pick -x copies a commit and appends the original commit id to the message, so the two copies can be matched later; git tag -a makes an annotated tag (a tag with its own message, author and date); -s signs it with your key, so git verify-tag v2.4.2 can later confirm who created it. Signing needs a key configured first (a GPG key, or an SSH key if git is set to sign with SSH); without one, git stops with an error such as gpg failed to sign the data, and you either set up a key or drop -s and use another way to prove who tagged. The commit id above is a placeholder.
Release candidates map to environments
A release candidate (RC) is a build that might become the release. SemVer allows a pre-release suffix, so RC builds are 2.5.0-rc.1, 2.5.0-rc.2, and so on, and these sort before 2.5.0. The principle is build once, promote the same artifact: do not rebuild for each environment, because a rebuild can differ from what you tested.
| Stage | Version label | Environment | What happens |
|---|---|---|---|
| RC built | 2.5.0-rc.1 | Test | Automated suites |
| Fix needed, new RC | 2.5.0-rc.2 | Staging | Regression, acceptance, performance |
| Approved | 2.5.0 | Production | The same artifact (same content digest) as rc.2 gets the final tag; nothing is rebuilt |
| Urgent fix | 2.5.1 | Production | Hotfix flow above |
The final git tag v2.5.0 points at the same commit as the rc.2 tag, which is how "2.5.0 is the rc.2 build" is true: there is one build, two labels. The bytes are unchanged, so a version string compiled into the build may still read rc.2; the release record maps the digest to 2.5.0, which is why the record, not the embedded string, is the authority. If you want the running program to report 2.5.0, have the deploy tool inject the version at start-up (for example as an environment variable taken from the release record) instead of compiling it in. Do not add a label or annotation to the image at promotion: that changes the image and therefore its digest. Promotion adds only a registry tag and a release-record entry, and both point at the same digest.
SemVer build metadata (the part after a plus sign, such as +build.482) is ignored when comparing versions, so use it for information only, for example the build number.
Traceability: from a running build to source and approvals
Record these links at build time, not afterwards:
- Artifact metadata. Stamp the artifact with its version, the source repository and the exact commit. The OCI (Open Container Initiative) image specification, the open standard for container image format, defines standard annotation keys for container images, including
org.opencontainers.image.version,org.opencontainers.image.revisionandorg.opencontainers.image.source. Use the content digest (a hash of the artifact's bytes, written likesha256:followed by 64 hexadecimal characters) as the identity, not a tag, because a tag can be moved and a digest cannot. - Signed tag. The git tag points at the commit; signing it (with the key described above) proves who created it.
- Release record. One entry per version holding: version, commit, artifact digest, build run link, the pull requests included, the test results, who approved at each gate, the change ticket id, and when it reached each environment.
- Deployment events. The deploy tool writes "version X (digest Y) deployed to environment Z at time T by W" to a log.
Illustrative trace (all identifiers are placeholders): an alert fires in production. The running instance reports digest sha256:ab12.... The artifact's revision label gives the commit; git describe --tags on that commit prints v2.5.0 (when two annotated tags sit on one commit, describe prints the most recently created, here v2.5.0, tagged after rc.2; a lightweight tag would lose to an annotated one, another reason to use annotated tags); the release record lists the 14 pull requests in 2.5.0, the approvers for the staging gate, and the change ticket (the record in your change-management system that authorised the deploy). git describe --tags <commit> prints the nearest tag at or before the commit: exactly v2.5.0 if the commit is the tagged one, or something like v2.5.0-3-g1a2b3c4 if it is 3 commits after the tag (g plus an abbreviated commit id). In one lookup chain you go from a running process to the people who approved it.
Data artifacts: datasets and tables
Code versions are not enough when a release changes data products. A model or a report is a function of code and data, so its release metadata should record:
- the code version (the git tag and commit);
- the input dataset versions: a snapshot identifier or content hash for each input. A snapshot of a table is a frozen, read-only view of its contents at one moment, identified by an id, so you can read exactly the data as it was then (many table formats expose snapshot identifiers; where yours does not, record a hash or the extract timestamp);
- the output dataset version and where it is published;
- the schema version, kept separate from the code version, with its own compatibility rule;
- lineage (the record of which inputs and which job run produced an output), so that you can answer "what depended on this table".
An example label for a table: orders_daily produced by etl v2.5.0 from inputs orders_raw@snap-2026-10-29, fx_rates@snap-2026-10-29. A bad batch can then be found and reprocessed by lineage: find every output built from the faulty input snapshot.
Common mistakes
- Rebuilding for production, so the thing in production was never tested.
- Using
latestor branch names as the deployed identity. - Hotfixes that never get merged back and reappear as regressions.
- Recording approvals in chat only, so the audit trail cannot be rebuilt.
- Versioning code but not the data it produced.
Draft a branching and release policy that avoids long-lived branches but still supports emergency hotfixes. What rules would govern what lands on a release branch, who approves a hotfix, and how fixes are merged back?
Sample Answer
The idea in plain words
A long-lived branch is a copy of the code that drifts away from the main line for weeks or months, so every merge becomes a painful, risky event. The way out is trunk-based development: everyone merges small changes into one main branch (the trunk) at least daily, the trunk is always releasable, and unfinished work is hidden behind feature flags (switches that turn code paths on or off without a new deployment). A release branch is then not a place where work happens. It is a short-lived pin on a known-good commit, used only when you must fix a released version without picking up newer work from main. A hotfix is an urgent fix to production that skips the normal queue.
The single rule that keeps this safe is main first: a fix lands on main, and only then is a copy of it (a cherry-pick, meaning one commit re-applied on another branch) placed on the release branch. If every fix flows main to release, there is nothing to merge back and the two lines cannot diverge.
The policy, as rules
Branches
mainis protected (a setting on the code host that blocks direct pushes and force pushes): pull requests (PRs) only, required automated checks (continuous integration, CI) must pass, at least one approval from a code owner (a person or team listed as responsible for that part of the code, whose review is required for changes to it).- Feature branches live at most 2 working days. Anything longer is split up or put behind a flag. (The 2-day figure is a team default to tune, not a standard.)
- A release branch
release/MAJOR.MINOR(for examplerelease/2.7) is cut from a specific commit on main only when a release needs stabilising or a version must be supported after main moves on. It is deleted when that version leaves support. For a hosted service deployed from main many times a day, you may need no release branches at all, only tags: to release or hotfix you tag the exact commit on main you deployed, and if you need to hotfix an older deploy you can branch from that tag at that moment. - Versions follow semantic versioning: MAJOR.MINOR.PATCH, where MAJOR means a breaking change, MINOR a backward-compatible feature, PATCH a backward-compatible fix. Every release and hotfix is a signed tag (a tag is a permanent label on one commit, such as
v2.7.1; signing it proves who created it and needs a signing key set up first, otherwise git stops with an error such asgpg failed to sign the data); a hotfix increments PATCH only (2.7.0 to 2.7.1).
What may land on a release branch
- Only fixes for a defect that blocks the release or harms production: data loss or corruption, security vulnerability, outage, or a legal or contractual breach. Never features, refactors or dependency upgrades unrelated to the fix.
- Only commits that already exist on main (cherry-picked with
git cherry-pick -x, where-xappends a "cherry picked from commit ..." line so the origin is recorded). Exception: if the code on main has changed so much that the fix cannot be written there first, the fix is written on the release branch and a PR to main is opened in the same hour, with a ticket that blocks closing the incident. - Each release-branch PR states which defect it fixes, the risk, and how it was tested, including a regression test (a test that fails before the fix and passes after, so the bug cannot quietly return).
Who approves a hotfix
- Author: any engineer on the owning team.
- Approver: one code owner of the affected area who did not write the change. For a declared incident, the incident commander (the person coordinating the response) or the on-call lead may approve in place of the code owner when no code owner can respond within 15 minutes. That approval is reviewed afterwards by a code owner within 1 business day.
- Automated checks (build, unit tests, the tests covering the fix, a security scan) still run. Only the human wait is shortened, not the machine checks.
How fixes are merged back
- Normal path: nothing to merge, because the fix was on main first.
- Exception path: the PR from the release fix to main is opened within the hour (as above) and merged within 24 hours. A scheduled check runs
git cherry main release/2.7. Read the command as "upstream first, then the branch to inspect": it lists the commits that are onrelease/2.7and not onmain, and for each one asks whether main already has an equivalent change. Patch equivalence means git compares the content of the change (the lines added and removed), not the commit id, so a cherry-picked copy with a different id still counts as the same change. A line starting with+means a change that is on the release branch but has no equivalent on main; a line starting with-means main already has an equivalent. Git prints the full 40-character commit id after the sign; the examples here shorten it. Any+line older than 24 hours pages the owning team.
Worked scenario (assumed numbers, not a real system)
Assume version 2.7.0 was cut from main at commit a1c3 on a Monday and shipped Tuesday. Main has since gained 40 commits.
- Thursday 10:00: a bug corrupts exported invoices. The owning team confirms it is a data-integrity defect, so it qualifies for the release branch.
- 10:40: the author opens a PR to main with the fix (commit
f9d2) and a regression test. A code owner approves at 11:05, CI passes, it merges. - 11:15:
git switch release/2.7thengit cherry-pick -x f9d2creates commitc7e0on the release branch. Flags:switchchanges branch;-xrecords the origin. - 11:25: a release-branch PR runs CI and the release test suite, a code owner approves, and the tag
v2.7.1is created withgit tag -s v2.7.1 -m "Fix invoice export corruption"(-ssigns the tag with the releaser's key, which must already be configured as described above;-msets the message). - 11:40: v2.7.1 is deployed.
git branch -r --contains f9d2confirms the fix is reachable fromorigin/main;git cherry main release/2.7prints- c7e0, the minus sign meaning an equivalent patch already exists on main. Nothing is left to merge back.
Total time from diagnosis to deploy in this sketch is 100 minutes (10:00 to 11:40), and the only human gates were one code-owner approval on main and one on the release branch.
Judgment and what would change it
I would adopt trunk-based development with tags and flags for a continuously deployed service, and add short release branches only for versions customers run themselves (packaged or on-premise software), where you cannot force every customer onto the latest. The cost of release branches is carrying fixes to more than one place; the main-first rule keeps that cost to a cherry-pick. Measures that show the policy works: age of every release branch, count of + lines from git cherry, time from hotfix approval to deploy, and the share of hotfixes that needed the exception path (a high share means main is too unstable to take fixes first).
Common mistakes
- Fixing on the release branch first "because it is faster" and forgetting main, so the bug returns in the next release.
- Letting release branches accept "just one small feature", which turns them back into long-lived branches.
- Merging the whole release branch back into main instead of cherry-picking, which drags unrelated release-only commits along.
- Giving hotfixes no after-the-fact review, so the emergency path becomes the normal path.
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.
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.