Microsoft AZ-400 (Designing and Implementing Microsoft DevOps Solutions) Practice Test 27

Question 260

Consumers require machine-readable endpoint schemas and reproducible human-facing API documentation with every release. Which source format should be maintained?

  1. Publish API specifications from OpenAPI
  2. Generate release notes from labeled pull requests
  3. Publish a runbook alongside deployment assets
  4. Use an Azure DevOps project wiki

Explanation

Correct Answer

A:

An OpenAPI specification describes endpoints, operations, schemas, and responses and can generate reference documentation and client tooling.

Incorrect Answers

B:

Structured pull request labels and merged change metadata can be transformed into categorized release notes by a release workflow; its effect is categorized change summary automation, not contract-driven API documentation.

C:

Packaging or linking version-matched runbooks with the release record makes operational procedures available for the deployed version; that changes incident-ready versioned operating guidance without delivering contract-driven API documentation.

D:

Azure DevOps wikis give teams Markdown-based project documentation with collaborative editing and navigation inside the project; native project knowledge repository cannot substitute for contract-driven API documentation.

Question 261

Two developers collaborated on a shared feature branch and want to retain the branch's historical merge boundary on main. Which operation should they use?

  1. Cherry-pick a validated fix into a maintenance branch
  2. Use branch-per-environment only with clear tradeoffs
  3. Merge an integration branch while preserving its history
  4. Use feature flags for incomplete trunk work

Explanation

Correct Answer

C:

A merge commit can preserve branch topology and the context of integrating a completed branch. The resulting merge commit records the integration boundary instead of rewriting the feature into one squashed change.

Incorrect Answers

A:

Cherry-pick applies the changes introduced by a chosen commit onto the target branch without merging its entire ancestry; this option addresses selective cross-branch fix transfer rather than addressing retained branch integration topology.

B:

Building one immutable artifact from a shared mainline and promoting it across environments reduces code drift caused by long-lived environment branches; it handles artifact promotion instead of branch drift but cannot by itself deliver retained branch integration topology.

D:

Feature flags gate runtime behavior independently from source integration, permitting frequent merges before release exposure; that acts on hidden unfinished behavior on main, whereas the requested outcome is retained branch integration topology.

Question 262

A progressive release starts successfully but causes elevated response errors after traffic is routed to it. Which automated reaction limits exposure?

  1. Drain connections before removing old replicas
  2. Configure slot-sticky settings
  3. Use health-based automatic rollback
  4. Use idempotent deployment scripts

Explanation

Correct Answer

C:

Rollback automation tied to defined health signals can revert traffic or restore a prior version before failure spreads broadly.

Incorrect Answers

A:

Connection draining and graceful termination allow in-flight requests to complete before a retiring instance stops; metric-triggered rapid restoration cannot be inferred from preserving active requests during replacement alone.

B:

Deployment slot settings remain tied to their designated slot during swaps, preserving environment-specific configuration; the distinction is retaining environment credentials across swaps versus metric-triggered rapid restoration.

D:

Idempotent operations reach the desired end state even when repeated, making safe retries possible after partial execution; its effect is repeatable partial deployment recovery, not metric-triggered rapid restoration.

Question 263

A test workflow passes after automatic retry but developers suspect quality is deteriorating; which signal should be retained?

  1. Monitor retry-induced flaky tests
  2. Check agent tool versions during environment drift
  3. Pin important runs from automatic retention
  4. Diagnose self-hosted agent exhaustion

Explanation

Correct Answer

A:

Per-attempt test outcomes show instability hidden by final-pass status and support targeted flaky-test repair.

Incorrect Answers

B:

Inspecting capabilities, installed runtimes, and agent image versions exposes toolchain drift between workers; this solves inconsistent host tooling diagnosis, leaving retry-masked test instability unresolved.

C:

Retention leases or supported keep-forever controls can protect selected runs and their records from routine expiration; this option addresses exceptional run preservation rather than addressing retry-masked test instability.

D:

Agent utilization and queue length reveal whether workload demand exceeds available qualified worker capacity; it handles peak worker utilization shortage but cannot by itself deliver retry-masked test instability.

Question 264

A test sporadically times out on clean builds with identical source; the team must avoid trusting a pass after one retry. Which practice is most reliable?

  1. Run stress tests beyond expected capacity
  2. Use a test matrix for supported runtimes
  3. Separate flaky tests from product regressions
  4. Run unit tests before packaging

Explanation

Correct Answer

C:

Identify and quarantine or stabilize nondeterministic tests while recording their outcomes, rather than hiding instability with unlimited retries.

Incorrect Answers

A:

Stress tests deliberately exceed normal capacity to identify breaking points, failure modes, and recovery behavior; here nondeterministic-test root cause management is the target, not overload failure characterization.

B:

Matrix execution expands a job over selected versions and operating systems, testing the product across supported combinations; although that supports cross-platform runtime coverage, this scenario calls for nondeterministic-test root cause management.

D:

Unit tests exercise small components in isolation and are usually fast enough to provide immediate feedback during continuous integration; the distinction is low-cost component correctness versus nondeterministic-test root cause management.

Question 265

A self-hosted agent is already routed to a private endpoint but resolves the service hostname to a public IP, causing deployment failure. Which networking prerequisite should be corrected?

  1. Use an agent pool for shared self-hosted capacity
  2. Configure private DNS for restricted deployment endpoints
  3. Configure outbound access from self-hosted agents
  4. Use a dedicated pool for untrusted pull requests

Explanation

Correct Answer

B:

Private DNS resolution maps the service hostname to its private endpoint IP, keeping agent traffic on the approved internal route.

Incorrect Answers

A:

