diff --git a/flytekit/remote/remote.py b/flytekit/remote/remote.py index 60ae7bbf3e..2178f148d3 100644 --- a/flytekit/remote/remote.py +++ b/flytekit/remote/remote.py @@ -1117,6 +1117,14 @@ def sync_node_execution( """ # For single task execution - the metadata spec node id is missing. In these cases, revert to regular node id node_id = execution.metadata.spec_node_id + # This case supports single-task execution compiled workflows. + if node_id and node_id not in node_mapping and execution.id.node_id in node_mapping: + node_id = execution.id.node_id + remote_logger.debug( + f"Using node execution ID {node_id} instead of spec node id " + f"{execution.metadata.spec_node_id}, single-task execution likely." + ) + # This case supports single-task execution compiled workflows with older versions of admin/propeller if not node_id: node_id = execution.id.node_id remote_logger.debug(f"No metadata spec_node_id found, using {node_id}")