L14. Pipeline Maintenance: Health Monitoring, Cost & Migration from Classic
Course outlineLesson 14 of 18
Track flaky tests, duration, and queue time separately; match concurrency to agents and entitlements; retain release evidence; and migrate Classic definitions to Git-reviewed YAML without losing checks.
Distinguish pipeline health signals
Track failure rate, flaky tests, run duration, and queue time separately. A flaky test changes between pass and fail without a relevant code change; repeatedly rerunning it can conceal a defect. Azure Pipelines can identify flaky tests through supported rerun workflows and report them in test results. Assign an owner to investigate rather than treating a retry as a repair.
Optimize the bottleneck
Cache dependency downloads with keys that change when dependency inputs change. Split independent work across jobs only when agents and parallel-job capacity are available. Group related steps when additional job startup overhead outweighs parallelism. Compare queue time with execution time before adding capacity, and measure results after each change.
In Azure Pipelines, a parallel job entitlement permits one job to run at a time. Actual throughput also needs an available matching agent. Microsoft-hosted and self-hosted parallel-job capacity are separate; runner minutes are a usage allowance, not a concurrency count. More configured jobs can simply create a longer queue.
Retain release evidence deliberately
Azure Pipelines run-retention settings are configured at the project level. Set retention for runs and related artifacts, and the minimum recent runs to retain per pipeline. Deleting a run also deletes its associated logs, test results, and pipeline artifacts. Do not assume everything is kept forever by default.
Use an explicit retain-indefinitely action or retention lease for release evidence that must survive normal cleanup. Define a retention owner and later review retained runs. Azure Artifacts package retention is separate from pipeline-run retention: preserve the package versions and deployment evidence needed for rollback and investigation.
Classic and YAML capabilities
Classic pipeline definitions have a History tab for comparing and reverting changes. Classic task groups provide reuse. YAML adds a pipeline definition stored in Git alongside the application, with branching, pull-request review, and YAML templates. It does not automatically make execution faster or security approvals stronger.
| Requirement | Classic | YAML |
|---|---|---|
| Definition history | UI history and comparison | Git commits and diffs |
| Reusable steps | Task groups | Templates |
| Pipeline change reviewed with application PR | Separate UI process | Repository branch and PR policy |
| Deployment authorization | Release approvals and gates | Resource approvals and checks |
Migrate and verify behavior
Export supported Classic build pipelines to YAML as a starting point. Classic release pipelines do not support full YAML export; rebuild stages, jobs, and deployment behavior, exporting individual tasks as needed. Check triggers, variables, secret handling, service connections, artifacts, approvals, conditions, and rollback before retiring the original definition.
Protect deployment environments and service connections with resource checks configured outside the YAML file. Validate the migrated definition in a nonproduction environment and compare its results with the original. Exam decision: YAML brings repository-based review and branching. Preserve the distinction between that benefit and the history and task-group reuse already available in Classic.
References
- AZ-400 skills outline
- Configure and pay for parallel jobs - Azure DevOps
- Azure Pipelines retention policies
- Migrate your Classic pipeline to YAML - Azure Pipelines
- Classic pipeline definition history
- Classic pipeline task groups
- Manage flaky tests - Azure Pipelines
Continue Learning
- ✓Pipeline health monitoring tracks failure rate, duration trend, and flaky test rate as distinct signals; a low failure rate can still hide a high flaky rate that erodes trust in the pipeline's results
- ✓Caching can reduce repeated downloads; parallel jobs reduce duration only when matching agents and parallel-job capacity are available
- ✓Pipeline concurrency requires parallel-job entitlements and matching agents; runner-minute allowances measure usage rather than simultaneous job capacity
- ✓Configure project-level run retention and explicitly retain important release evidence; package retention is separate, and deleting a run removes its associated pipeline artifacts
- ✓YAML gains Git branching, pull-request review, and template reuse alongside application code; Classic already has definition history and reusable task groups
1. A pipeline usually passes, but developers routinely re-run failed builds without investigating because "it's probably flaky" and are frequently right. Which specific pipeline health metric does this describe?
2. A team configures 50 parallel jobs in their pipeline settings, but their organization is only licensed for 10 concurrent parallel jobs. What is the practical effect?
3. What repository-based capability does migrating a Classic pipeline to YAML add?