Designing a language Agnostic CI using Bazel queries
summary
Pinterest replaces a fragile Python dispatcher with a tested Go CLI called build collector that takes two git SHAs, runs Bazel queries (set, rdeps/deps, tests, kind and sky query), and emits JSON lists of targets for test, build and release stages. It cuts runs against a Java monorepo of 250 services and ~7,000 Bazel targets by computing minimal affected targets instead of rebuilding everything, and uses artifact CI release and artifact dev release macros to enforce push-before-manifest ordering.
AI-written summary · about
chapters (12)
- 0:00CI with Bazel queries intro
- 1:04Pinterest monorepo Bazel migration
- 3:34New CI tooling requirements
- 4:38Build Collector design
- 5:41Bazel queries for file changes
- 8:05CI stages and code confidence
- 9:51Filtering test release targets
- 10:58Custom release macros performance
- 13:25Developer experience with rules
- 15:11Build Collector in CI stages
- 16:13New system achievements
- 16:55Future plans for tests scaling








