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

Question 110

A developer has untracked generated directories but wants to leave tracked source modifications untouched. Which cleanup command family applies?

  1. Use git log with path filtering
  2. Use git clean for untracked build clutter
  3. Use git revert for a bad shared commit
  4. Use git reflog to recover a lost local tip
  5. Use git bisect to locate a regression

Explanation

Correct Answer

B:

git clean removes selected untracked files and directories, with a preview option to avoid accidental deletion.

Incorrect Answers

A:

git log with a pathspec filters commit history to changes touching selected paths; this solves file-scoped commit history, leaving untracked generated file cleanup unresolved.

C:

git revert creates a new inverse commit, avoiding rewritten shared ancestry and preserving an auditable correction; it handles undo without rewriting shared history but cannot by itself deliver untracked generated file cleanup.

D:

git reflog records local reference updates, often exposing prior commit hashes that can be restored before garbage collection; untracked generated file cleanup remains outside the responsibility of local reference move recovery.

E:

git bisect performs a binary search through commit history using good/bad test results to isolate the first failing change; that acts on identifying the first faulty commit, whereas the requested outcome is untracked generated file cleanup.

Question 111

A sales platform performs well with ten users but needs evidence it can sustain thousands of simultaneous checkouts. Which test type should gate readiness?

  1. Include database migration tests before rollout
  2. Use contract tests between producer and consumer
  3. Run load tests before a traffic surge
  4. Separate flaky tests from product regressions

Explanation

Correct Answer

C:

Load tests apply representative concurrent traffic and measure latency, throughput, and error rates under expected demand.

Incorrect Answers

A:

Migration tests exercise schema changes against representative database states and help detect incompatible or irreversible transformations; although that supports database evolution compatibility checks, this scenario calls for capacity under anticipated concurrency.

B:

Contract tests verify that producers and consumers satisfy agreed interface expectations before integration breaks at runtime; capacity under anticipated concurrency cannot be inferred from cross-team API compatibility alone.

D:

Identify and quarantine or stabilize nondeterministic tests while recording their outcomes, rather than hiding instability with unlimited retries; capacity under anticipated concurrency cannot be delivered through nondeterministic-test root cause management.

Question 112

A team buys faster self-hosted machines, but feedback latency barely changes because jobs wait hours to be scheduled. Which capacity problem should be addressed first?

  1. Review a migrated pipeline with a comparison run
  2. Shard a long test suite across workers
  3. Investigate build queue bottlenecks before adding CPUs
  4. Use retention policies to constrain storage cost
  5. Migrate classic pipeline tasks to YAML

Explanation

Correct Answer

C:

Queue metrics identify a shortage of parallel execution slots or eligible agents, which faster individual CPUs alone cannot fix.

Incorrect Answers

A:

Side-by-side dry runs or test deployments compare artifacts, variables, approvals, and outcomes before switching fully to the new definition; correcting queue-bound pipeline delay falls outside the scope of evidence-based pipeline migration parity.

B:

Test sharding partitions cases among concurrent workers and combines their reports, reducing the duration of an otherwise serial test job; it contributes to distributed test-case execution, with correcting queue-bound pipeline delay still requiring its own control.

D:

Targeted run and artifact retention policies delete disposable build data while preserving defined compliance evidence; this option addresses bounded nonrelease artifact storage rather than addressing correcting queue-bound pipeline delay.

E:

YAML pipelines express jobs and steps as source-controlled definitions, improving change review and reproducibility; it handles replacing GUI-only automation with code but cannot by itself deliver correcting queue-bound pipeline delay.

Question 113

A build stage produces a tested package on one agent; the deployment stage runs on another machine. How should the payload be handed off?

  1. Use parallel jobs for independent work
  2. Use job timeout settings for hung processes
  3. Use pipeline artifacts between stages
  4. Use workspace clean before state-sensitive builds

Explanation

Correct Answer

C:

Publish/download pipeline artifacts transfers immutable build output through pipeline-managed storage instead of relying on a shared agent disk.

Incorrect Answers

A:

