Skip to content

Commit

Permalink
Backport: Pin Databricks SDK (#612)
Browse files Browse the repository at this point in the history
  • Loading branch information
benc-db authored Mar 11, 2024
1 parent c08a2fe commit 0166bf9
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 5 deletions.
10 changes: 8 additions & 2 deletions .github/workflows/build_cluster_http_path.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,19 @@
import os
import re

workspace_id = os.getenv("DBT_DATABRICKS_HOST_NAME")[4:18]
workspace_re = re.compile(r"^.*-(\d+)\..*$")
hostname = os.getenv("DBT_DATABRICKS_HOST_NAME", "")
matches = workspace_re.match(hostname)
if matches:
workspace_id = matches.group(1)
print(workspace_id)
cluster_id = os.getenv("TEST_PECO_CLUSTER_ID")
uc_cluster_id = os.getenv("TEST_PECO_UC_CLUSTER_ID")
http_path = f"sql/protocolv1/o/{workspace_id}/{cluster_id}"
uc_http_path = f"sql/protocolv1/o/{workspace_id}/{uc_cluster_id}"

# https://stackoverflow.com/a/72225291/5093960
env_file = os.getenv("GITHUB_ENV")
env_file = os.getenv("GITHUB_ENV", "")
with open(env_file, "a") as myfile:
myfile.write(f"DBT_DATABRICKS_CLUSTER_HTTP_PATH={http_path}\n")
myfile.write(f"DBT_DATABRICKS_UC_CLUSTER_HTTP_PATH={uc_http_path}\n")
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## dbt-databricks 1.6.9 (March 11, 2023)

### Fixes

- Pin databricks-sdk to < 0.18.0

## dbt-databricks 1.6.8 (December 14, 2023)

### Fixes
Expand Down
2 changes: 1 addition & 1 deletion dbt/adapters/databricks/__version__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
version: str = "1.6.8"
version: str = "1.6.9"
3 changes: 2 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
databricks-sql-connector>=2.9.3, <3.0.0
dbt-spark~=1.6.2
databricks-sdk==0.9.0
databricks-sdk>=0.9.0, <0.16.0
keyring>=23.13.0
pandas<2.2.0
3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,9 @@ def _get_plugin_version():
install_requires=[
"dbt-spark~=1.6.2",
"databricks-sql-connector>=2.9.3, <3.0.0",
"databricks-sdk>=0.9.0",
"databricks-sdk>=0.9.0, <0.16.0",
"keyring>=23.13.0",
"pandas<2.2.0",
],
zip_safe=False,
classifiers=[
Expand Down

0 comments on commit 0166bf9

Please sign in to comment.