Skip to content

Lesson 9 of 9 · 25m

Operating Pipelines at Scale: Ownership, Flakes, and Change Control

Keep CI trustworthy as teams grow: ownership, observability, flaky-job management, template versioning, and migration strategy.

At scale, CI is a product with internal customers. Developers judge it on two things: whether feedback is fast and whether a red pipeline means something real. Once either property collapses, people stop trusting CI, then stop reading it, then start merging around it. Operating pipelines means defending that trust.

Ownership cannot be everybody

Shared pipelines decay because everyone uses them and nobody owns them. Assign ownership for templates, runner fleets, security scanner policy, and base images. Ownership does not mean one person edits every file; it means someone is accountable for behavior, upgrades, and incident response.

A lightweight ownership map beats a heroic wiki page:

ci-templates/           platform-team
security-scanning.yml   appsec-team
docker-base-images/     platform-team
review-app-scripts/     developer-experience

Flaky jobs are reliability defects

A flaky test is not harmless because a retry sometimes passes. It burns compute, trains people to rerun instead of investigate, and hides real regressions. Track flake rate. Quarantine only with an owner and expiry date.

Bad culture: "just retry it." Better culture: "this job failed twice on the same assertion in a week; who owns the dependency?"

Use retries for infrastructure-level interruptions, not assertions:

integration-test:
  retry:
    max: 1
    when:
      - runner_system_failure
      - stuck_or_timeout_failure

Do not retry script_failure by default. That retries your product defect and makes the signal worse.

Template changes are production changes

Changing a shared CI template can alter thousands of pipelines instantly. Treat it like a service rollout: versioned releases, changelog, compatibility notes, canary projects, and rollback.

include:
  - project: platform/ci-templates
    ref: v3.2.1
    file: node/test.yml

If the template introduces a new required variable, fail with a clear error. Silent behavior changes create multi-team debugging sessions.

Observe the CI system itself

At minimum track pipeline duration percentiles, queue time, failure rate, rerun rate, job count per pipeline, artifact storage growth, cache hit ratio, and runner utilization. Add project or team labels where possible. Averages lie; a p95 pipeline time tells you how the slowest teams experience CI.

Migration strategy

Large migrations — new runner fleet, new security scanner, new template layout — need a compatibility window. Support old and new interfaces briefly, migrate high-value repos first, and publish a shutdown date. Forever compatibility is how temporary adapters become permanent complexity.

Field notes

  • Shared CI needs named owners or it becomes abandoned infrastructure.
  • Retries are for infrastructure failure, not product failure.
  • Template versions are releases; floating refs are uncontrolled rollouts.
  • Rerun rate is a trust metric as much as a cost metric.
  • Measure p95 pipeline duration, not just mean duration.

Was this lesson helpful?

Sign in to rate