Independent jobs can execute concurrently when parallel-job entitlements and agents are available, reducing end-to-end critical path time; concurrent independent verification concerns a different control point than cross-agent build output transfer.

B:

Job or task timeout settings place an upper limit on execution, allowing stalled runs to fail and free capacity; here cross-agent build output transfer is the target, not stalled job resource protection.

D:

Workspace cleaning deletes selected previous contents before work starts, reducing contamination on persistent agents; cross-agent build output transfer cannot be inferred from self-hosted workspace hygiene alone.

Question 114

A failed release can revert its application binaries, but a one-way data transformation has already completed. What release planning decision is necessary?

  1. Use transactional migrations where supported
  2. Prevent secret exposure in migration logs
  3. Require a database compatibility test before promotion
  4. Separate application and database rollback strategies

Explanation

Correct Answer

D:

Database changes need explicit recovery or forward-fix handling because code rollback alone does not reverse mutated stored data.

Incorrect Answers

A:

Wrapping supported migration operations in a transaction allows atomic commit or rollback if a step fails; that changes all-or-nothing database change without delivering independent data rollback planning.

B:

Protected secret injection and logging controls avoid writing database credentials to console output or retained artifacts; migration credential confidentiality cannot substitute for independent data rollback planning.

C:

Integration tests exercising the candidate application against the migrated schema catch contract mismatch before production promotion; independent data rollback planning falls outside the scope of application-schema contract verification.

Question 115

A test matrix creates 16 jobs but the organization can afford only four simultaneous agents. Which job setting constrains demand?

  1. Use separate build and deployment stages
  2. Use reusable stages for repeated regional deployments
  3. Use maxParallel to cap matrix concurrency
  4. Use parallel jobs for independent work
  5. Use explicit cross-stage dependencies

Explanation

Correct Answer

C:

maxParallel limits concurrent matrix legs to an explicit maximum, balancing test speed with available agent capacity.

Incorrect Answers

A:

Multi-stage YAML pipelines separate build and release phases with independent conditions, dependencies, and environment controls; capped test-matrix fanout remains outside the responsibility of separation of build and delivery boundaries.

B:

A parameterized stage template lets each regional stage share tested deployment steps while supplying distinct environment values; that acts on templated regional deployment stages, whereas the requested outcome is capped test-matrix fanout.

D:

Independent jobs can execute concurrently when parallel-job entitlements and agents are available, reducing end-to-end critical path time; here capped test-matrix fanout is the target, not concurrent independent verification.

E:

Stage dependencies encode prerequisite success across earlier stages, preventing premature promotion when multiple checks are required; although that supports multi-stage release prerequisite graph, this scenario calls for capped test-matrix fanout.

Question 116

One build job computes an artifact version that a later, different job must consume. Which variable-passing design works?

  1. Use always() for essential cleanup
  2. Use dependsOn to order jobs
  3. Use output variables across jobs
  4. Use failed() to capture error diagnostics
  5. Use runtime expressions for dynamic job conditions

Explanation

Correct Answer

C:

Output variables marked for downstream use can be referenced through dependency syntax across job boundaries with suitable dependencies.

Incorrect Answers

A:

always() allows a cleanup step to execute despite prior failure or cancellation, helping preserve diagnostics and release resources; downstream value propagation cannot be delivered through unconditional finalization despite failures.

B:

A dependsOn relationship establishes an execution dependency between jobs or stages, enabling controlled ordering and status evaluation; its effect is explicit job prerequisite ordering, not downstream value propagation.

D:

failed() gates the diagnostic step on a failure state so collection is targeted at broken runs; failure-specific evidence collection cannot substitute for downstream value propagation.

E:

Runtime expressions evaluate runtime variable context and can support dynamic values or conditions unavailable during template compilation; downstream value propagation falls outside the scope of execution-time expression evaluation.

Question 117

A cloud service spans availability zones and a deployment to all zones simultaneously could cause a region-wide outage. Which rollout design reduces blast radius?

  1. Deploy an urgent hotfix through a controlled fast path
  2. Use failure-domain-aware rollout waves
  3. Use a rollback-ready previous artifact
  4. Use idempotent deployment scripts

