|
24 | 24 |
|
25 | 25 | import logging
|
26 | 26 | import sys
|
27 |
| -from http import HTTPStatus |
28 | 27 | from pprint import pprint
|
29 | 28 | from typing import Any, Dict, Optional
|
30 | 29 |
|
|
44 | 43 | get_step_input_variable_names,
|
45 | 44 | get_step_replicator,
|
46 | 45 | set_step_variables,
|
47 |
| - workflow_step_has_outputs, |
48 | 46 | )
|
49 | 47 |
|
50 | 48 | _LOGGER: logging.Logger = logging.getLogger(__name__)
|
@@ -250,44 +248,17 @@ def _handle_pod_message(self, msg: PodMessage) -> None:
|
250 | 248 | self._set_step_error(step_name, r_wfid, r_wfsid, exit_code, "Job failed")
|
251 | 249 | return
|
252 | 250 |
|
253 |
| - # If we get here the prior step completed successfully and we can decide |
254 |
| - # whether the step has outputs (files) that need to be written to the |
255 |
| - # Project directory, while also marking the Step as DONE (successfully). |
256 |
| - # We pass the outputs to the DM via a call to the API adapter's realise_outputs(). |
257 |
| - # In return it copies (links) these files to the Project directory. |
| 251 | + # If we get here the prior step completed successfullyso we |
| 252 | + # mark the Step as DONE (successfully). |
258 | 253 | wfid = rwf_response["workflow"]["id"]
|
259 | 254 | assert wfid
|
260 | 255 | wf_response, _ = self._wapi_adapter.get_workflow(workflow_id=wfid)
|
261 | 256 | _LOGGER.debug("API.get_workflow(%s) returned: -\n%s", wfid, str(wf_response))
|
262 | 257 |
|
263 |
| - error_num: int | None = None |
264 |
| - error_msg: str | None = None |
265 |
| - if workflow_step_has_outputs(wf_response, step_name): |
266 |
| - # The step produces at least one output. |
267 |
| - # Inform the DM so it can link them to the Project directory |
268 |
| - response, status_code = self._wapi_adapter.realise_outputs( |
269 |
| - running_workflow_step_id=r_wfsid, |
270 |
| - ) |
271 |
| - if status_code != HTTPStatus.OK: |
272 |
| - error_num = status_code |
273 |
| - error_msg = ( |
274 |
| - response["error"] |
275 |
| - if "error" in response |
276 |
| - else "Undisclosed error when realising outputs" |
277 |
| - ) |
278 |
| - |
279 |
| - if error_num is not None: |
280 |
| - # The job was successful but linking outputs (back to the Project directory) |
281 |
| - # appears to have failed. |
282 |
| - self._set_step_error(step_name, r_wfid, r_wfsid, error_num, error_msg) |
283 |
| - return |
284 |
| - |
285 | 258 | # We then inspect the Workflow to determine the next step.
|
286 | 259 | self._wapi_adapter.set_running_workflow_step_done(
|
287 | 260 | running_workflow_step_id=r_wfsid,
|
288 |
| - success=error_num is None, |
289 |
| - error_num=error_num, |
290 |
| - error_msg=error_msg, |
| 261 | + success=True, |
291 | 262 | )
|
292 | 263 |
|
293 | 264 | # We have the step from the Instance that's just finished,
|
|
0 commit comments