Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 1 addition & 8 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -356,19 +356,12 @@ jobs:
python-version: [ "3.11" ]
airflow-version: [ "2.10", "3.0" ]
dbt-version: ["1.5", "1.6", "1.7", "1.8", "1.9"]
# TODO: Add support for dbt 1.6, 1.7, 1.9 for Airflow 3.0.
# TODO: Add support for dbt 1.7 for Airflow 3.0.
# Issue dbt 1.7: https://github.com/astronomer/astronomer-cosmos/issues/1709
# Issue dbt 1.6 and 1.9: https://github.com/astronomer/astronomer-cosmos/issues/1708
exclude:
- python-version: "3.11"
airflow-version: "3.0"
dbt-version: "1.6"
- python-version: "3.11"
airflow-version: "3.0"
dbt-version: "1.7"
- python-version: "3.11"
airflow-version: "3.0"
dbt-version: "1.9"
services:
postgres:
image: postgres
Expand Down
13 changes: 13 additions & 0 deletions scripts/test/integration-dbt-async.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,19 @@ echo "$DBT_VERSION"

pip uninstall dbt-adapters dbt-common dbt-core dbt-extractor dbt-postgres dbt-semantic-interfaces -y
pip install "dbt-postgres==$DBT_VERSION" "dbt-databricks==$DBT_VERSION" "dbt-bigquery==$DBT_VERSION"

# apache-airflow-core 3.0.0 requires pydantic>=2.11.0, but the above dbt adapters in case of version 1.6 and 1.9 install
# pydantic 1.10.22 which make it incompatible.
# With pydantic 1.10.22 we get the below error
# File "<...>/hatch/env/virtual/astronomer-cosmos/D9FI7Men/tests.py3.11-3.0-1.6/lib/python3.11/site-packages/cadwyn/_utils.py", line 5, in <module>
# from pydantic._internal._decorators import unwrap_wrapped_function
# ModuleNotFoundError: No module named 'pydantic._internal'
# Hence, we re-install pydantic with the required minimum version after installing dbt adapters.
if [ "$DBT_VERSION" = "1.6" ] || [ "$DBT_VERSION" = "1.9" ]; then
echo "DBT_VERSION is $DBT_VERSION, installing pydantic>=2.11.0 for apache-airflow-core compatibility."
pip install "pydantic>2.11.0"
fi

export SOURCE_RENDERING_BEHAVIOR=all
rm -rf airflow.*

Expand Down