From f9fd134d35ae73e649fe564ef87b111d6ae4c0c0 Mon Sep 17 00:00:00 2001 From: "Jacob D. Parr" Date: Mon, 27 Nov 2023 05:26:08 -0600 Subject: [PATCH] Checkpoint --- .../clients/dbrest/clusters_api/cluster_config.py | 6 +++--- src/dbacademy/dbbuild/build_config_data.py | 11 +++++++++++ 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/src/dbacademy/clients/dbrest/clusters_api/cluster_config.py b/src/dbacademy/clients/dbrest/clusters_api/cluster_config.py index 21921a3a..b26a5cbb 100644 --- a/src/dbacademy/clients/dbrest/clusters_api/cluster_config.py +++ b/src/dbacademy/clients/dbrest/clusters_api/cluster_config.py @@ -162,13 +162,13 @@ def __init__(self, *, extra_params.get(cloud_attributes)["availability"] = "PREEMPTIBLE_WITH_FALLBACK_GCP" if len(custom_tags) > 0: - self.__params["custom_tags"] = custom_tags + extra_params["custom_tags"] = custom_tags if len(spark_conf) > 0: - self.__params["spark_conf"] = spark_conf + extra_params["spark_conf"] = spark_conf if len(spark_env_vars) > 0: - self.__params["spark_env_vars"] = spark_env_vars + extra_params["spark_env_vars"] = spark_env_vars # libraries are validated in the constructor. self.__libraries = LibraryFactory(libraries) diff --git a/src/dbacademy/dbbuild/build_config_data.py b/src/dbacademy/dbbuild/build_config_data.py index d35cfeb9..25641edc 100644 --- a/src/dbacademy/dbbuild/build_config_data.py +++ b/src/dbacademy/dbbuild/build_config_data.py @@ -254,6 +254,12 @@ def current_cluster(self) -> Dict[str, Any]: if self.__current_cluster is None: self.__current_cluster = self.client.clusters.get_current() + import json + print("="*80) + print("| CURRENT CLUSTER |") + print(json.dumps(self.__current_cluster, indent=4)) + print("="*80) + return self.__current_cluster @property @@ -266,6 +272,11 @@ def instance_pool_id(self) -> str: self.__instance_pool_id = self.current_cluster.get("instance_pool_id") assert self.__instance_pool_id is not None, f"The current cluster is not configured to use an instance pool which is required for execution of smoke-tests." + print("="*80) + print("| instance_pool_id |") + print(self.__instance_pool_id) + print("="*80) + return self.__instance_pool_id @property