Improving CI efficiency with Bazel querying and bazel-diff
summary
Spotify centralizes iOS, Android, Web and C++ into a single monorepo (~10 million lines of code, ~8,000 commits/month) and uses Bazel queries plus bazel-diff to compute impacted targets by comparing per-target SHA256 hashmaps between revisions. A diff job emits the minimal affected target set, pipeline tasks map to query results via YAML, and CI skips irrelevant builds; this reduces build agent usage by about 30% while keeping precise per-platform test coverage.
AI-written summary · about
