Skip to content

Commit

Permalink
Merge branch 'main' into pr/vsoch/2305
Browse files Browse the repository at this point in the history
  • Loading branch information
johanneskoester committed Aug 7, 2023
2 parents a514c10 + 1c5d154 commit 8575f79
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 14 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Changelog

## [7.32.2](https://github.com/snakemake/snakemake/compare/v7.32.1...v7.32.2) (2023-08-07)


### Bug Fixes

* unnecessary set Snakefile in AzBatch executor ([#2397](https://github.com/snakemake/snakemake/issues/2397)) ([78e6d6e](https://github.com/snakemake/snakemake/commit/78e6d6ec6a1ad930e40d6edfe9f7210232a674f2))

## [7.32.1](https://github.com/snakemake/snakemake/compare/v7.32.0...v7.32.1) (2023-08-05)


Expand Down
17 changes: 3 additions & 14 deletions snakemake/executors/azure_batch.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import os
import re
import shutil
import shlex
import sys
import tarfile
import tempfile
Expand All @@ -31,7 +32,6 @@
from snakemake.executors import sleep
from snakemake.logging import logger


AzBatchJob = namedtuple("AzBatchJob", "job jobid task_id callback error_callback")


Expand Down Expand Up @@ -290,9 +290,6 @@ def __init__(

self.workdir = dirname

# Relative path for running on instance
self._set_snakefile()

# Prepare workflow sources for build package
self._set_workflow_sources()

Expand Down Expand Up @@ -399,7 +396,7 @@ def mask_dict_vals(mdict: dict, keys: list):
# token information from being printed to the logs
def mask_sas_urls(self, attrs: dict):
attrs_new = attrs.copy()
sas_pattern = r"\?s[v|p]=.+(\'|\"|$)"
sas_pattern = r"\?[^=]+=([^?'\"]+)"
mask = 10 * "*"

for k, value in attrs.items():
Expand Down Expand Up @@ -441,7 +438,7 @@ def run(
continue

exec_job = self.format_job_exec(job)
exec_job = f"/bin/sh -c 'tar xzf {self.resource_file.file_path} && {exec_job}'"
exec_job = f"/bin/bash -c 'tar xzf {self.resource_file.file_path} && {shlex.quote(exec_job)}'"

# A string that uniquely identifies the Task within the Job.
task_uuid = str(uuid.uuid1())
Expand Down Expand Up @@ -850,14 +847,6 @@ def validate_az_blob_credential_is_sas():
"AZ_BLOB_CREDENTIAL is not a valid storage account SAS token."
)

def _set_snakefile(self):
"""The snakefile must be a relative path, which cannot be reliably
derived from the self.workflow.snakefile as we might have moved
execution into a temporary directory, and the initial Snakefile
was somewhere else on the system.
"""
self.snakefile = os.path.basename(self.workflow.main_snakefile)

# from google_lifesciences.py
def _set_workflow_sources(self):
"""We only add files from the working directory that are config related
Expand Down

0 comments on commit 8575f79

Please sign in to comment.