Explanation

Correct Answer

B:

Zone-aware sequential deployment waves keep healthy capacity in unaffected zones while each wave is verified. Progress only after health checks pass in the earlier zone, so failures do not affect every availability zone at once.

Incorrect Answers

A:

A hotfix branch or targeted change can pass abbreviated risk-based checks and controlled promotion while preserving audit links and a merge-back plan; this option addresses expedited traceable emergency release rather than addressing zonal release blast-radius reduction.

C:

Retaining the previously approved immutable artifact permits rapid redeployment of already tested bits; zonal release blast-radius reduction remains outside the responsibility of fast return to a known release.

D:

Idempotent operations reach the desired end state even when repeated, making safe retries possible after partial execution; that acts on repeatable partial deployment recovery, whereas the requested outcome is zonal release blast-radius reduction.

Question 118

A deployment appears healthy in CPU metrics, yet users report intermittent 500 errors; which data gives code-level failure clues?

  1. Use correlation IDs across services
  2. Use custom events for feature adoption
  3. Attach deployment version to application telemetry
  4. Inspect exception telemetry with stack context

Explanation

Correct Answer

D:

Exception telemetry captures application error details, potentially including stack information and related operation context.

Incorrect Answers

A:

Propagating trace context or correlation identifiers associates related telemetry across service boundaries; application exception root-cause evidence cannot be inferred from shared operation identity alone.

B:

Custom events can record meaningful application actions with properties needed to measure feature behavior by rollout cohort; the distinction is business-specific application usage measurement versus application exception root-cause evidence.

C:

Recording application version or release identifiers with telemetry enables per-version filtering and regression comparison; application exception root-cause evidence cannot be delivered through version-specific canary analysis.

Question 119

Changes under the payments directory must automatically request the payments team's review, even if authors forget them. What branch policy helps?

  1. Restrict allowed merge types
  2. Require minimum approving reviewers in Azure Repos
  3. Configure required status checks from an external scanner
  4. Require successful GitHub checks before merging
  5. Automatically include required path owners

Explanation

Correct Answer

E:

Automatically included reviewer rules can match changed paths and request or require the designated code owners for those files.

Incorrect Answers

A:

Merge-type policy restricts which pull request completion methods are permitted for the target branch; it contributes to permitted integration history forms, with folder-specific expert review still requiring its own control.

B:

The minimum reviewer policy sets the number of eligible approvals required to complete pull requests into a protected branch; this solves mandatory reviewer quorum, leaving folder-specific expert review unresolved.

C:

A required status policy evaluates externally posted pull request status contexts before allowing completion; this option addresses mandatory external PR assessment rather than addressing folder-specific expert review.

D:

GitHub branch protection or rulesets can require specified status checks to pass on the protected target branch; it handles GitHub merge blocked by CI but cannot by itself deliver folder-specific expert review.

Question 120

An administrator accidentally deleted an unprotected branch previously; the default branch now needs safeguards against accidental removal. What source-control policy helps?

  1. Restrict repository deletion
  2. Use signed Git tags
  3. Use annotated Git tags for audited releases
  4. Protect default branch from deletion
  5. Use tag prefixes to distinguish versions

Explanation

Correct Answer

D:

Branch protection or restricted delete permissions prevent unauthorized removal of important branch references.

Incorrect Answers

A:

Administrative permissions govern destructive repository operations and should be limited independently from ordinary code contribution; here safeguarding main branch existence is the target, not destructive repository administration rights.

B:

Signed tags bind a cryptographic signature to an annotated tag object, allowing verification against the trusted signing key; although that supports authenticated release label, this scenario calls for safeguarding main branch existence.

C:

Annotated tags create dedicated Git tag objects with metadata and are useful for durable release identification; safeguarding main branch existence cannot be inferred from metadata-rich release markers alone.

E:

Component-specific tag prefixes make release identities unambiguous without creating separate histories for each package; safeguarding main branch existence cannot be delivered through component-specific tag namespaces.

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