Abstract
Core libraries in massive codebases are dependency
hot-spots with high code churn and an immense number of
reverse dependencies. A small code change in these libraries
can impact a vast number of clients, creating a massive blast
radius of costly breakages if a bug or regression is submitted.
To prevent expensive post-submit breakages, it is not feasible to
test global dependencies during the pre-submit stage for each
code change because of resource limitations and the desire for
minimal developer friction.
In this paper, we propose a novel ranking-based approach that
utilizes a hybrid call graph to test global dependencies during the
pre-submit stage. Our method leverages the call graph to select a
per-commit subset of these global dependencies and to generate
inexpensive graph structural features that allow our machine
learning model to learn the complex relationships between library
code changes and client tests to predict failures. Evaluating our
approach on 10 high-impact core libraries with an average test
suite size of 220,000, we demonstrate that a fixed budget of 2,000
tests per commit, representing just 0.9% of the total execution
cost, effectively catches regressions for 40% of failing commits.