Microsoft DevOps Engineer Expert AZ-400 Practice Question
You maintain several Azure Pipelines that run nightly integration tests against six different database versions. The tests are defined in a single YAML job that uses a matrix strategy, so six parallel Microsoft-hosted agents start each time the pipeline runs. Management wants to keep the test coverage unchanged but limit the number of simultaneously billed Microsoft-hosted jobs to two in order to lower costs. Which YAML change should you implement to meet the requirement?
Insert "dependsOn" references so each matrix job waits for the previous job to finish.
Change the pool definition from Microsoft-hosted to self-hosted agents.
Configure a condition that runs the job only when the variable Agent.JobServerParallelism equals 2.
Add the setting "maxParallel: 2" under the job's matrix strategy.
The matrix strategy supports the maxParallel setting, which caps the number of matrix replicas that can run at the same time. Setting maxParallel to 2 ensures that no more than two of the six matrix jobs execute concurrently, thereby limiting consumption of Microsoft-hosted parallel jobs while still running all six test combinations sequentially. Adding dependsOn would require splitting the job into separate definitions and would still launch multiple agents unless manually serialized. Using a runtime expression on Agent.JobServerParallelism does not throttle matrix concurrency. Switching to self-hosted agents avoids Microsoft-hosted job charges but does not satisfy the requirement to keep using Microsoft-hosted agents while simply limiting concurrency.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What is a matrix strategy in Azure Pipelines?
Open an interactive chat with Bash
How does maxParallel work in the matrix strategy?
Open an interactive chat with Bash
Why is switching to self-hosted agents not a suitable solution in this case?
Open an interactive chat with Bash
Microsoft DevOps Engineer Expert AZ-400
Design and implement build and release pipelines
Your Score:
Report Issue
Bash, the Crucial Exams Chat Bot
AI Bot
Loading...
Loading...
Loading...
Pass with Confidence.
IT & Cybersecurity Package
You have hit the limits of our free tier, become a Premium Member today for unlimited access.
Military, Healthcare worker, Gov. employee or Teacher? See if you qualify for a Community Discount.
Monthly
$19.99
$19.99/mo
Billed monthly, Cancel any time.
3 Month Pass
$44.99
$14.99/mo
One time purchase of $44.99, Does not auto-renew.
MOST POPULAR
Annual Pass
$119.99
$9.99/mo
One time purchase of $119.99, Does not auto-renew.
BEST DEAL
Lifetime Pass
$189.99
One time purchase, Good for life.
What You Get
All IT & Cybersecurity Package plans include the following perks and exams .