6.5 Bazel CI at Scale

Sections in this chapter · 9

6.5.1Affected-Target Service Contract

Use this before building or choosing an affected-target service to define its inputs, outputs, scope, explanations, and explicit unknown result.

6.5.2Comparing Bazel Graphs Across Revisions

Compare compatible base and head graph snapshots, then trace their differences to requested roots with evidence for selected, omitted, or unknown results.

6.5.3Global Target-Selection Invalidators

Use this when BUILD, Starlark, bazelrc, module, lockfile, repository-extension, platform, or toolchain changes can make a source-only affected set dangerously incomplete.

6.5.4Selecting Affected Targets Across Configurations

Use this when select(), transitions, platforms, toolchains, or multiple top-level roots make one target graph an incomplete picture of CI work.

6.5.5Incomplete Selector Evidence

Detect when delete, rename, stale, missing, or incompatible selector evidence cannot justify an empty affected-target result.

6.5.6Fail-Closed Target Selection

Use this when choosing fallback, shadow validation, and a maintained selector implementation without allowing uncertainty or product limits to produce false-green CI.

6.5.7CI Work Distribution

Use this when partitioning selected work across jobs without omissions, duplicate accounting, or confusion with Bazel test sharding and RBE.

6.5.8Complete CI Results with BEP/BES

Use this when a green dashboard may still be missing an attempt, shard, event, log, profile, output, or referenced artifact.

6.5.9Reusing CI Runners Safely

Use this when retaining checkout, Bazel server, output base, caches, or credentials between CI jobs without contaminating the next build.