Delegate RunService.GetActionData to DataProxyService to remove duplicate implementation
What
RunService.GetActionData (runs/service/run_service.go:741) and dataproxy.Service.GetActionData (dataproxy/service/dataproxy_service.go:444) both do the same job: resolve the input/output URIs for an action and read the protobuf payloads back from blob storage.
The canonical home for blob-backed data access is now the DataProxy service. The RunService.GetActionData RPC is only kept for backward compatibility with existing clients.
Why
Today both services:
- Hold a
storage.DataStoreand implement parallel reads ofinputs.pb/ outputs viaerrgroup. - Resolve storage URIs from the action record (DataProxy goes through
RunService.GetActionDataURIs; RunService reads them directly from the DB). - Must stay in lock-step whenever we evolve the storage layout, artifact types, or error semantics (not found, partial results, trace vs task actions, etc.).
This is duplicate surface area with no good reason now that DataProxy owns data access. It also makes the storage-layout contract implicit in two places.
Proposed change
Refactor RunService.GetActionData into a thin shim that forwards to DataProxyServiceClient.GetActionData:
- Inject a
dataproxyconnect.DataProxyServiceClientintoRunService(likely the in-process one for the all-in-one binary). - In
GetActionData:- Validate the request as today.
- Call
DataProxyService.GetActionDatawith the sameaction_id. - Convert the
dataproxy.GetActionDataResponsetoworkflow.GetActionDataResponse(schemas need to be checked for 1:1 compatibility — they currently both usetask.Inputs/task.Outputsso this should be trivial).
- Remove the direct
dataStore/reporeads from this RPC once delegation is in place. The URI resolution logic already lives behindGetActionDataURIs, which DataProxy calls. - Keep the
runsRPC registered so existing clients keep working.
Open questions
- Response compatibility: confirm
dataproxy.GetActionDataResponse⇄workflow.GetActionDataResponsefield compatibility (both appear to usetask.Inputs/task.Outputs; double-check trace-action output handling, which is special-cased in the run-service implementation around lines 794-818). - Whether trace-action output handling (reading from
RunInfo.OutputsUri) is already covered on the DataProxy side — if not, that logic needs to move to DataProxy as part of this work, not be left in the run-service shim.
References
runs/service/run_service.go:741— currentRunService.GetActionDatadataproxy/service/dataproxy_service.go:444— DataProxyGetActionData(target delegate)- #7252 — sibling issue doing the same delegation for
TailLogs
#take