Skip to content

Commit 5da13be

Browse files
authored
fix: edgecases of source deployment in case of remote execution (#3396)
Ensures sources are not uploaded on dry run, and they are cleaned up if nothing to be done. ### QC <!-- Make sure that you can tick the boxes below. --> * [ ] The PR contains a test case for the changes or the changes are already covered by an existing test case. * [ ] 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** - Refined deployment processing to ensure that source uploads occur only during active operations, preventing unintended actions during simulation or when there are no tasks to process. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
1 parent 7bf8381 commit 5da13be

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/snakemake/workflow.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1263,6 +1263,8 @@ def execute(
12631263
and self.exec_mode == ExecMode.DEFAULT
12641264
and self.remote_execution_settings.job_deploy_sources
12651265
and not executor_plugin.common_settings.can_transfer_local_files
1266+
and not self.dryrun
1267+
and len(self.dag)
12661268
)
12671269
if should_deploy_sources:
12681270
# no shared FS, hence we have to upload the sources to the storage

0 commit comments

Comments
 (0)