From 9ea052ee03e25fca0e07446807c3e7c63a258147 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Far=C3=ADas=20Santana?= Date: Tue, 19 Aug 2025 10:51:24 +0200 Subject: [PATCH 1/5] fix: Pass empty list as 'active_integrations' in 'parse_manifest' This should allow code running dbt 1.10.7 or later not to break. We still haven't added actual support for whatever this argument is doing, this is just ensuring we don't crash by setting the necessary argument. Some investigation is required into the new feature/argument to figure out what to pass to it. --- airflow_dbt_python/utils/configs.py | 27 +++++++++++++++++++++++++-- airflow_dbt_python/utils/version.py | 4 ++++ 2 files changed, 29 insertions(+), 2 deletions(-) diff --git a/airflow_dbt_python/utils/configs.py b/airflow_dbt_python/utils/configs.py index 2cc8b631..a53639f1 100644 --- a/airflow_dbt_python/utils/configs.py +++ b/airflow_dbt_python/utils/configs.py @@ -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]: @@ -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, @@ -370,6 +377,22 @@ def create_dbt_task( task: BaseTask = self.dbt_task( args=local_flags, config=runtime_config, manifest=manifest ) + if ( + 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=[], + ) + 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): diff --git a/airflow_dbt_python/utils/version.py b/airflow_dbt_python/utils/version.py index 27630c85..0744dbc6 100644 --- a/airflow_dbt_python/utils/version.py +++ b/airflow_dbt_python/utils/version.py @@ -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 From b92d0af110fd6b92138fa9e928f470f8f2ac6cc4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Far=C3=ADas=20Santana?= Date: Tue, 19 Aug 2025 10:52:35 +0200 Subject: [PATCH 2/5] fix(ci): Wait for check from tag --- .github/workflows/tagged_release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tagged_release.yml b/.github/workflows/tagged_release.yml index 95655fd9..5234393a 100644 --- a/.github/workflows/tagged_release.yml +++ b/.github/workflows/tagged_release.yml @@ -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 From 208672c47b265405be76646569eba5932a6175b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Far=C3=ADas=20Santana?= Date: Tue, 19 Aug 2025 10:53:56 +0200 Subject: [PATCH 3/5] chore(ci): Update to run on latest dbt 1.10 and 1.9 --- .github/workflows/ci.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 167172ac..d3aed786 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -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: @@ -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 @@ -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 From 9801f4c02ec45ce2b11f6c1c766e1c2f9ef5bb30 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Far=C3=ADas=20Santana?= Date: Tue, 19 Aug 2025 11:05:49 +0200 Subject: [PATCH 4/5] fix: Use correct statement --- airflow_dbt_python/utils/configs.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/airflow_dbt_python/utils/configs.py b/airflow_dbt_python/utils/configs.py index a53639f1..38de02a6 100644 --- a/airflow_dbt_python/utils/configs.py +++ b/airflow_dbt_python/utils/configs.py @@ -377,7 +377,7 @@ def create_dbt_task( task: BaseTask = self.dbt_task( args=local_flags, config=runtime_config, manifest=manifest ) - if ( + elif ( issubclass(self.dbt_task, ConfiguredTask) and runtime_config and DBT_INSTALLED_GTE_1_10_7 From 1188625a10a0f128197b91a0d600065f58fe430a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Far=C3=ADas=20Santana?= Date: Tue, 19 Aug 2025 11:05:57 +0200 Subject: [PATCH 5/5] fix: Ignore type for new argument --- airflow_dbt_python/utils/configs.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/airflow_dbt_python/utils/configs.py b/airflow_dbt_python/utils/configs.py index 38de02a6..97332191 100644 --- a/airflow_dbt_python/utils/configs.py +++ b/airflow_dbt_python/utils/configs.py @@ -388,7 +388,7 @@ def create_dbt_task( write=False, write_json=False, # TODO: Support for catalog integrations - active_integrations=[], + active_integrations=[], # type: ignore ) task = self.dbt_task( args=local_flags, config=runtime_config, manifest=manifest