Skip to content

feat: treat sbatch errors as job errors instead of workflow errors #322

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions snakemake_executor_plugin_slurm/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -299,9 +299,11 @@ def run_job(self, job: JobExecutorInterface):
process.returncode, call, output=err
)
except subprocess.CalledProcessError as e:
raise WorkflowError(
f"SLURM sbatch failed. The error message was {e.output}"
self.report_job_error(
SubmittedJobInfo(job),
msg=f'SLURM sbatch failed. The error message was "{e.output}".\nsbatch call:\n{call}\n',
)
return
# any other error message indicating failure?
if "submission failed" in err:
raise WorkflowError(
Expand Down