Skip to content

Commit b5f79aa

Browse files
committed
chore: fix dbt ci tests
1 parent 012e542 commit b5f79aa

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

Makefile

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,16 @@ install-dev-dbt-%:
3636
if [ "$$version" = "1.10.0" ]; then \
3737
echo "Applying special handling for dbt 1.10.0"; \
3838
$(SED_INPLACE) -E 's/"(dbt-core)[^"]*"/"\1~='"$$version"'"/g' pyproject.toml; \
39-
$(SED_INPLACE) -E 's/"(dbt-(bigquery|duckdb|snowflake|athena-community|clickhouse|databricks|redshift|trino))[^"]*"/"\1"/g' pyproject.toml; \
39+
$(SED_INPLACE) -E 's/"(dbt-(bigquery|duckdb|snowflake|athena-community|clickhouse|redshift|trino))[^"]*"/"\1"/g' pyproject.toml; \
40+
$(SED_INPLACE) -E 's/"(dbt-databricks)[^"]*"/"\1~='"$$version"'"/g' pyproject.toml; \
4041
else \
4142
echo "Applying version $$version to all dbt packages"; \
4243
$(SED_INPLACE) -E 's/"(dbt-[^"><=~!]+)[^"]*"/"\1~='"$$version"'"/g' pyproject.toml; \
4344
fi; \
45+
if printf '%s\n' "$$version" | awk -F. '{ if ($$1 == 1 && (($$2 >= 3 && $$2 <= 5) || $$2 == 10)) exit 0; exit 1 }'; then \
46+
echo "Applying numpy<2 constraint for dbt $$version"; \
47+
$(SED_INPLACE) 's/"numpy"/"numpy<2"/g' pyproject.toml; \
48+
fi; \
4449
$(MAKE) install-dev; \
4550
if [ "$$version" = "1.6.0" ]; then \
4651
echo "Applying overrides for dbt 1.6.0"; \
@@ -50,6 +55,10 @@ install-dev-dbt-%:
5055
echo "Applying overrides for dbt 1.7.0"; \
5156
$(PIP) install 'databricks-sdk==0.28.0' --reinstall; \
5257
fi; \
58+
if [ "$$version" = "1.5.0" ]; then \
59+
echo "Applying overrides for dbt 1.5.0"; \
60+
$(PIP) install 'databricks-sql-connector==4.1.3' 'databricks-sdk==0.9.0' 'dbt-databricks==1.5.6' --reinstall; \
61+
fi; \
5362
mv pyproject.toml.backup pyproject.toml; \
5463
echo "Restored original pyproject.toml"
5564

pyproject.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,8 @@ dev = [
5757
"beautifulsoup4",
5858
"clickhouse-connect",
5959
"cryptography<46.0.0",
60+
# `0.66.0` release contains a breaking change for dbt-databricks
61+
"databricks-sdk<0.66.0",
6062
"databricks-sql-connector",
6163
"dbt-bigquery",
6264
"dbt-core",
@@ -76,6 +78,7 @@ dev = [
7678
"google-cloud-bigquery-storage",
7779
"httpx",
7880
"mypy~=1.13.0",
81+
"numpy",
7982
"pandas-stubs",
8083
"pre-commit",
8184
"psycopg2-binary",

0 commit comments

Comments
 (0)