<#7253 Delegate RunService.GetActionData to DataPr...
# flyte-github
a
#7253 Delegate RunService.GetActionData to DataProxyService to remove duplicate implementation Issue created by pingsutw 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.DataStore
and implement parallel reads of
inputs.pb
/ outputs via
errgroup
. • 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.DataProxyServiceClient
into
RunService
(likely the in-process one for the all-in-one binary). • In `GetActionData`: 1. Validate the request as today. 2. Call
DataProxyService.GetActionData
with the same
action_id
. 3. Convert the
dataproxy.GetActionDataResponse
to
workflow.GetActionDataResponse
(schemas need to be checked for 1:1 compatibility — they currently both use
task.Inputs
/
task.Outputs
so this should be trivial). • Remove the direct
dataStore
/
repo
reads from this RPC once delegation is in place. The URI resolution logic already lives behind
GetActionDataURIs
, which DataProxy calls. • Keep the
runs
RPC registered so existing clients keep working. Open questions • Response compatibility: confirm
dataproxy.GetActionDataResponse
⇄
workflow.GetActionDataResponse
field compatibility (both appear to use
task.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
— current
RunService.GetActionData
•
dataproxy/service/dataproxy_service.go:444
— DataProxy
GetActionData
(target delegate) • #7252 — sibling issue doing the same delegation for
TailLogs
flyteorg/flyte