Skip to content

refactor(orchestrator): accept entity.GetTargetGraphRequest in orchestrator.GetTargetGraph#187

Open
yushan8 wants to merge 2 commits into
entity/mapper-cache-keysfrom
entity/wire-mapper-callsites
Open

refactor(orchestrator): accept entity.GetTargetGraphRequest in orchestrator.GetTargetGraph#187
yushan8 wants to merge 2 commits into
entity/mapper-cache-keysfrom
entity/wire-mapper-callsites

Conversation

@yushan8

@yushan8 yushan8 commented Jul 12, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Orchestrator.GetTargetGraph now takes entity.GetTargetGraphRequest directly (the GetTargetGraphParam wrapper is removed — it only ever wrapped the request plus a redundant BypassCache field), converted once at the boundary via mapper.ProtoToGetTargetGraphRequest in controller.GetTargetGraph.
  • Gives internal/mapper's proto→entity conversions an actual caller and keeps the Orchestrator interface transport-agnostic.
  • native_orchestrator.go consumes entity fields directly throughout — no entity->proto bridge is introduced or ever needed, since RepoManager.Lease and the cache-path helpers were already made entity-typed in refactor(mapper): move cache-path helpers into internal/mapper #193/refactor(repomanager): entity-type RepoManager.Lease #192.

Test plan

  • go build ./...
  • go test ./core/common/... ./core/repomanager/... ./orchestrator/... ./controller/... ./internal/mapper/...
  • bazel build/bazel test on the same packages
  • make gazelle
  • grep -rn "buildDescriptionToProto\|computationStrategyToProto" returns nothing

Stack (bottom to top):

  1. feat(entity): add domain types for BuildDescription and GetTargetGraphRequest #189
  2. refactor(mapper): move cache-path helpers into internal/mapper #193
  3. refactor(repomanager): entity-type RepoManager.Lease #192
  4. @ refactor(orchestrator): accept entity.GetTargetGraphRequest in orchestrator.GetTargetGraph #187

@yushan8 yushan8 requested review from a team as code owners July 12, 2026 23:31
@yushan8 yushan8 marked this pull request as draft July 12, 2026 23:34
@yushan8 yushan8 force-pushed the entity/wire-mapper-callsites branch 2 times, most recently from b55447f to 9682039 Compare July 13, 2026 05:05
@yushan8 yushan8 changed the base branch from entity/domain-types to entity/mapper-cache-keys July 13, 2026 05:05
@yushan8 yushan8 force-pushed the entity/mapper-cache-keys branch from 18d425d to 1ef0530 Compare July 13, 2026 05:49
@yushan8 yushan8 force-pushed the entity/wire-mapper-callsites branch from 9682039 to cf53dc9 Compare July 13, 2026 05:49
@yushan8 yushan8 force-pushed the entity/mapper-cache-keys branch from 1ef0530 to 69e5210 Compare July 13, 2026 06:09
@yushan8 yushan8 force-pushed the entity/wire-mapper-callsites branch from cf53dc9 to 22db6e8 Compare July 13, 2026 06:09
@yushan8 yushan8 force-pushed the entity/mapper-cache-keys branch from 69e5210 to c4b913a Compare July 13, 2026 06:33
yushan8 and others added 2 commits July 12, 2026 23:34
…ntroller boundaries

Move the entity type one layer further up the call chain: orchestrator.GetTargetGraphParam.Req
and controller.getGraph now take entity.GetTargetGraphRequest directly. Proto requests are
converted to entity types exactly once, at the RPC boundary (controller.GetTargetGraph,
controller.GetChangedTargets' fan-out), so the inline mapper.ProtoToBuildDescription conversions
added in the previous commit become redundant downstream and are removed. No entity->proto
bridge is ever needed.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…etGraphRequest directly

GetTargetGraphParam only wrapped entity.GetTargetGraphRequest plus a
BypassCache field that always mirrored req.BypassCache at the only call
site. Orchestrator.GetTargetGraph now takes entity.GetTargetGraphRequest
directly, removing the redundant wrapper type.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@yushan8 yushan8 force-pushed the entity/wire-mapper-callsites branch from 741f674 to d896b91 Compare July 13, 2026 06:37
@yushan8 yushan8 marked this pull request as ready for review July 13, 2026 06:46
@yushan8 yushan8 changed the title refactor(orchestrator): accept entity.GetTargetGraphRequest at the Orchestrator boundary refactor(orchestrator): accept entity.GetTargetGraphRequest in orchestrator.GetTargetGraph Jul 13, 2026
@yushan8 yushan8 changed the title refactor(orchestrator): accept entity.GetTargetGraphRequest in orchestrator.GetTargetGraph refactor(orchestrator): accept entity.GetTargetGraphRequest in orchestrator.GetTargetGraph Jul 13, 2026
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