From d2c09e3db2baae94bfbd24d03e236d8a8e8cb357 Mon Sep 17 00:00:00 2001 From: eakmanrq <6326532+eakmanrq@users.noreply.github.com> Date: Mon, 22 Sep 2025 17:24:00 -0700 Subject: [PATCH 1/2] chore: fix dbt ci tests --- Makefile | 11 ++++++++++- pyproject.toml | 3 +++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 96305c4bfb..018a59142c 100644 --- a/Makefile +++ b/Makefile @@ -36,11 +36,16 @@ install-dev-dbt-%: if [ "$$version" = "1.10.0" ]; then \ echo "Applying special handling for dbt 1.10.0"; \ $(SED_INPLACE) -E 's/"(dbt-core)[^"]*"/"\1~='"$$version"'"/g' pyproject.toml; \ - $(SED_INPLACE) -E 's/"(dbt-(bigquery|duckdb|snowflake|athena-community|clickhouse|databricks|redshift|trino))[^"]*"/"\1"/g' pyproject.toml; \ + $(SED_INPLACE) -E 's/"(dbt-(bigquery|duckdb|snowflake|athena-community|clickhouse|redshift|trino))[^"]*"/"\1"/g' pyproject.toml; \ + $(SED_INPLACE) -E 's/"(dbt-databricks)[^"]*"/"\1~='"$$version"'"/g' pyproject.toml; \ else \ echo "Applying version $$version to all dbt packages"; \ $(SED_INPLACE) -E 's/"(dbt-[^"><=~!]+)[^"]*"/"\1~='"$$version"'"/g' pyproject.toml; \ fi; \ + if printf '%s\n' "$$version" | awk -F. '{ if ($$1 == 1 && (($$2 >= 3 && $$2 <= 5) || $$2 == 10)) exit 0; exit 1 }'; then \ + echo "Applying numpy<2 constraint for dbt $$version"; \ + $(SED_INPLACE) 's/"numpy"/"numpy<2"/g' pyproject.toml; \ + fi; \ $(MAKE) install-dev; \ if [ "$$version" = "1.6.0" ]; then \ echo "Applying overrides for dbt 1.6.0"; \ @@ -50,6 +55,10 @@ install-dev-dbt-%: echo "Applying overrides for dbt 1.7.0"; \ $(PIP) install 'databricks-sdk==0.28.0' --reinstall; \ fi; \ + if [ "$$version" = "1.5.0" ]; then \ + echo "Applying overrides for dbt 1.5.0"; \ + $(PIP) install 'databricks-sql-connector==4.1.3' 'databricks-sdk==0.9.0' 'dbt-databricks==1.5.6' 'numpy<2' --reinstall; \ + fi; \ mv pyproject.toml.backup pyproject.toml; \ echo "Restored original pyproject.toml" diff --git a/pyproject.toml b/pyproject.toml index bd34906434..c5a40aa69d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -57,6 +57,8 @@ dev = [ "beautifulsoup4", "clickhouse-connect", "cryptography<46.0.0", + # `0.66.0` release contains a breaking change for dbt-databricks + "databricks-sdk<0.66.0", "databricks-sql-connector", "dbt-bigquery", "dbt-core", @@ -76,6 +78,7 @@ dev = [ "google-cloud-bigquery-storage", "httpx", "mypy~=1.13.0", + "numpy", "pandas-stubs", "pre-commit", "psycopg2-binary", From 1b77dfe946963dd76831be1fb40d339d721b2d71 Mon Sep 17 00:00:00 2001 From: eakmanrq <6326532+eakmanrq@users.noreply.github.com> Date: Mon, 22 Sep 2025 19:01:38 -0700 Subject: [PATCH 2/2] simplify --- Makefile | 2 +- pyproject.toml | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 018a59142c..40874f7972 100644 --- a/Makefile +++ b/Makefile @@ -57,7 +57,7 @@ install-dev-dbt-%: fi; \ if [ "$$version" = "1.5.0" ]; then \ echo "Applying overrides for dbt 1.5.0"; \ - $(PIP) install 'databricks-sql-connector==4.1.3' 'databricks-sdk==0.9.0' 'dbt-databricks==1.5.6' 'numpy<2' --reinstall; \ + $(PIP) install 'dbt-databricks==1.5.6' 'numpy<2' --reinstall; \ fi; \ mv pyproject.toml.backup pyproject.toml; \ echo "Restored original pyproject.toml" diff --git a/pyproject.toml b/pyproject.toml index c5a40aa69d..1d34b340b5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -57,8 +57,6 @@ dev = [ "beautifulsoup4", "clickhouse-connect", "cryptography<46.0.0", - # `0.66.0` release contains a breaking change for dbt-databricks - "databricks-sdk<0.66.0", "databricks-sql-connector", "dbt-bigquery", "dbt-core",