Skip to content

Commit d5acdd1

Browse files
fix: remove erroneous assert in the scheduler (is_main_process) (#3881)
<!--Add a description of your PR here--> ### QC <!-- Make sure that you can tick the boxes below. --> * [x] The PR contains a test case for the changes or the changes are already covered by an existing test case. * [x] The documentation (`docs/`) is updated to reflect the changes or this is not necessary (e.g. if the change does neither modify the language nor the behavior or functionalities of Snakemake). <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Enhanced job scheduling for remote execution environments with improved handling of shared filesystem configurations and more flexible storage input retrieval logic across different execution scenarios. <sub>✏️ Tip: You can customize this high-level summary in your review settings.</sub> <!-- end of auto-generated comment: release notes by coderabbit.ai -->
1 parent 9598655 commit d5acdd1

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

src/snakemake/scheduling/job_scheduler.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -359,13 +359,15 @@ def schedule(self):
359359
executor=self._local_executor or self._executor,
360360
)
361361
if runjobs:
362-
# If we are already in a remote process, there are for now only local jobs.
362+
is_shared_fs = (
363+
SharedFSUsage.STORAGE_LOCAL_COPIES
364+
in self.workflow.storage_settings.shared_fs_usage
365+
)
363366
# TODO: there are plans to chain remote executors. In that case, we should
364367
# reconsider this logic and decide where to download the storage inputs.
365-
assert self.workflow.is_main_process
366368
if not self.workflow.dryrun and (
367-
SharedFSUsage.STORAGE_LOCAL_COPIES
368-
in self.workflow.storage_settings.shared_fs_usage
369+
(self.workflow.is_main_process and is_shared_fs)
370+
or (not is_shared_fs and self.workflow.remote_exec)
369371
):
370372
# Retrieve storage inputs for remote jobs, as storage local copies are handled
371373
# via a shared filesystem.

0 commit comments

Comments
 (0)