AZ-400 Question 167
Single answerYour enterprise e-commerce platform is experiencing a severe bug that impacts checkout for all customers. The development team has already released a new version, but this bug requires an immediate, high-priority fix. You need to plan a hotfix path that minimizes disruption to ongoing development and ensures rapid, stable deployment. Which approach should you use?
- A
Create a short-lived hotfix branch from the current release branch, implement the fix, run targeted tests, then merge and release once validated.
- B
Roll back entirely to the last stable version and wait for the next scheduled sprint before reintroducing the fix.
- C
Implement the fix solely in the main branch without a separate hotfix branch, then force a deployment to production without additional testing.
- D
Add the fix to a feature branch that contains several unrelated changes, then schedule the release alongside upcoming features.
Show answer and explanation
Correct answer: A
Explanation
When responding to high-priority code fixes, it is crucial to isolate the fix to a dedicated hotfix branch, test it thoroughly, and merge it back to the mainline. This approach follows recommended DevOps best practices and leverages a branching strategy that mitigates risks to the ongoing development pipeline. For more detail on branching strategies, consult Microsoft� guidance on branch policies and release flow (https://learn.microsoft.com/azure/devops/repos/git/branch-policies).
- A. Correct.
Correct. Creating a separate hotfix branch from the current release branch ensures the fix is isolated, tested, and can be deployed quickly without impacting ongoing development in other branches. After validation, merging back to the mainline branch maintains a continuous integration flow.
- B. Incorrect.
Incorrect. While rolling back might temporarily remove the bug, it also removes all recent valid changes. This approach delays critical fixes and reverts useful functionality, making it inefficient for high-priority patching.
- C. Incorrect.
Incorrect. Implementing changes directly in main and deploying without minimal validation risks introducing regressions. A dedicated hotfix branch and testing process are best practice for urgent fixes.
- D. Incorrect.
Incorrect. Combining a critical fix with unrelated features can delay deployment of the patch and potentially introduce additional issues. High-priority fixes should be isolated to ensure fast, stable releases.