Skip to content

Commit

Permalink
Checkpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
SireInsectus committed Nov 27, 2023
1 parent 0b40f58 commit f9fd134
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/dbacademy/clients/dbrest/clusters_api/cluster_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
11 changes: 11 additions & 0 deletions src/dbacademy/dbbuild/build_config_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit f9fd134

Please sign in to comment.