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

Question 150

A repository is being polluted by compiler caches and machine-specific files that should never be committed. Which Git configuration prevents future accidental tracking?

  1. Add .gitignore for local build outputs
  2. Use repository path-based ownership
  3. Use Git submodules when pinning a separate repository
  4. Share code through versioned packages

Explanation

Correct Answer

A:

The .gitignore file lists untracked path patterns Git should ignore; previously tracked files need separate untracking.

Incorrect Answers

B:

CODEOWNERS maps repository path patterns to responsible reviewers and aids targeted review governance; the distinction is ownership within one large repository versus exclude machine-local generated files.

C:

A submodule records a commit pointer to another repository, so the superproject pins a chosen revision; exclude machine-local generated files cannot be delivered through separately versioned repository reference.

D:

Publishing a versioned package gives each consumer an explicit dependency contract without forcing shared repository history; its effect is decoupled code-sharing release cadence, not exclude machine-local generated files.

Question 151

Review conversations remain open even when developers click approve; merging must wait until blocking comments are resolved. Which policy is appropriate?

  1. Require successful GitHub checks before merging
  2. Require resolved pull request comments
  3. Use path filters on build validation
  4. Require build validation on the target branch

Explanation

Correct Answer

B:

A comment resolution policy prevents completion while unresolved review threads violate the configured requirement.

Incorrect Answers

A:

GitHub branch protection or rulesets can require specified status checks to pass on the protected target branch; it contributes to GitHub merge blocked by CI, with closed review feedback threads still requiring its own control.

C:

Path filters limit when a build-validation policy applies based on changed files, reducing unrelated checks; this option addresses changed-file-targeted validation rather than addressing closed review feedback threads.

D:

A build validation policy queues or requires a qualifying PR validation run and gates completion on its result; it handles premerge build success but cannot by itself deliver closed review feedback threads.

Question 152

A release operations group needs targeted alerts when a named Azure Pipeline run fails, but not for every successful validation build. Which notification setup fits?

  1. Configure Azure Pipelines build failure subscriptions
  2. Review GitHub Actions workflow run failure trends
  3. Alert on a rising failed-deployment ratio
  4. Calculate lead time for changes from source and deployment

Explanation

Correct Answer

A:

Azure DevOps notifications can subscribe recipients to selected pipeline completion and failure events with appropriate filters.

Incorrect Answers

B:

Workflow run histories and available Insights surfaces show success/failure patterns that help distinguish recurring automation problems; although that supports repository workflow reliability trend, this scenario calls for filtered Azure Pipelines failure awareness.

C:

A deployment outcome metric filtered to production and evaluated over a time window detects a sustained release reliability problem; filtered Azure Pipelines failure awareness cannot be inferred from sustained production promotion failures alone.

D:

Joining source change timestamps with production deployment records yields change lead time across build, review, and release processes; the distinction is source-to-production delivery latency versus filtered Azure Pipelines failure awareness.

Question 153

A release coordination channel must receive selected build or work-item updates from Azure DevOps. Which native connection should be arranged?

  1. Subscribe a Teams channel to Azure DevOps activity
  2. Filter service-hook subscriptions by event
  3. Use GitHub CODEOWNERS for reviewer routing
  4. Send deployment status via pipeline notifications

Explanation

Correct Answer

A:

Azure DevOps integrations and service-hook subscriptions can send supported project events to Microsoft Teams for shared visibility.

Incorrect Answers

B:

Event type and available subscription filters narrow Azure DevOps service-hook traffic before payload delivery; DevOps-to-Teams event distribution falls outside the scope of event selection before webhook dispatch.

C:

CODEOWNERS maps file patterns to owners and can drive automatic review requests when supported branch protection is configured; it contributes to path-based code review ownership, with DevOps-to-Teams event distribution still requiring its own control.

D:

Notifications triggered on deployment-stage outcomes avoid confusing development activity with production release status; this solves production failure event targeting, leaving DevOps-to-Teams event distribution unresolved.

Question 154

A KQL investigation needs error events from the last thirty minutes, grouped into five-minute counts, with only selected output fields. Which THREE KQL operator patterns should be combined? Choose THREE.

  1. Use KQL summarize percentiles for latency
  2. Use KQL project to limit output columns
  3. Use summarize count() by bin() in KQL
  4. Use KQL join to correlate related tables
  5. Write KQL with where and ago()
  6. Use KQL extend for computed fields

Explanation

Correct Answers

B:

project selects and can rename the columns returned by a KQL query, producing a focused investigation result; projection gives the final result its required shape; filtering and time-bin aggregation supply the other two query operations. In the combined query, projection shapes the result after time filtering and aggregation establish the requested window and buckets.

C:

summarize count() by bin(timestamp, 5m) groups records into time buckets suitable for trend visualization; bucketing provides the five-minute counts, while the other operators restrict time range and return columns. Use the time field with a five-minute bin so the count represents intervals rather than individual exception rows.

E:

KQL where predicates using timestamp comparison with ago() narrow a query to the relevant incident window and error condition.

Incorrect Answers

A:

Percentile aggregation exposes tail behavior that arithmetic averages can hide, making high-latency outliers visible; that acts on tail-latency distribution analysis, whereas the requested outcome is recent error filtering by time.

D:

join combines records from two datasets according to chosen keys and join semantics to build correlated views; although that supports cross-table telemetry correlation, this scenario calls for recent error filtering by time.

F:

extend adds calculated columns derived from existing expressions without requiring data to be rewritten at ingestion; the distinction is calculated query result dimensions versus recent error filtering by time.

Question 155

A developer has local unpushed commits that must be discarded to realign a private branch with a known commit. Which operation can rewrite that local branch?

  1. Use git clean for untracked build clutter
  2. Use git reset on unpublished local work
  3. Use git revert for a bad shared commit
  4. Use git log with path filtering

Explanation

Correct Answer

B:

git reset can move the branch reference and optionally change the index and working tree; it should be used carefully on private history.

Incorrect Answers

A:

git clean removes selected untracked files and directories, with a preview option to avoid accidental deletion; its effect is untracked generated file cleanup, not moving an unpublished branch pointer.

C:

git revert creates a new inverse commit, avoiding rewritten shared ancestry and preserving an auditable correction; undo without rewriting shared history cannot substitute for moving an unpublished branch pointer.

D:

git log with a pathspec filters commit history to changes touching selected paths; moving an unpublished branch pointer falls outside the scope of file-scoped commit history.

Question 156

A team needs Azure-native declarative infrastructure definitions, a preview of proposed resource changes, and preservation of unrelated resource-group content. Which THREE capabilities together meet these goals? Choose THREE.

  1. Use what-if before infrastructure deployment
  2. Use a reusable module registry for Bicep
  3. Use incremental deployment deliberately
  4. Use Bicep outputs for dependent deployment values
  5. Define Azure resources declaratively with Bicep
  6. Use Azure Policy to check IaC outcomes

Explanation

Correct Answers

A:

ARM what-if previews intended resource-state differences from a template without applying those changes; this preview complements Bicep declarations and incremental deployment; none of those other two controls by itself shows a proposed change summary. Reviewers can inspect predicted creates, updates, and deletes before deciding whether to approve execution.

C:

Incremental ARM deployments update declared resources without treating every omitted resource as a deletion request; incremental behavior protects unrelated resources, while Bicep supplies declarations and what-if previews the effects.

E:

Bicep provides concise declarative Azure resource definitions compiled into Azure Resource Manager deployments.

Incorrect Answers

B:

A supported Bicep module registry publishes reusable modules with explicit version references for consuming templates; Azure-native declarative provisioning remains outside the responsibility of centrally versioned IaC component sharing.

D:

Bicep outputs expose explicitly selected deployment values so subsequent steps can consume resolved resource identifiers; module-produced resource references concerns a different control point than Azure-native declarative provisioning.

F:

Azure Policy evaluates configured resource compliance and can deny changes that violate assigned policy definitions; although that supports enforcement of Azure resource guardrails, this scenario calls for Azure-native declarative provisioning.

Question 157

