#3179 check execution phase before access outputs
Pull request opened by
troychiu
## Why are the changes needed?
Currently if we sync an execution which contains a launch plan, the sync would fail if the execution failed. This is because we didn't check the execution phase before access the outputs.
## What changes were proposed in this pull request?
Check if the execution is successful before access the output.
## How was this patch tested?
Tested with
from flytekit import workflow, task, LaunchPlan
@task()
def print_head(a: int) -> int:
print(1 / 1)
return a + 1
@workflow()
def easy_execution(b: int) -> int:
return print_head(a=b)
lp = LaunchPlan.create(name="lp-easy-execution", workflow=easy_execution)
@workflow()
def master(a: int) -> int:
return lp(b=a)
r = FlyteRemote()
a = r.sync(exec, sync_nodes=True)
### Summary by Bito
This PR fixes a critical bug where output access could fail for unsuccessful executions. It adds a new property to verify execution phase and updates remote logic to check execution success before accessing outputs, preventing synchronization failures from premature output access.
Unit tests added: False
Estimated effort to review (1-5, lower is better): 1
flyteorg/flytekit