From b8ce3473af61545183333857973f69b9789a78a7 Mon Sep 17 00:00:00 2001 From: eskild <42120229+iameskild@users.noreply.github.com> Date: Tue, 26 Sep 2023 13:50:55 -0700 Subject: [PATCH] Upgrade conda-store to 2023.9.2 (#2028) --- src/_nebari/constants.py | 2 +- .../conda-store/config/conda_store_config.py | 13 +++++++------ 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/src/_nebari/constants.py b/src/_nebari/constants.py index 3c51f3770..edc313e67 100644 --- a/src/_nebari/constants.py +++ b/src/_nebari/constants.py @@ -15,7 +15,7 @@ DEFAULT_NEBARI_IMAGE_TAG = CURRENT_RELEASE DEFAULT_NEBARI_WORKFLOW_CONTROLLER_IMAGE_TAG = CURRENT_RELEASE -DEFAULT_CONDA_STORE_IMAGE_TAG = "v0.4.14" +DEFAULT_CONDA_STORE_IMAGE_TAG = "2023.9.2" LATEST_SUPPORTED_PYTHON_VERSION = "3.10" diff --git a/src/_nebari/stages/kubernetes_services/template/modules/kubernetes/services/conda-store/config/conda_store_config.py b/src/_nebari/stages/kubernetes_services/template/modules/kubernetes/services/conda-store/config/conda_store_config.py index 6f9e1089d..6ed6232ba 100644 --- a/src/_nebari/stages/kubernetes_services/template/modules/kubernetes/services/conda-store/config/conda_store_config.py +++ b/src/_nebari/stages/kubernetes_services/template/modules/kubernetes/services/conda-store/config/conda_store_config.py @@ -132,12 +132,13 @@ async def authenticate(self, request): namespaces.add(group_name) role_bindings[f"{group_name}/*"] = roles - conda_store = get_conda_store(request) - for namespace in namespaces: - _namespace = api.get_namespace(conda_store.db, name=namespace) - if _namespace is None: - conda_store.db.add(orm.Namespace(name=namespace)) - conda_store.db.commit() + conda_store = await get_conda_store(request) + with conda_store.session_factory() as db: + for namespace in namespaces: + _namespace = api.get_namespace(db, name=namespace) + if _namespace is None: + db.add(orm.Namespace(name=namespace)) + db.commit() return schema.AuthenticationToken( primary_namespace=username,