Delegate RunService.GetActionData to DataProxyService #7284
Merged
Conversation
…cate implementation Signed-off-by: Barry Wu <a0987818905@gmail.com>
pingsutw
reviewed
Apr 27, 2026
| if err := s.dataStore.ReadProtobuf(groupCtx, inputRef, resp.Inputs); err != nil { | ||
| logger.Errorf(groupCtx, "GetActionData: failed to read inputs from %s: %v", inputRef, err) | ||
| return connect.NewError(connect.CodeInternal, fmt.Errorf("failed to read inputs from %s: %w", inputRef, err)) | ||
| if !storage.IsNotFound(err) { |
Member
There was a problem hiding this comment.
Should we return an error if the input is not found?
Contributor
Author
There was a problem hiding this comment.
I saw the original logic is to skip the error that input is not found, so I kept the same logic.
| } | ||
| resp.Outputs = &task.Outputs{ | ||
| Literals: inputsOrOutputs.GetLiterals(), | ||
| if !storage.IsNotFound(err) { |
pingsutw
approved these changes
Apr 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Delegate RunService.GetActionData to DataProxyService to remove duplicate implementation
Closes #7253
Why are the changes needed?
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.
What changes were proposed in this pull request?
Refactor
RunService.GetActionDatainto a thin shim that forwards toDataProxyServiceClient.GetActionData:Inject a
dataproxyconnect.DataProxyServiceClientintoRunService(likely the in-process one for the all-in-one binary).In
GetActionData:DataProxyService.GetActionDatawith the sameaction_id.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.How was this patch tested?
Labels
Please add one or more of the following labels to categorize your PR:
This is important to improve the readability of release notes.
Setup process
Screenshots
Check all the applicable boxes
Related PRs
Docs link
main