From d74621410009f6cff541d5cabf0ff7d54223d2d8 Mon Sep 17 00:00:00 2001 From: meesters Date: Mon, 3 Nov 2025 12:34:24 +0100 Subject: [PATCH] fix: #348 no attempts to jobstep executor --- snakemake_executor_plugin_slurm/__init__.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/snakemake_executor_plugin_slurm/__init__.py b/snakemake_executor_plugin_slurm/__init__.py index 583b077..27c9367 100644 --- a/snakemake_executor_plugin_slurm/__init__.py +++ b/snakemake_executor_plugin_slurm/__init__.py @@ -343,6 +343,11 @@ def run_job(self, job: JobExecutorInterface): exec_job = self.format_job_exec(job) + # Prevent forwarding Snakemake retry attempts into the remote + # jobstep. Convert any "--attempt " or "--attempt=" to + # a single attempt in the remote context. + exec_job = re.sub(r"--attempt(?:[=\s]+)\d+", "--attempt 1", exec_job) + # and finally the job to execute with all the snakemake parameters call += f' --wrap="{exec_job}"'