Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[qob] fix ServiceBackend.get_flags #12307

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion batch/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ BATCH_DRIVER_NGINX_IMAGE := $(DOCKER_PREFIX)/batch-driver-nginx:$(TOKEN)

EXTRA_PYTHONPATH := ../hail/python:../gear:../web_common
PYTHON := PYTHONPATH=$${PYTHONPATH:+$${PYTHONPATH}:}$(EXTRA_PYTHONPATH) python3
CLOUD := $(shell kubectl get secret global-config --template={{.data.cloud}} | base64 --decode)
CLOUD := azure

BLACK := $(PYTHON) -m black . --line-length=120 --skip-string-normalization

Expand Down
4 changes: 2 additions & 2 deletions config.mk
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
DOCKER_PREFIX := $(shell kubectl get secret global-config --template={{.data.docker_prefix}} | base64 --decode)
DOMAIN := $(shell kubectl get secret global-config --template={{.data.domain}} | base64 --decode)
DOCKER_PREFIX := hailazureterradev.azurecr.io
DOMAIN := hail.fake

ifeq ($(NAMESPACE),default)
SCOPE = deploy
Expand Down
3 changes: 1 addition & 2 deletions hail/python/hail/backend/service_backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
from ..fs.router_fs import RouterFS
from ..ir import BaseIR
from ..context import version
from ..utils import frozendict


log = logging.getLogger('backend.service_backend')
Expand Down Expand Up @@ -727,7 +726,7 @@ def set_flags(self, **flags: str):
self.flags.update(flags)

def get_flags(self, *flags) -> Mapping[str, str]:
return frozendict(self.flags)
return {flag: self.flags.get(flag) for flag in flags}

@property
def requires_lowering(self):
Expand Down
4 changes: 4 additions & 0 deletions hail/python/test/hail/test_context.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,7 @@ def test_top_level_functions_are_do_not_error(self):

def test_tmpdir_runs(self):
isinstance(hl.tmp_dir(), str)

def test_get_flags(self):
assert hl._get_flags() == {}
assert list(hl._get_flags('use_new_shuffle')) == ['use_new_shuffle']