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
8 changes: 4 additions & 4 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ jobs:
- '2.10'
- '2.9'
dbt-version:
- '1.10'
- 1.9
- '1.10.9'
- '1.9.9'

runs-on: ubuntu-latest
steps:
Expand Down Expand Up @@ -84,7 +84,7 @@ jobs:
- name: Install Airflow & dbt
run: |
uv add "apache-airflow~=${{ matrix.airflow-version }}.0" \
"dbt-core~=${{ matrix.dbt-version }}.0"
"dbt-core~=${{ matrix.dbt-version }}"
uv sync --all-extras --dev
uv run airflow db migrate
uv run airflow connections create-default-connections
Expand All @@ -95,7 +95,7 @@ jobs:
- name: Static type checking with mypy
# We only run mypy on the latest supported versions of Airflow & dbt,
# so it is currently impossible to write conditions for that depend on package versions.
if: matrix.python-version == '3.12' && matrix.airflow-version == '2.10' && matrix.dbt-version == '1.9'
if: matrix.python-version == '3.12' && matrix.airflow-version == '2.10' && matrix.dbt-version == '1.9.9'
run: uv run mypy .

- name: Code formatting with ruff
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tagged_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
with:
token: ${{ secrets.GH_DEPLOY_TOKEN }}
checkName: CI
ref: ${{ github.ref_name }}
ref: ${{ github.tag }}
# Wait for one hour
timeoutSeconds: 3600
intervalSeconds: 60
Expand Down
27 changes: 25 additions & 2 deletions airflow_dbt_python/utils/configs.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,10 @@
from dbt.tracking import initialize_from_flags

from airflow_dbt_python.utils.enums import FromStrEnum, LogFormat, Output
from airflow_dbt_python.utils.version import DBT_INSTALLED_GTE_1_9
from airflow_dbt_python.utils.version import (
DBT_INSTALLED_GTE_1_9,
DBT_INSTALLED_GTE_1_10_7,
)


def parse_yaml_args(args: Optional[Union[str, dict[str, Any]]]) -> dict[str, Any]:
Expand Down Expand Up @@ -360,7 +363,11 @@ def create_dbt_task(

runtime_config = self.create_runtime_config(project, profile)

if issubclass(self.dbt_task, ConfiguredTask) and runtime_config:
if (
issubclass(self.dbt_task, ConfiguredTask)
and runtime_config
and not DBT_INSTALLED_GTE_1_10_7
):
manifest = parse_manifest(
runtime_config,
write_perf_info=write_perf_info,
Expand All @@ -370,6 +377,22 @@ def create_dbt_task(
task: BaseTask = self.dbt_task(
args=local_flags, config=runtime_config, manifest=manifest
)
elif (
issubclass(self.dbt_task, ConfiguredTask)
and runtime_config
and DBT_INSTALLED_GTE_1_10_7
):
manifest = parse_manifest(
runtime_config,
write_perf_info=write_perf_info,
write=False,
write_json=False,
# TODO: Support for catalog integrations
active_integrations=[], # type: ignore
)
task = self.dbt_task(
args=local_flags, config=runtime_config, manifest=manifest
)
elif issubclass(self.dbt_task, DepsTask):
task = self.dbt_task(args=local_flags, project=project)
elif issubclass(self.dbt_task, DebugTask):
Expand Down
4 changes: 4 additions & 0 deletions airflow_dbt_python/utils/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,15 @@
DBT_1_9 = VersionSpecifier(
major="1", minor="9", patch="0", matcher=Matchers.GREATER_THAN_OR_EQUAL
)
DBT_1_10_7 = VersionSpecifier(
major="1", minor="10", patch="7", matcher=Matchers.GREATER_THAN_OR_EQUAL
)
DBT_2_0 = VersionSpecifier(
major="2", minor="0", patch="0", matcher=Matchers.GREATER_THAN_OR_EQUAL
)

DBT_INSTALLED_GTE_1_9 = installed.compare(DBT_1_9) == 1
DBT_INSTALLED_GTE_1_10_7 = installed.compare(DBT_1_10_7) == 1

DBT_INSTALLED_1_8 = DBT_1_8 < installed < DBT_1_9
DBT_INSTALLED_1_9 = DBT_1_9 < installed < DBT_2_0
Loading