From 48ec3e50deff6bfb6855656954af4587ea7f3a12 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20K=C3=B6ster?= Date: Fri, 11 Mar 2022 15:46:27 +0100 Subject: [PATCH 1/3] fix: do not wait for named or containerized conda envs --- snakemake/jobs.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/snakemake/jobs.py b/snakemake/jobs.py index d8a36a7e6..00533d1fa 100644 --- a/snakemake/jobs.py +++ b/snakemake/jobs.py @@ -1016,7 +1016,10 @@ def get_wait_for_files(self): and self.conda_env and not self.conda_env.is_named ): - wait_for_files.append(self.conda_env.address) + if not (self.conda_env.is_named or self.conda_env.is_containerized): + # Named or containerized envs are not present on the host FS, + # hence we don't need to wait for them. + wait_for_files.append(self.conda_env.address) return wait_for_files @property From 98159424003c011efe52b5e64013df089c3d55f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20K=C3=B6ster?= Date: Fri, 11 Mar 2022 16:17:41 +0100 Subject: [PATCH 2/3] added testcase draft for issue 1456 --- tests/test_github_issue1469/Snakefile | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 tests/test_github_issue1469/Snakefile diff --git a/tests/test_github_issue1469/Snakefile b/tests/test_github_issue1469/Snakefile new file mode 100644 index 000000000..7894719a0 --- /dev/null +++ b/tests/test_github_issue1469/Snakefile @@ -0,0 +1,22 @@ +ruleorder: single_file > both_files + + +rule all: + input: + "foo.txt", + "bar.txt", + + +rule both_files: + output: + "foo.txt", + "bar.txt", + shell: + "if [[ -e foo.txt ]]; then exit 1; fi; touch {output}" + + +rule single_file: + output: + "foo.txt", + shell: + "if [[ -e foo.txt ]]; then exit 1; fi; touch {output}" From a6d29d30e9df5f096c4ae6426487e5b4780e4e47 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20K=C3=B6ster?= Date: Fri, 11 Mar 2022 16:19:49 +0100 Subject: [PATCH 3/3] cleanup --- snakemake/jobs.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/snakemake/jobs.py b/snakemake/jobs.py index 00533d1fa..01bf521ab 100644 --- a/snakemake/jobs.py +++ b/snakemake/jobs.py @@ -1015,11 +1015,11 @@ def get_wait_for_files(self): self.dag.workflow.use_conda and self.conda_env and not self.conda_env.is_named + and not self.conda_env.is_containerized ): - if not (self.conda_env.is_named or self.conda_env.is_containerized): - # Named or containerized envs are not present on the host FS, - # hence we don't need to wait for them. - wait_for_files.append(self.conda_env.address) + # Named or containerized envs are not present on the host FS, + # hence we don't need to wait for them. + wait_for_files.append(self.conda_env.address) return wait_for_files @property