reanahub / reana-workflow-engine-snakemake

REANA Workflow Engine Snakemake
MIT License
0 stars 21 forks source link

executor: correctly report failed workflow #52

Closed mdonadoni closed 1 year ago

mdonadoni commented 1 year ago

When the submission of a job failed, a job with id None was incorrectly reported as failed.

Closes reanahub/reana-client#646

How to test:

  1. Modify r-w-e-snakemake to simulate a failure during the submission of a job
    diff --git a/reana_workflow_engine_snakemake/executor.py b/reana_workflow_engine_snakemake/executor.py
    index d1607e4..9810704 100644
    --- a/reana_workflow_engine_snakemake/executor.py
    +++ b/reana_workflow_engine_snakemake/executor.py
    @@ -96,6 +96,7 @@ class REANAClusterExecutor(GenericClusterExecutor):
                         "slurm_partition": job.resources.get("slurm_partition"),
                         "slurm_time": job.resources.get("slurm_time"),
                     }
    +                raise Exception("Submission failed!")
                     job_id = submit_job(
                         self.rjc_api_client, self.publisher, job_request_body
                     )
  2. Execute a workflow that uses snakemake
  3. Run reana-client status -w workflow