Skip to content

add internal/targetdiff#168

Merged
sywhang merged 3 commits into
mainfrom
pkg-reorg
Jul 9, 2026
Merged

add internal/targetdiff#168
sywhang merged 3 commits into
mainfrom
pkg-reorg

Conversation

@sywhang

@sywhang sywhang commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

This is part of refactoring the core package structures to make it more sensible.

Currently, our controller layer is not really a controller - that's a full on handler that bundles up the proto RPC request layer + what looks like should be 3 different controller methods:

  • change graph computation thru bazel
  • graph caching
  • comparison

all bundled up in to a single method: GetChangedTargets.

Not only that violates the service architecture, but also this whole thing makes it difficult to test and leaks RPC abstraction into various parts of the logic.

Let's begin by creating a separate package for graph comparison.

internal/targetdiff is an internal pkg that lets us compare targets across two changed targets graph.

This is part of refactoring the core package structures to make it more
sensible.

Currently, our controller layer is not really a controller - that's
a full on handler that bundles up the proto RPC request layer + what
looks like should be 3 different controller methods:
- change graph computation thru bazel
- graph caching
- comparison

all bundled up in to a single method: GetChangedTargets.

Not only that violates the service architecture, but also this whole
thing makes it difficult to test and leaks RPC abstraction into
various parts of the logic.

Let's begin by creating a separate package for graph comparison.

internal/targetdiff is an internal pkg that lets us compare targets
across two changed targets graph.
@sywhang sywhang requested review from a team as code owners July 9, 2026 20:31
Comment thread internal/targetdiff/compare.go Outdated
Comment thread internal/targetdiff/compare.go Outdated
@sywhang sywhang merged commit 3662f8a into main Jul 9, 2026
8 checks passed
@sywhang sywhang deleted the pkg-reorg branch July 9, 2026 23:01
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.

3 participants