AZ-400 exam dumps

AZ-400 practice question 71 of 306

Designing and Implementing Microsoft DevOps Solutions. Professional level, Microsoft. Free question with the correct answer and a full explanation.

AZ-400 Question 71

Select 2

Your organization uses a Git repository in Azure Repos for its main product. Recently, multiple bugs began appearing in the production environment because some developers merged code without adequate review or a passing build. You have been asked to configure branch policies so that no pull request can be merged into the 'main' branch unless there is at least one reviewer approval and the build pipeline completes successfully. Which two actions should you configure in the branch policies to meet this requirement?

  1. A

    Configure a branch policy requiring at least one reviewer approval on pull requests targeting the 'main' branch.

  2. B

    Require a successful build validation for all pull requests into the 'main' branch and specify the build pipeline.

  3. C

    Enable forced pushes on the 'main' branch to allow repository administrators to bypass branch policies.

  4. D

    Grant the Project Collection Administrators group the 'Bypass policies when pushing' permission for the 'main' branch.

Show answer and explanation

Correct answers: A, B

Explanation

By combining a required minimum number of reviewers with mandatory build validation in Azure DevOps branch policies, you ensure that all code changes into the 'main' branch have undergone both peer review and automated build checks. This approach aligns with Microsoft� best practices for implementing continuous integration and continuous delivery. Refer to the Microsoft Docs 'Protect your branches with policies' (https://docs.microsoft.com/azure/devops/repos/git/branch-policies) for further guidance.

  • A. Correct.

    Correct. Configuring a minimum number of required reviewers enforces code review, preventing unreviewed merges from being completed.

  • B. Correct.

    Correct. Requiring a successful build for pull requests ensures that code changes pass automated checks before merging, thereby reducing integration errors.

  • C. Incorrect.

    Incorrect. Allowing forced pushes effectively bypasses branch policies, defeating the purpose of requiring a code review and a successful build.

  • D. Incorrect.

    Incorrect. Granting bypass permissions to a large group undercuts the restriction� intent and may allow merges that haven�t met the required checks.

Timed practice exam

Take a AZ-400 practice test under exam conditions

70 questions in 90 minutes, drawn from this bank, with a score report and a per-question review when you finish.

Start timed exam