~/talk

Selective Testing + Q&A

Talkat BazelCon 2019 · 2019-12-11..12-12· [devops-and-delivery, testing]
links:none on file
slides:none on file

Addresses test-selection for CI by computing the exact set of tests that could be affected by a change rather than running bazel test ... everywhere. Starts with reverse rdeps via bazel query but covers failures for modified BUILD files, .bzl changes, deleted files, recursive globs and external workspaces. Final solution snapshots query output (target protos) on old and new revisions, compares them via rule proto hashing (a Merkle-style tree) to detect changed targets, and runs that inside a cached, parallel query service for ~2 minute selection latency.

AI-written summary · about

  1. 0:00Introduction and speaker setup
  2. 4:57Defining the selection problem in CI
  3. 7:05Limitations of running all tests with Bazel
  4. 9:11Input and problem definition for target selection
  5. 10:16Controlling example with the slashfu package
  6. 11:19Using Bazel query for dependency analysis
  7. 12:21Complexities and gotchas of Bazel query
  8. 13:25Initial solution with rdeps and test functions
  9. 14:10Problem one: Modifying build files
  10. 15:56Fixing build file changes with siblings and filter
  11. 16:39Problem two: Modifying Starlark files
  12. 17:22Introducing Sky Query for Starlark files
  13. 20:09Problem three: Deleting files
  14. 20:31Handling deleted files with two queries
  15. 21:33Problem four: Adding or removing build files
  16. 22:13Glob function limitations and file system traversal
  17. 23:17Combining fixes into a universal query
  18. 23:41Reconsidering the approach with target hashing
  19. 25:06Introducing the build miracle tree concept
  20. 26:10Hashing targets and their dependencies
  21. 27:15Computing changed targets between revisions
  22. 28:21Trade-offs of the hashing approach
  23. 29:05Handling external workspaces and limitations
  24. 30:28Disgusting hack for external workspace rules
  25. 31:11Optimizing target selection with a Bazel query service
  26. 32:13Benefits of the Bazel query service
  27. 33:18Operating the Bazel query service
  28. 34:21Challenges with Git and system stability
  29. 35:02Being incorrect for profit in test selection
  30. 35:22Limitations of running only affected tests
  31. 36:04Batching and policy-based test pruning
  32. 37:08Predictive testing and machine learning
  33. 38:12Closing remarks and Q&A introduction
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.