From 5c54df39c6a111dcfa7adaea15d0b81a3fc16b90 Mon Sep 17 00:00:00 2001 From: "Dr. K. D. Murray" <1560490+kdm9@users.noreply.github.com> Date: Fri, 23 Sep 2022 22:56:02 +0200 Subject: [PATCH] fix: k8s container volume mounts as list (#1868) As described in the body of PR https://github.com/snakemake/snakemake/pull/1858, there's a typo whereby the property `container.volume_mounts` is overwritten, rather than appended to. ### QC * [x] The PR contains a test case for the changes or the changes are already covered by an existing test case. (this is allegedly tested as part of the k8s tests). * [ ] ~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).~ --- snakemake/executors/__init__.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/snakemake/executors/__init__.py b/snakemake/executors/__init__.py index 349e6e71d..a918b34f3 100644 --- a/snakemake/executors/__init__.py +++ b/snakemake/executors/__init__.py @@ -1853,10 +1853,8 @@ def run(self, job, callback=None, submit_callback=None, error_callback=None): container.args = ["-c", exec_job] container.working_dir = "/workdir" container.volume_mounts = [ - kubernetes.client.V1VolumeMount(name="workdir", mount_path="/workdir") - ] - container.volume_mounts = [ - kubernetes.client.V1VolumeMount(name="source", mount_path="/source") + kubernetes.client.V1VolumeMount(name="workdir", mount_path="/workdir"), + kubernetes.client.V1VolumeMount(name="source", mount_path="/source"), ] node_selector = {}