<#7064 Fix CreateRun response, output URI, and Get...
# flyte-github
a
#7064 Fix CreateRun response, output URI, and GetActionData Pull request opened by pingsutw Tracking issue Related to #6991 Why are the changes needed? 1. CreateRunResponse was incomplete — only returned the action ID without metadata or status from the DB model 2. Output URI was missing
/outputs.pb
suffix
— the executor's
outputRefs
stored the prefix path (e.g., `s3://flyte-data/&lt;id&gt;`) instead of the full file path (`s3://flyte-data/&lt;id&gt;/outputs.pb`), causing
GetActionData
to fail reading outputs 3. GetActionData was fragile — constructed output paths manually from
runOutputBase
instead of reading the URI stored in action attempts What changes were proposed in this pull request? •
runs/service/run_service.go
: Use
convertRunToProto(run)
for `CreateRunResponse`; refactor
GetActionData
to read outputs from attempt URIs with concurrent `errgroup`; set root action name to
runId.Name
•
executor/pkg/controller/taskaction_controller.go
: Append
/outputs.pb
to output URI in
outputRefs
•
runs/repository/impl/action.go
: Append
/inputs.pb
to inputUri when creating run; set initial
Attempts
to 1; remove debug logging •
runs/repository/models/action.go
: Add
Attempts
field to Action model •
runs/repository/interfaces/action.go
: Rename
inputUri
param to
inputPrefix
for clarity How was this patch tested? Unit tests added: •
TestFillDefaultInputs
— default input filling with various edge cases •
TestTaskIdFromTaskSpec
— task ID extraction from spec •
TestGenerateCacheKeyForTask
— cache key generation determinism and input filtering •
TestCreateRun_ResponseUsesRunModel
— verifies response populated from DB model •
TestCreateRun_ActionIDUsesRunName
— verifies action ID uses run name •
TestGetActionData_ReadsOutputFromAttempts
— verifies output read from attempt URI •
TestGetActionData_NonSucceededSkipsOutputs
— verifies output skipped for non-terminal actions •
TestOutputRefs
— verifies executor output URI includes
/outputs.pb
Labels • fixed: Bug fix for output URI and CreateRun response • changed: GetActionData refactored to use attempt URIs Check all the applicable boxes •
main
• #6583 • Fix CreateRun response, output URI, and GetActionData 👈 flyteorg/flyte