From af409c94d4ec59778d235a703e0e5e3c0684a537 Mon Sep 17 00:00:00 2001 From: Nathan Freeman Date: Wed, 8 Nov 2023 13:17:09 -0600 Subject: [PATCH] ignore tapisjob.out in TapisJob task executor --- src/engine/src/contrib/tapis/executors/TapisJob.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/engine/src/contrib/tapis/executors/TapisJob.py b/src/engine/src/contrib/tapis/executors/TapisJob.py index abb1d459..4ea43080 100644 --- a/src/engine/src/contrib/tapis/executors/TapisJob.py +++ b/src/engine/src/contrib/tapis/executors/TapisJob.py @@ -22,13 +22,15 @@ def execute(self): file_input_arrays = [] for parent_task in self.task.depends_on: parent_task_output = self.ctx.output[parent_task.id] - print("OUTPUT", self.ctx.output) source_urls = [] for parent_task_output_file in parent_task_output: # Skip all output files that do not contain the Tapis # system file reference extension - print("PARENT TASK OUTPUT FILE", parent_task_output_file) - if TAPIS_SYSTEM_FILE_REF_EXTENSION not in parent_task_output_file.name: + # NOTE TODO FIXME Also skip files that contain tapisjob.out + if ( + TAPIS_SYSTEM_FILE_REF_EXTENSION not in parent_task_output_file.name + or "tapisjob.out" in parent_task_output_file.name + ): continue # Pull the Tapis System File details from the file @@ -79,7 +81,6 @@ def execute(self): _x_tapis_user=self.ctx.args.get("tapis_pipeline_owner").value ) for file in files: - print("FILE", file) self._set_output( file.name + "." + TAPIS_SYSTEM_FILE_REF_EXTENSION, json.dumps( @@ -91,7 +92,7 @@ def execute(self): ) return self._task_result(0) - print("JOB", job) + return self._task_result(1, errors=[f"Job '{job.name}' ended with status {job.status}. Last Message: {job.lastMessage}"]) except Exception as e: