Cram Sheet325 words
Topic 3.6 — Maintaining pipelines — cram sheet
Topic 3.6 — Maintaining pipelines · cram sheet
Health
| Metric | Question |
|---|---|
| Failure rate | Is it trustworthy? |
| Duration | Is feedback fast enough? |
| Flaky test rate | Can we believe a red build? |
Flaky tests are worse than failures — they train the team to re-run, so a healthy-looking failure rate hides retried-away regressions. The signal is in the trend.
Optimisation
| Lever | Effect |
|---|---|
| Caching | Skip restore when the key matches |
| Parallelism | Independent work across jobs |
| Path filters | Don't build at all — the cheapest win |
Matrix + maxParallel | Many legs, throttled |
| Artifacts | Build once, download downstream |
| Self-hosted | Warm caches persist |
- Measure first. The slow stage is rarely the assumed one.
- Cache key on the lockfile hash — a commit SHA never hits, too broad serves stale.
- Concurrency billing: parallelism ≈ free with spare slots. Per-minute: it can cost more.
Concurrency
- A Microsoft-hosted parallel job = a concurrency slot, not a time allowance.
- Slots are an organisation-level resource; matrix legs and other pipelines consume them.
maxParallelbounds a matrix. It is only valid withmatrix, andparallel/matrixare mutually exclusive.
Retention
- Retain artifacts at least as long as the rollback window. Otherwise a rollback becomes a rebuild mid-incident.
- Deleting the producing run loses the audit link to production.
- Feed retention is a separate policy — often a longer window.
Classic → YAML migration
| Classic release | YAML | |
|---|---|---|
| Multiple jobs | Sequential | Parallel |
| Job dependencies | Not supported | dependsOn |
| Task groups | Supported | Not supported → templates |
Run both in parallel and compare before retiring the classic definition — it is the only oracle for correct behaviour.