<#6490 [BUG] sync_node_executions fails for workfl...
# flyte-github
c
#6490 [BUG] sync_node_executions fails for workflows with BranchNode and FailureNodes Issue created by cjidboon94 ### Flyte & Flytekit version flytekit==1.15 Flyte-binary v1.15 ### Describe the bug When using flytekit's
FlyteRemote
and calling
remote.wait
on an execution of a workflow that contains a BranchNode, I get the following error because of a subcall to `sync_node_execution`:
Copy code
execution = remote.wait(execution=execution, timeout=timeout)
../../../../../anaconda3/envs/flyte/lib/python3.10/site-packages/flytekit/remote/remote.py:2384: in wait
    execution = self.sync_execution(execution, sync_nodes=sync_nodes)
../../../../../anaconda3/envs/flyte/lib/python3.10/site-packages/flytekit/remote/remote.py:2479: in sync_execution
    node_execs[n.id.node_id] = self.sync_node_execution(n, node_mapping)  
E           AttributeError: 'FlyteBranchNode' object has no attribute 'interface'

../../../../../anaconda3/envs/flyte/lib/python3.10/site-packages/flytekit/remote/remote.py:2648: AttributeError
Similarly when using remote.wait on an execution that has `FailureNode`s specified and the execution fails I get the following error:
ValueError: Missing node from mapping: fn0
### Expected behavior That a call to
FlyteRemote.wait
works for all possible workflows (including ones with `FailureNode`s and `FlyteBranchNode`s) as expected. ### Additional context to reproduce
Copy code
# Trigger workflow using local code
  execution_id = run("workflow.py","workflow")
  # Observe it
  remote = FlyteRemote(Config.auto(config_file=CONFIG), PROJECT, DOMAIN)
  execution = remote.fetch_execution(name=execution_id)
  # Assert that it ran under 120 seconds. Wait throws an exception in case of timeout
  try:
    execution = remote.wait(execution=execution, timeout=datetime.timedelta(minutes=2))
  except FlyteTimeout as timeout:
     assert False, timeout
  print("Execution Error:", execution.error)
  assert execution.closure.phase == WorkflowExecutionPhase.SUCCEEDED, f"Execution failed with phase: {execution.closure.phase}"
where the
workflow
in
workflow.py
is some workflow that has either conditionals (which create a to
FlyteBranchNode
) or
FailureNode
. ### Screenshots No response ### Are you sure this issue hasn't been raised already? • Yes ### Have you read the Code of Conduct? • Yes flyteorg/flyte