Microsoft Certified: DevOps Engineer ExpertConfigure processes and communicationsEasy
A DevOps team is experiencing frequent integration issues and merge conflicts when multiple developers work on the same codebase. They are currently using a strategy where developers commit directly to the 'main' branch. To mitigate these issues and improve code quality, they decide to introduce a mandatory review process before any code is merged into 'main'. Which pull request strategy should they implement to enforce this new process?
- ARebase and Merge
- BMerge Queue
- CSquash and Merge
- DBasic Pull Request
Show answer & explanationAnswer & explanation
Correct answer: D. Basic Pull Request
A Basic Pull Request strategy enforces a review process by requiring changes to be submitted for approval before they can be merged into the target branch. This directly addresses the need for a mandatory review process to improve code quality and reduce integration issues.
Why the other options are wrong
- A. Rebase and Merge reapplies commits from a feature branch onto the target branch's head, creating a linear history, but it doesn't inherently enforce a review process.
- B. A Merge Queue automatically merges pull requests after they pass checks and are in a queue, preventing broken builds, but it's an advanced merge mechanism built on top of a PR process, not the core PR strategy itself.
- C. Squash and Merge is a merge strategy that condenses all commits from a feature branch into a single commit upon merging, primarily for a cleaner history, not for enforcing reviews.
Basic Pull Request Strategy
A strategy where developers submit their changes for review and approval by other team members before they can be merged into a target branch.
- Enforces code review.
- Improves code quality and collaboration.
- Prevents direct commits to protected branches.
Memory trick: Pull requests pull in peer reviews.