Netflix Builds Quasar to Measure the Blast Radius of Library API Changes
Netflix developed Quasar, an internal tool that combines semantic code indexing and API comparisons to identify downstream consumers affected by library changes, helping maintainers assess migration impact and make informed release decisions.
Overview
Netflix has developed Quasar, an internal tool that identifies which repositories use specific library API symbols, helping engineering teams assess the downstream impact of proposed changes before releasing them. The tool combines semantic code indexing with API comparisons to identify affected consumers, dependency versions, and relevant call sites across repositories.
Problem or Opportunity
The challenge extends beyond identifying whether an API change is incompatible. Compatibility tools can flag a removed method or changed signature, but they do not necessarily identify which applications call it. Dependency graphs show declared relationships rather than actual usage, while text searches can miss references involving inheritance, overloads, and generated code. Building every downstream consumer to validate a change can also be expensive.
Technical Approach
Quasar indexes symbol definitions and references using the SCIP Code Intelligence Protocol, an open format for representing code relationships. Language-specific indexers submit data during CI builds, which Quasar stores in Amazon S3 as Parquet files and queries through Amazon Athena.
During pull request analysis, Quasar compares API definitions between commits and identifies added, removed, or modified symbols. It then queries indexed references to locate affected repositories, dependency versions, and source locations. A Netflix example shows a deprecated method removal affecting 137 repositories across three library versions.
Architecture and Key Components
- SCIP (Semantic Code Intelligence Protocol): An open format for representing code relationships, used by language-specific indexers to submit data during CI builds.
- Amazon S3: Stores indexed data as Parquet files, which Quasar queries using Amazon Athena.
- Amazon Athena: Queries indexed data to identify affected repositories, dependency versions, and source locations.
Implementation Considerations
- Indexing: Language-specific indexers submit data during CI builds, which Quasar stores in Amazon S3 as Parquet files.
- Querying: Quasar queries indexed data using Amazon Athena to identify affected repositories, dependency versions, and source locations.
Benefits, Trade-offs, and Limitations
- Benefits: Helps maintainers assess migration impact and make informed release decisions, reducing the risk of breaking downstream consumers.
- Trade-offs: An absence of indexed references does not prove that an API is unused. Reflection, dynamic loading, stale indexes, and incomplete coverage can prevent Quasar from observing every consumer.
- Limitations: Reflection and incomplete indexing remain blind spots, and Netflix is investing in runtime analysis to complement the static evidence. Together, these signals help inform removal decisions, without guaranteeing that an API is safe to delete.
Key Takeaways
- Netflix's Quasar tool helps engineering teams assess the downstream impact of proposed library API changes, reducing the risk of breaking downstream consumers.
- The tool combines semantic code indexing with API comparisons to identify affected consumers, dependency versions, and relevant call sites across repositories.
- Netflix plans to move impact analysis earlier into coding workflows, allowing agents to identify public API changes and retrieve consumer information before pull requests are opened.
Sources
Netflix Builds Quasar to Measure the Blast Radius of Library API Changes