Skip to content

feat(controller): Add dependent target lookup - #320

Open
prathshenoy wants to merge 1 commit into
uber:mainfrom
prathshenoy:dependent-targets
Open

prathshenoy wants to merge 1 commit into
uber:mainfrom
prathshenoy:dependent-targets

Conversation

@prathshenoy

@prathshenoy prathshenoy commented Sep 25, 2026 •

Copy link
Copy Markdown

Summary

What:

  • Add a streamed API that returns targets transitively dependent on requested targets at a specific revision.

Why:

  • Stovepipe needs to decide which services require validation for a change. It can identify changed build targets, but it cannot currently ask Tango which other targets transitively depend on them. This endpoint provides that missing graph query so Stovepipe can expand changed targets into the set of potentially affected service targets before selecting validations.
  • Without this API, Stovepipe would need to retrieve and traverse Tango’s target graph itself, duplicating graph-format handling and reverse-dependency logic outside the system that owns the graph. Keeping traversal in Tango lets Stovepipe consume a small, service-resolution-oriented result while Tango supports both its compact TGB representation and legacy graph storage.

Test Plan

  • Add unit tests covering dependent-target traversal, request validation, and streamed response batching.

Revert Plan

  • Revert this PR; no existing caller depends on the new endpoint yet, so removing the additive API requires no client migration or data cleanup.

Issues

**What**:
- Add a streamed API that returns targets transitively dependent on requested targets.
- Reuse compact reverse-dependency traversal for graph comparison and dependent-target lookup.

**Why**:
- Enable Stovepipe to identify services potentially affected by a target change before running validation.
- Let Stovepipe derive that set from Tango’s build graph instead of maintaining its own dependency graph or inferring impact from changed files.
@prathshenoy prathshenoy changed the title feat(tango): Add dependent target traversal feat(controller): Add dependent target lookup Sep 25, 2026
@prathshenoy
prathshenoy marked this pull request as ready for review September 25, 2026 16:09
@prathshenoy
prathshenoy requested review from a team as code owners September 25, 2026 16:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant