Skip to content

Commit

Permalink
fix: sbatch stderr parsing #2 (#165)
Browse files Browse the repository at this point in the history
next attempt to fix the behaviour described in #161 

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **Bug Fixes**
- Improved error handling for SLURM job submissions, providing clearer
indications of submission failures.
- Enhanced error reporting with detailed messages for job submission
failures.

- **Chores**
	- Minor adjustments to comments and formatting for better clarity.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Filipe G. Vieira <[email protected]>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
  • Loading branch information
3 people authored Nov 7, 2024
1 parent 0368197 commit 348e537
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions snakemake_executor_plugin_slurm/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -231,9 +231,10 @@ def run_job(self, job: JobExecutorInterface):
)
except subprocess.CalledProcessError as e:
raise WorkflowError(
f"SLURM job submission failed. The error message was {e.output}"
f"SLURM sbatch failed. The error message was {e.output}"
)
if err: # any other error message?
# any other error message indicating failure?
if "submission failed" in err:
raise WorkflowError(
f"SLURM job submission failed. The error message was {err}"
)
Expand Down

0 comments on commit 348e537

Please sign in to comment.