Skip to content

Commit

Permalink
refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
mwojtyczka committed Jan 31, 2025
1 parent 747435d commit 842f6a7
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tests/integration/fixtures/test_connect.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,5 +56,7 @@ def is_serverless_cluster(spark: SparkSession, ws: WorkspaceClient) -> bool:
Check if the current cluster used is serverless.
"""
cluster_id = spark.conf.get("spark.databricks.clusterUsageTags.clusterId")
if not cluster_id:
raise ValueError("clusterId usage tag does not exist")
creator = ws.clusters.get(cluster_id).creator_user_name
return not creator # serverless clusters don't have assigned creator

0 comments on commit 842f6a7

Please sign in to comment.