From 0951f27e522c094998fa4b4f237d1a37d82be037 Mon Sep 17 00:00:00 2001 From: Tatiana Al-Chueyr Date: Tue, 10 Dec 2024 07:17:55 +0000 Subject: [PATCH] Remove 'dbt-core<1.8.9' pin (#1371) We were facing issues with conflicting dbt core and dbt-databricks when using the latest release of dbt-core: ``` File "", line 1204, in _gcd_import File "", line 1176, in _find_and_load File "", line 1147, in _find_and_load_unlocked File "", line 690, in _load_unlocked File "", line [940](https://github.com/astronomer/astronomer-cosmos/actions/runs/12018236731/job/33502297498?pr=1340#step:7:941), in exec_module File "", line 241, in _call_with_frames_removed File "/home/runner/.local/share/hatch/env/virtual/astronomer-cosmos/Za_bFbg4/tests.py3.11-2.6/lib/python3.11/site-packages/dbt/adapters/databricks/__init__.py", line 1, in from dbt.adapters.databricks.connections import DatabricksConnectionManager # noqa ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/runner/.local/share/hatch/env/virtual/astronomer-cosmos/Za_bFbg4/tests.py3.11-2.6/lib/python3.11/site-packages/dbt/adapters/databricks/connections.py", line 27, in from dbt.adapters.base import Credentials ImportError: cannot import name 'Credentials' from 'dbt.adapters.base' (/home/runner/.local/share/hatch/env/virtual/astronomer-cosmos/Za_bFbg4/tests.py3.11-2.6/lib/python3.11/site-packages/dbt/adapters/base/__init__.py) ``` This PR solves this. Closes: #1343 --- pyproject.toml | 2 +- scripts/test/integration-setup.sh | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 1ae97ee6d..ba56bde19 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -144,7 +144,7 @@ dependencies = [ "types-requests", "types-python-dateutil", "Werkzeug<3.0.0", - "dbt-core<1.8.9" # TODO: https://github.com/astronomer/astronomer-cosmos/issues/1343 + "dbt-core" ] pre-install-commands = ["sh scripts/test/pre-install-airflow.sh {matrix:airflow} {matrix:python}"] diff --git a/scripts/test/integration-setup.sh b/scripts/test/integration-setup.sh index fec9e95eb..7eca073c4 100644 --- a/scripts/test/integration-setup.sh +++ b/scripts/test/integration-setup.sh @@ -6,9 +6,9 @@ set -e # we install using the following workaround to overcome installation conflicts, such as: # apache-airflow 2.3.0 and dbt-core [0.13.0 - 1.5.2] and jinja2>=3.0.0 because these package versions have conflicting dependencies -pip uninstall -y dbt-postgres dbt-databricks dbt-vertica +pip uninstall -y 'dbt-bigquery' 'dbt-databricks' 'dbt-postgres' 'dbt-vertica' 'dbt-core' rm -rf airflow.* pip freeze | grep airflow airflow db reset -y airflow db init -pip install 'dbt-core' 'dbt-bigquery' 'dbt-databricks' 'dbt-postgres' 'dbt-vertica' 'openlineage-airflow' +pip install 'dbt-databricks' 'dbt-bigquery' 'dbt-postgres' 'dbt-vertica' 'openlineage-airflow'