Launch price: every exam for $29.99 a year, for the first 300 buyers. See the price

CertStreak
Menu

Design a hotfix path plan for responding to high-priority code fixes

A worked example

Single answer

A critical production bug was fixed on the branch hotfix/critical-payment-gateway, which was created from the v2.3.0 release tag. The fix has just been deployed to production from that branch. The branch tip is the commit now running in production.

Requirements:

  • The fix must be included in main so that the next release from main contains it.
  • Branch policies on main block direct pushes, and all changes must reach main through a reviewed pull request.
  • The hotfix branch will be deleted when its work is complete, but the team must be able to check out the exact deployed hotfix code later by its release version.

What should you do next?

Choose one answer
Why

Once the hotfix is live, two things must happen. First, record the deployed code with a release tag. Second, bring the fix back into main through a pull request. The tag lets the team reach the exact hotfix history after the branch is removed, and the pull request gets the fix into main while honouring the branch policies. Skipping the tag loses the named reference, skipping the merge leaves main without the fix, and a direct push breaks the pull-request-only rule.

  • Not correct: Open a pull request from the hotfix branch to main, and delete the branch without tagging it. Without a release tag, nothing names the deployed hotfix version once the branch is deleted. The source relies on the tag to keep referencing that history.
  • Correct: Tag the hotfix branch tip as v2.3.1, then open a pull request from the hotfix branch to main. The source tags the hotfix branch right after the production rollout and then raises a pull request to merge it back into main. The tag keeps the deployed history reachable after the branch is deleted, and the pull request respects the branch policies.
  • Not correct: Tag the hotfix branch tip as v2.3.1, then delete the hotfix branch without merging it. The tag preserves the deployed code, but the fix never reaches main. The bug can recur in the next release from main if that branch still lacks the fix.
  • Not correct: Tag the hotfix branch tip as v2.3.1, then push the hotfix commit directly to main. The branch policies on main block direct pushes and require a reviewed pull request.

Practise this topic until it's automatic.

Ten questions a day, every answer explained, and misses that come back until you beat them.

Start free