Skip to content

Commit bf40bbe

Browse files
authored
chore: fix dbt ci tests (#5426)
1 parent 012e542 commit bf40bbe

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-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 'dbt-databricks==1.5.6' 'numpy<2' --reinstall; \
61+
fi; \
5362
mv pyproject.toml.backup pyproject.toml; \
5463
echo "Restored original pyproject.toml"
5564

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ dev = [
7676
"google-cloud-bigquery-storage",
7777
"httpx",
7878
"mypy~=1.13.0",
79+
"numpy",
7980
"pandas-stubs",
8081
"pre-commit",
8182
"psycopg2-binary",

0 commit comments

Comments
 (0)