-
Notifications
You must be signed in to change notification settings - Fork 30
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
base: main
Are you sure you want to change the base?
Conversation
WalkthroughThe change updates the error handling in the Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant SLURMExecutor
participant SLURM (sbatch)
User->>SLURMExecutor: run_job()
SLURMExecutor->>SLURM: Execute sbatch command
alt sbatch succeeds
SLURM-->>SLURMExecutor: Success response
SLURMExecutor-->>User: Continue workflow
else sbatch fails (CalledProcessError)
SLURM-->>SLURMExecutor: Error output
alt error output contains "submission failed"
SLURMExecutor-->>User: Raise WorkflowError
else other error
SLURMExecutor->>SLURMExecutor: report_job_error()
SLURMExecutor-->>User: Return (suppress exception)
end
end
Possibly related PRs
Suggested reviewers
Poem
📜 Recent review detailsConfiguration used: .coderabbit.yaml 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
snakemake_executor_plugin_slurm/__init__.py
(1 hunks)
🧰 Additional context used
🧠 Learnings (1)
snakemake_executor_plugin_slurm/__init__.py (1)
Learnt from: cmeesters
PR: snakemake/snakemake-executor-plugin-slurm#178
File: snakemake_executor_plugin_slurm/__init__.py:0-0
Timestamp: 2024-12-11T14:17:08.749Z
Learning: In the `snakemake-executor-plugin-slurm` project, when handling exceptions in `snakemake_executor_plugin_slurm/__init__.py`, prefer concise error messages and avoid unnecessary verbosity or exception chaining when it's not necessary.
The |
This PR is a potential solution to #320. When I do some very rudimentary testing it seems to work: when sbatch fails, it is handled like a job error rather than a workflow error.
The argument for
report_job_error
needs to be aSubmittedJobInfo
. These jobs are technically never reported as submitted. I'm not sure if that would cause some type of problem? Would this PR need some sort of tests included?Summary by CodeRabbit