Debugging and fixing build non-determinism with Bazel
summary
Shows a concrete workflow that finds nondeterministic Bazel actions by running two clean builds, saving the binary execution logs, converting them with the exact log parser, diffing aligned plain‑text logs, and grouping differing actions with a small script (Ruby → Rust). Demonstrates debugging by downloading conflicting inputs from the remote cache (use different remote instance names), diffing object and zip contents, and fixing a zip timestamp bug in rules_apple so the rebuilt artifacts stabilize and cache hits increase.
AI-written summary · about
chapters (14)
- 0:00Build non-determinism intro
- 2:56Why deterministic builds matter
- 5:27Common non-determinism sources
- 8:18Symptoms of non-determinism
- 9:22Bazel investigation setup
- 10:26Running and logging builds
- 12:09Parsing Bazel execution logs
- 13:31Diffing execution logs
- 14:36Analyzing diffs
- 16:00Pinpointing input/output diffs
- 17:27Beyond determinism checks
- 17:47Case study: storyboard linking
- 18:50Case study: dynamic framework packaging
- 20:17Summary and future