Agent pools group self-hosted workers with controlled project permissions, enabling shared execution capacity; centralized managed worker fleet cannot substitute for private endpoint name resolution.

C:

Self-hosted Azure Pipelines agents initiate outbound communication to the service; necessary HTTPS egress must be available; it contributes to agent registration outbound network path, with private endpoint name resolution still requiring its own control.

D:

Segregating untrusted workloads onto tightly scoped ephemeral workers limits credential and network exposure to attacker-controlled build scripts; this solves hostile-source execution isolation, leaving private endpoint name resolution unresolved.

Question 266

GitHub Actions deploys to production, and a named operations team must approve before a job accesses protected environment credentials. Which feature supports this?

  1. Use environments with required reviewers in GitHub
  2. Use runner labels to route jobs
  3. Use composite actions for repeated step logic
  4. Restrict GITHUB_TOKEN permissions

Explanation

Correct Answer

A:

GitHub environments can apply protection rules such as required reviewers before guarded deployment jobs proceed.

Incorrect Answers

B:

Labels identify runner characteristics and the runs-on selector can target machines with required labels; capability-specific GitHub job scheduling concerns a different control point than protected GitHub deployment approval.

C:

Composite actions bundle related steps into a callable action usable within an existing job; here protected GitHub deployment approval is the target, not portable in-job step assembly.

D:

Declaring minimal permissions at workflow or job scope reduces the authority of the automatically issued GITHUB_TOKEN; although that supports least-privilege native workflow token, this scenario calls for protected GitHub deployment approval.

Question 267

Security approval must occur only after both integration testing and package signing have succeeded. Which YAML relationship should express this?

  1. Use parallel jobs for independent work
  2. Use workspace clean before state-sensitive builds
  3. Use explicit cross-stage dependencies
  4. Use checkout none for deployment-only jobs

Explanation

Correct Answer

C:

Stage dependencies encode prerequisite success across earlier stages, preventing premature promotion when multiple checks are required.

Incorrect Answers

A:

Independent jobs can execute concurrently when parallel-job entitlements and agents are available, reducing end-to-end critical path time; its effect is concurrent independent verification, not multi-stage release prerequisite graph.

B:

Workspace cleaning deletes selected previous contents before work starts, reducing contamination on persistent agents; that changes self-hosted workspace hygiene without delivering multi-stage release prerequisite graph.

D:

Disabling source checkout for jobs that consume only published artifacts avoids needless Git transfer and agent workspace setup; multi-stage release prerequisite graph falls outside the scope of removing unused source checkout.

Question 268

A pipeline warns that its self-hosted worker version is outdated and new tasks fail to initialize. Which maintenance action is appropriate?

  1. Use a dedicated pool for untrusted pull requests
  2. Configure private DNS for restricted deployment endpoints
  3. Use managed pools to reduce custom agent upkeep
  4. Update self-hosted agent software

Explanation

Correct Answer

D:

Keeping the agent binary and underlying tools updated preserves compatibility with service protocols and pipeline tasks.

Incorrect Answers

A:

Segregating untrusted workloads onto tightly scoped ephemeral workers limits credential and network exposure to attacker-controlled build scripts; it handles hostile-source execution isolation but cannot by itself deliver worker runtime compatibility.

B:

Private DNS resolution maps the service hostname to its private endpoint IP, keeping agent traffic on the approved internal route; worker runtime compatibility remains outside the responsibility of private endpoint name resolution.

C:

Managed agent-pool offerings can centralize worker lifecycle and scale management while supporting configured image or network requirements; that acts on managed customizable build-worker infrastructure, whereas the requested outcome is worker runtime compatibility.

Question 269

A team uses GitHub Issues and pull requests and requires a board with status, priority, and iteration views that update as work progresses. Which planning tool fits?

  1. Use GitHub Projects custom fields and workflows
  2. Use Azure Boards queries with linked work items
  3. Use Azure Boards delivery plans
  4. Short-lived branches merged to main by pull request

Explanation

Correct Answer

A:

GitHub Projects supports custom fields, multiple table/board views, and automation tied to repository issues and pull requests.

Incorrect Answers

B:

Work item link queries can evaluate relationships between bugs, stories, and other Azure Boards items rather than filtering only individual fields; configurable GitHub work visualization cannot be delivered through related-work-item reporting.

C:

Delivery Plans aggregates scheduled work from selected Azure Boards teams into a cross-team timeline for dependency and progress visibility; its effect is cross-team work schedule visibility, not configurable GitHub work visualization.

D:

GitHub Flow uses a stable main branch, short-lived topic branches, pull requests, and frequent deployment of reviewed changes; that changes lightweight branch-to-main review without delivering configurable GitHub work visualization.

Question 270

A GitHub organization wants only organization owners to create new repositories so approved settings can be applied at creation. Ordinary members should still contribute to existing repositories. Which organization setting enforces this?

  1. Require signed annotated tags for releases in existing repositories
  2. Enable automatic deletion of branches after pull requests merge
  3. Grant every member an Admin role on all repositories
  4. Disable repository creation by ordinary organization members

Explanation

Correct Answer

D:

GitHub organization settings determine whether ordinary members can create repositories. Disabling member creation leaves owners able to create repositories without changing existing repository contribution rights.

Incorrect Answers

A:

Signed annotated tags attest to release references in repositories that already exist. They have no bearing on who is allowed to create a new organization repository.

B:

Automatically deleting merged branches is a repository hygiene setting. New repositories could still be created by members without a creation restriction.

C:

Repository Admin privileges grant broad control over existing repositories and would weaken least privilege. They are not an organization-wide repository-creation policy.

Designing and Implementing Microsoft DevOps Solutions (AZ-400) Practice Tests