Skip to content

Commit ded5280

Browse files
author
Alan Christie
committed
fix: Fix handling of get_running_workflow_step() response
1 parent 96227f2 commit ded5280

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

tests/test_test_api_adapter.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ def test_get_running_workflow_step():
240240
# Assert
241241
assert response["name"] == "step-1"
242242
assert not response["done"]
243-
assert response["running_workflow"] == rwfid
243+
assert response["running_workflow"]["id"] == rwfid
244244

245245

246246
def test_create_instance():

tests/wapi_adapter.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ def create_running_workflow_step(
137137
"name": step,
138138
"done": False,
139139
"success": False,
140-
"running_workflow": running_workflow_id,
140+
"running_workflow": {"id": running_workflow_id},
141141
}
142142
running_workflow_step[running_workflow_step_id] = record
143143

@@ -300,7 +300,7 @@ def get_running_workflow_steps(self, *, running_workflow_id: str) -> dict[str, A
300300

301301
steps = []
302302
for key, value in running_workflow_step.items():
303-
if value["running_workflow"] == running_workflow_id:
303+
if value["running_workflow"]["id"] == running_workflow_id:
304304
item = value
305305
item["id"] = key
306306
steps.append(item)

workflow/workflow_engine.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ def _handle_pod_message(self, msg: PodMessage) -> None:
226226
step_name: str = rwfs_response["name"]
227227

228228
# Get the step's running workflow record.
229-
r_wfid: str = rwfs_response["running_workflow"]
229+
r_wfid: str = rwfs_response["running_workflow"]["id"]
230230
assert r_wfid
231231
rwf_response, _ = self._wapi_adapter.get_running_workflow(
232232
running_workflow_id=r_wfid

0 commit comments

Comments
 (0)