Skip to content

Commit

Permalink
Remove 'dbt-core<1.8.9' pin (#1371)
Browse files Browse the repository at this point in the history
We were facing issues with conflicting dbt core and dbt-databricks when
using the latest release of dbt-core:
```
File "<frozen importlib._bootstrap>", line 1204, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1147, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line [940](https://github.com/astronomer/astronomer-cosmos/actions/runs/12018236731/job/33502297498?pr=1340#step:7:941), in exec_module
  File "<frozen importlib._bootstrap>", 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 <module>
    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 <module>
    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
  • Loading branch information
tatiana authored Dec 10, 2024
1 parent fddc37f commit 0951f27
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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}"]

Expand Down
4 changes: 2 additions & 2 deletions scripts/test/integration-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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'

0 comments on commit 0951f27

Please sign in to comment.