Skip to content

Commit

Permalink
fix flyte remote bugs (flyteorg#737)
Browse files Browse the repository at this point in the history
* fix flyte remote bugs

Signed-off-by: Niels Bantilan <[email protected]>

* fetch workflow id

Signed-off-by: Niels Bantilan <[email protected]>
Signed-off-by: Robert Everson <[email protected]>
  • Loading branch information
cosmicBboy authored and Robert Everson committed May 27, 2022
1 parent 0245978 commit d11d4b1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
7 changes: 2 additions & 5 deletions flytekit/remote/remote.py
Original file line number Diff line number Diff line change
Expand Up @@ -1030,12 +1030,9 @@ def sync_workflow_execution(
lp_id = execution.spec.launch_plan
if execution.spec.launch_plan.resource_type == ResourceType.TASK:
flyte_entity = self.fetch_task(lp_id.project, lp_id.domain, lp_id.name, lp_id.version)
elif execution.spec.launch_plan.resource_type in {ResourceType.WORKFLOW, ResourceType.LAUNCH_PLAN}:
flyte_entity = self.fetch_workflow(lp_id.project, lp_id.domain, lp_id.name, lp_id.version)
else:
raise user_exceptions.FlyteAssertion(
f"Resource type {execution.spec.launch_plan.resource_type} not recognized. Must be a TASK or WORKFLOW."
)
wf_id = self.fetch_launch_plan(lp_id.project, lp_id.domain, lp_id.name, lp_id.version).workflow_id
flyte_entity = self.fetch_workflow(wf_id.project, wf_id.domain, wf_id.name, wf_id.version)

# sync closure, node executions, and inputs/outputs
execution._closure = self.client.get_execution(execution.id).closure
Expand Down
1 change: 0 additions & 1 deletion flytekit/remote/workflow_execution.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ def __init__(self, *args, **kwargs):
self._node_executions = None
self._inputs = None
self._outputs = None
self._closure = None

@property
def node_executions(self) -> Dict[str, _nodes.FlyteNodeExecution]:
Expand Down

0 comments on commit d11d4b1

Please sign in to comment.