A job's execution depends on a variable available during a run rather than a parameter fixed at template expansion. Which syntax family should be considered?

  1. Use secret pipeline variables for confidential values
  2. Use failed() to capture error diagnostics
  3. Use runtime expressions for dynamic job conditions
  4. Use stage-level conditions for branch-specific release

Explanation

Correct Answer

C:

Runtime expressions evaluate runtime variable context and can support dynamic values or conditions unavailable during template compilation.

Incorrect Answers

A:

Secret variables store sensitive settings outside checked-in YAML and require controlled injection into task environments; the distinction is runtime secret injection versus execution-time expression evaluation.

B:

failed() gates the diagnostic step on a failure state so collection is targeted at broken runs; execution-time expression evaluation cannot be delivered through failure-specific evidence collection.

D:

A stage condition can evaluate branch metadata alongside success state to prevent production deployment from nonapproved branches; that changes branch-gated production stage without delivering execution-time expression evaluation.

Question 158

A build requires a licensed compiler installed on only two self-hosted agents in a larger pool. How can the pipeline select suitable workers?

  1. Use agent demands and capabilities
  2. Size parallel jobs to actual entitlements
  3. Use a Microsoft-hosted agent for standard builds
  4. Use a dedicated pool for untrusted pull requests

Explanation

Correct Answer

A:

Agent capabilities advertise available tools or attributes, and demands constrain scheduling to matching agents.

Incorrect Answers

B:

Azure DevOps parallel-job capacity or entitlements can limit concurrency independently of the physical number of agents; this option addresses licensed job concurrency ceiling rather than addressing tool-aware agent placement.

C:

Microsoft-hosted agents provide managed ephemeral build environments with common tools, reducing self-hosted patching and cleanup work; it handles low-maintenance disposable CI execution but cannot by itself deliver tool-aware agent placement.

D:

Segregating untrusted workloads onto tightly scoped ephemeral workers limits credential and network exposure to attacker-controlled build scripts; tool-aware agent placement remains outside the responsibility of hostile-source execution isolation.

Question 159

A pipeline artifact named only latest is difficult to map to source after a production failure. Which metadata should be attached?

  1. Use build metadata without altering SemVer precedence
  2. Prevent republishing the same version with different bytes
  3. Increment the major version for a breaking API change
  4. Include commit SHA in artifact provenance
  5. Generate a software bill of materials with releases

Explanation

Correct Answer

D:

A commit SHA uniquely identifies the source snapshot used by a build and supports traceability from deployment to repository state.

Incorrect Answers

A:

SemVer build metadata follows a plus sign and communicates extra information without affecting version precedence comparison; although that supports informational build identity suffix, this scenario calls for source snapshot identity for each build.

B:

Immutable package versions ensure that a given package name and version cannot silently acquire different contents; source snapshot identity for each build cannot be inferred from stable package name-version mapping alone.

C:

Under SemVer, a major increment signals incompatible public API changes so consumers can avoid accidental breaking upgrades; the distinction is incompatible interface version signal versus source snapshot identity for each build.

E:

A software bill of materials records software components and versions used in a build, supporting later dependency risk analysis; its effect is shipped dependency inventory, not source snapshot identity for each build.

Question 160

A deployment step must run only if its dependencies have succeeded, not after a failed verification job. Which condition reflects that policy?

  1. Use a condition checking succeeded()
  2. Use a variable group for shared environment settings
  3. Use secret pipeline variables for confidential values
  4. Use parameters for typed pipeline input

Explanation

Correct Answer

A:

The succeeded() expression evaluates execution status and gates work on successful prerequisite completion. A failed upstream job prevents this step from proceeding under the success-only condition.

Incorrect Answers

B:

Variable groups centralize named variables for authorized pipelines, with optional secret integration and access controls; it contributes to shared pipeline configuration, with success-dependent execution still requiring its own control.

C:

Secret variables store sensitive settings outside checked-in YAML and require controlled injection into task environments; this solves runtime secret injection, leaving success-dependent execution unresolved.

D:

YAML runtime parameters support explicit types and are resolved at template parsing, enabling safer structural customization than string variables; this option addresses typed reusable pipeline configuration rather than addressing success-dependent execution.

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