@@ -213,7 +213,8 @@ def _handle_pod_message(self, msg: PodMessage) -> None:
213
213
_LOGGER .debug (
214
214
"API.get_instance(%s) returned: -\n %s" , instance_id , str (response )
215
215
)
216
- r_wfsid : str = response ["running_workflow_step" ]
216
+ r_wfsid : str | None = response .get ("running_workflow_step_id" )
217
+ assert r_wfsid
217
218
rwfs_response , _ = self ._wapi_adapter .get_running_workflow_step (
218
219
running_workflow_step_id = r_wfsid
219
220
)
@@ -225,7 +226,7 @@ def _handle_pod_message(self, msg: PodMessage) -> None:
225
226
step_name : str = rwfs_response ["name" ]
226
227
227
228
# Get the step's running workflow record.
228
- r_wfid = rwfs_response ["running_workflow" ]
229
+ r_wfid : str = rwfs_response ["running_workflow" ]
229
230
assert r_wfid
230
231
rwf_response , _ = self ._wapi_adapter .get_running_workflow (
231
232
running_workflow_id = r_wfid
@@ -280,7 +281,7 @@ def _handle_pod_message(self, msg: PodMessage) -> None:
280
281
str (response ),
281
282
)
282
283
assert "id" in rwfs_response
283
- r_wfsid = rwfs_response ["id" ]
284
+ new_r_wfsid : str = rwfs_response ["id" ]
284
285
project_id = rwf_response ["project" ]["id" ]
285
286
variables = rwf_response ["variables" ]
286
287
lp : LaunchParameters = LaunchParameters (
@@ -292,15 +293,15 @@ def _handle_pod_message(self, msg: PodMessage) -> None:
292
293
specification = json .loads (next_step ["specification" ]),
293
294
specification_variables = variables ,
294
295
running_workflow_id = r_wfid ,
295
- running_workflow_step_id = r_wfsid ,
296
+ running_workflow_step_id = new_r_wfsid ,
296
297
)
297
298
lr = self ._instance_launcher .launch (lp )
298
299
# Handle a launch error?
299
300
if lr .error_num :
300
301
self ._set_step_error (
301
302
next_step_name ,
302
303
r_wfid ,
303
- r_wfsid ,
304
+ new_r_wfsid ,
304
305
lr .error_num ,
305
306
lr .error_msg ,
306
307
)
0 commit comments