Skip to content

Commit

Permalink
fix: fix regression in workflow source acquisition of google life sci…
Browse files Browse the repository at this point in the history
…ence executor (#1773)

* fix: fix regression in workflow source acquisition of google life science executor

* revert and reorder

* refactor

* refactoring
  • Loading branch information
johanneskoester committed Jul 22, 2022
1 parent 6f582f1 commit c07732e
Showing 1 changed file with 15 additions and 18 deletions.
33 changes: 15 additions & 18 deletions snakemake/executors/google_lifesciences.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,20 +58,30 @@ def __init__(
preemption_default=None,
preemptible_rules=None,
):
super().__init__(
workflow,
dag,
None,
jobname=jobname,
printreason=printreason,
quiet=quiet,
printshellcmds=printshellcmds,
restart_times=restart_times,
assume_shared_fs=False,
max_status_checks_per_second=10,
)
# Prepare workflow sources for build package
self._set_workflow_sources()

# Attach variables for easy access
self.workflow = workflow
self.quiet = quiet
self.workdir = os.path.realpath(os.path.dirname(self.workflow.persistence.path))
self._save_storage_cache = cache

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

# Set preemptible instances
self._set_preemptible_rules(preemption_default, preemptible_rules)

# IMPORTANT: using Compute Engine API and not k8s == no support secrets
# IMPORTANT: using Compute Engine API and not k8s == no support for secrets
self.envvars = list(self.workflow.envvars) or []

# Quit early if we can't authenticate
Expand Down Expand Up @@ -106,19 +116,6 @@ def __init__(
# default resources depending on the instance requested
self.default_resources = None

super().__init__(
workflow,
dag,
None,
jobname=jobname,
printreason=printreason,
quiet=quiet,
printshellcmds=printshellcmds,
restart_times=restart_times,
assume_shared_fs=False,
max_status_checks_per_second=10,
)

def get_default_resources_args(self, default_resources=None):
assert default_resources is None
return super().get_default_resources_args(
Expand Down

0 comments on commit c07732e

Please sign in to comment.