Skip to content

fix changed targets streaming - #19

Merged
xytan0056 merged 2 commits into
mainfrom
tanx/fixchanged
Feb 18, 2026
Merged

xytan0056 merged 2 commits into
mainfrom
tanx/fixchanged

Conversation

@xytan0056

@xytan0056 xytan0056 commented Feb 17, 2026 •

Copy link
Copy Markdown
Contributor

Fix streaming bug in GetChangedTargets where only the first chunk was read from storage, causing incomplete target graph comparisons.
get-changed-targets call now returns returns nothing and nil metadata

Why?

The GetChangedTargets function was only reading the first chunk from storage, but target graphs are serialized as multiple delimited messages (chunks + metadata). Currently missing metadata entirely. We should do what GetTargetGraph does here -- for loop read until eof

What?

  1. properly reads all chunks from the GraphReader until EOF
  2. unit tests
  3. misc : cleanup logging

Test Plan

  1. unit tests
  2. local tests

bazel run //example/client:client -- -addr 127.0.0.1:8081 -method get-changed-targets -remote https://github.com/uber/tango.git -base-sha 47f5e72

Issue

@xytan0056
xytan0056 marked this pull request as ready for review February 17, 2026 23:16
@xytan0056
xytan0056 requested review from a team as code owners February 17, 2026 23:16
}
chunks = append(chunks, chunk)
}
graph, err := graphReader.Read()

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

graphreader only reads one chunk

for range jobs {
select {
case res := <-results:
if res.graph != nil {

@xytan0056 xytan0056 Feb 17, 2026 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

at this point, the graphreader is done or eof, so we should makr jobs[res.order].completed = true and update jobs[res.order].err accordingly

@xytan0056
xytan0056 merged commit 979952b into main Feb 18, 2026
1 check passed
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.

2 participants