Skip to content

Commit c99dd69

Browse files
committed
Remove RUNNING+failed-task warning from execute()
The extra get_workflow() call on every RUNNING return adds an unnecessary network round-trip. The underlying behavior (workflow stays RUNNING while a failed task awaits retries) is correct Conductor behavior, not a bug — tracked as a docs gap in conductor-oss/getting-started#53.
1 parent 19d05a9 commit c99dd69

1 file changed

Lines changed: 1 addition & 18 deletions

File tree

src/conductor/client/workflow/executor/workflow_executor.py

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
11
from __future__ import annotations
2-
import logging
32
import uuid
43
from typing import Any, Dict, List, Optional, TYPE_CHECKING
54

6-
logger = logging.getLogger(__name__)
7-
85
from typing_extensions import Self
96

107
from conductor.client.configuration.configuration import Configuration
@@ -125,26 +122,12 @@ def execute(self, name: str, version: Optional[int] = None, workflow_input: Any
125122
if domain is not None:
126123
request.task_to_domain = {"*": domain}
127124

128-
workflow_run = self.workflow_client.execute_workflow(
125+
return self.workflow_client.execute_workflow(
129126
start_workflow_request=request,
130127
request_id=request_id,
131128
wait_until_task_ref=wait_until_task_ref,
132129
wait_for_seconds=wait_for_seconds,
133130
)
134-
if getattr(workflow_run, 'status', None) == 'RUNNING':
135-
try:
136-
full = self.workflow_client.get_workflow(workflow_run.workflow_id, include_tasks=True)
137-
failed = [t for t in (full.tasks or []) if t.status in ('FAILED', 'FAILED_WITH_TERMINAL_ERROR')]
138-
if failed:
139-
t = failed[0]
140-
reason = getattr(t, 'reason_for_incompletion', None) or 'see server logs'
141-
logger.warning(
142-
"Workflow %s returned RUNNING after timeout, but task '%s' has status %s: %s",
143-
workflow_run.workflow_id, t.reference_task_name, t.status, reason,
144-
)
145-
except Exception:
146-
pass
147-
return workflow_run
148131

149132
def remove_workflow(self, workflow_id: str, archive_workflow: Optional[bool] = None) -> None:
150133
"""Removes the workflow permanently from the system"""

0 commit comments

Comments
 (0)