From 82d6c19a0f2e4242b333214f445ff26ee1417f89 Mon Sep 17 00:00:00 2001 From: Tatiana Al-Chueyr Date: Mon, 20 Apr 2026 22:26:01 +0100 Subject: [PATCH 1/4] Use dbt_utils version range for dbt 2.0 compatibility The pinned dbt_utils@1.1.1 is incompatible with dbt 2.0, causing dbt Fusion integration tests to fail. Use a version range so dbt resolves to the latest compatible release. Co-Authored-By: Claude Opus 4.6 (1M context) --- dev/dags/dbt/jaffle_shop/packages.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dev/dags/dbt/jaffle_shop/packages.yml b/dev/dags/dbt/jaffle_shop/packages.yml index 3af907c8aa..5986d47f9a 100644 --- a/dev/dags/dbt/jaffle_shop/packages.yml +++ b/dev/dags/dbt/jaffle_shop/packages.yml @@ -1,3 +1,3 @@ packages: - package: dbt-labs/dbt_utils - version: "1.1.1" + version: [">=1.1.1", "<1.4.0"] From 536f01e479118eaf748c82bb28e07d35a1a436c5 Mon Sep 17 00:00:00 2001 From: Tatiana Al-Chueyr Date: Tue, 21 Apr 2026 08:17:48 +0100 Subject: [PATCH 2/4] Fix unittest cache hash --- tests/dbt/test_graph.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/dbt/test_graph.py b/tests/dbt/test_graph.py index 4e4dfe1986..f0a870bba5 100644 --- a/tests/dbt/test_graph.py +++ b/tests/dbt/test_graph.py @@ -2357,9 +2357,9 @@ def test_save_dbt_ls_cache(mock_variable_set, mock_datetime, tmp_dbt_project_dir # Different macOS versions have produced different hashes for this directory. The first value below is a # historical macOS-specific hash, while the second matches the Linux hash asserted in the else-branch. We # allow both here so that the test is stable across macOS versions and when macOS hashing matches Linux. - assert hash_dir in ("9d95cbf6529e2ab51fadd6a3f0a3971f", "633a523f295ef0cd496525428815537b") + assert hash_dir in ("9d95cbf6529e2ab51fadd6a3f0a3971f", "d1fe27e97a66b046fc8bfd7b6bd0c9a6") else: - assert hash_dir == "633a523f295ef0cd496525428815537b" + assert hash_dir == "d1fe27e97a66b046fc8bfd7b6bd0c9a6" @patch("cosmos.dbt.graph.datetime") @@ -2399,9 +2399,9 @@ def test_save_yaml_selectors_cache(mock_variable_set, mock_datetime, tmp_dbt_pro # Some macOS versions compute a different directory hash than Linux, while others match the Linux behavior. # The first value is the macOS-specific hash; the second value is the Linux hash, which certain macOS versions also produce. # We allow both here to keep the test stable across macOS releases, while non-macOS platforms assert only the Linux hash. - assert hash_dir in ("9d95cbf6529e2ab51fadd6a3f0a3971f", "633a523f295ef0cd496525428815537b") + assert hash_dir in ("9d95cbf6529e2ab51fadd6a3f0a3971f", "d1fe27e97a66b046fc8bfd7b6bd0c9a6") else: - assert hash_dir == "633a523f295ef0cd496525428815537b" + assert hash_dir == "d1fe27e97a66b046fc8bfd7b6bd0c9a6" @pytest.mark.integration From 47281db61ce451c8ef2f397dce1c9dce067e3e2d Mon Sep 17 00:00:00 2001 From: Tatiana Al-Chueyr Date: Tue, 21 Apr 2026 08:32:03 +0100 Subject: [PATCH 3/4] Address copilot feedback --- dev/dags/dbt/jaffle_shop/dbt_project.yml | 2 +- tests/dbt/test_graph.py | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/dev/dags/dbt/jaffle_shop/dbt_project.yml b/dev/dags/dbt/jaffle_shop/dbt_project.yml index ba052995db..4f94ca070a 100644 --- a/dev/dags/dbt/jaffle_shop/dbt_project.yml +++ b/dev/dags/dbt/jaffle_shop/dbt_project.yml @@ -17,7 +17,7 @@ clean-targets: - "dbt_modules" - "logs" -require-dbt-version: [">=1.0.0", "<2.0.0"] +require-dbt-version: [">=1.0.0", "<3.0.0"] models: jaffle_shop: diff --git a/tests/dbt/test_graph.py b/tests/dbt/test_graph.py index f0a870bba5..33db93c28c 100644 --- a/tests/dbt/test_graph.py +++ b/tests/dbt/test_graph.py @@ -2357,9 +2357,9 @@ def test_save_dbt_ls_cache(mock_variable_set, mock_datetime, tmp_dbt_project_dir # Different macOS versions have produced different hashes for this directory. The first value below is a # historical macOS-specific hash, while the second matches the Linux hash asserted in the else-branch. We # allow both here so that the test is stable across macOS versions and when macOS hashing matches Linux. - assert hash_dir in ("9d95cbf6529e2ab51fadd6a3f0a3971f", "d1fe27e97a66b046fc8bfd7b6bd0c9a6") + assert hash_dir in ("9d95cbf6529e2ab51fadd6a3f0a3971f", "8c11a931632283f4bb0af747a35ef0ab") else: - assert hash_dir == "d1fe27e97a66b046fc8bfd7b6bd0c9a6" + assert hash_dir == "8c11a931632283f4bb0af747a35ef0ab" @patch("cosmos.dbt.graph.datetime") @@ -2399,9 +2399,9 @@ def test_save_yaml_selectors_cache(mock_variable_set, mock_datetime, tmp_dbt_pro # Some macOS versions compute a different directory hash than Linux, while others match the Linux behavior. # The first value is the macOS-specific hash; the second value is the Linux hash, which certain macOS versions also produce. # We allow both here to keep the test stable across macOS releases, while non-macOS platforms assert only the Linux hash. - assert hash_dir in ("9d95cbf6529e2ab51fadd6a3f0a3971f", "d1fe27e97a66b046fc8bfd7b6bd0c9a6") + assert hash_dir in ("9d95cbf6529e2ab51fadd6a3f0a3971f", "8c11a931632283f4bb0af747a35ef0ab") else: - assert hash_dir == "d1fe27e97a66b046fc8bfd7b6bd0c9a6" + assert hash_dir == "8c11a931632283f4bb0af747a35ef0ab" @pytest.mark.integration From 654cb0c2b17d71e1977b2e7fbf8a49ab1597f8ed Mon Sep 17 00:00:00 2001 From: Tatiana Al-Chueyr Date: Tue, 21 Apr 2026 08:58:19 +0100 Subject: [PATCH 4/4] Address feedback: https://github.com/astronomer/astronomer-cosmos/pull/2581\#discussion_r3113784448 --- .gitignore | 3 +++ dev/dags/dbt/jaffle_shop/package-lock.yml | 4 ---- tests/dbt/test_graph.py | 8 ++++---- 3 files changed, 7 insertions(+), 8 deletions(-) delete mode 100644 dev/dags/dbt/jaffle_shop/package-lock.yml diff --git a/.gitignore b/.gitignore index e2c14d9eba..8a8d245d87 100644 --- a/.gitignore +++ b/.gitignore @@ -11,6 +11,9 @@ actionlint # dbt_packages is a directory that gets created when you run dbt deps dev/dags/dbt/jaffle_shop/dbt_packages/ +# dbt package lockfile — removed so dbt resolves the version range in packages.yml at runtime +dev/dags/dbt/jaffle_shop/package-lock.yml + # Byte-compiled / optimized / DLL files __pycache__/ *.py[cod] diff --git a/dev/dags/dbt/jaffle_shop/package-lock.yml b/dev/dags/dbt/jaffle_shop/package-lock.yml deleted file mode 100644 index 669f9637dc..0000000000 --- a/dev/dags/dbt/jaffle_shop/package-lock.yml +++ /dev/null @@ -1,4 +0,0 @@ -packages: - - package: dbt-labs/dbt_utils - version: 1.1.1 -sha1_hash: a158c48c59c2bb7d729d2a4e215aabe5bb4f3353 diff --git a/tests/dbt/test_graph.py b/tests/dbt/test_graph.py index 33db93c28c..0687b2d9fa 100644 --- a/tests/dbt/test_graph.py +++ b/tests/dbt/test_graph.py @@ -2357,9 +2357,9 @@ def test_save_dbt_ls_cache(mock_variable_set, mock_datetime, tmp_dbt_project_dir # Different macOS versions have produced different hashes for this directory. The first value below is a # historical macOS-specific hash, while the second matches the Linux hash asserted in the else-branch. We # allow both here so that the test is stable across macOS versions and when macOS hashing matches Linux. - assert hash_dir in ("9d95cbf6529e2ab51fadd6a3f0a3971f", "8c11a931632283f4bb0af747a35ef0ab") + assert hash_dir in ("9d95cbf6529e2ab51fadd6a3f0a3971f", "5c1aed937708e585054c874ff8f33fd1") else: - assert hash_dir == "8c11a931632283f4bb0af747a35ef0ab" + assert hash_dir == "5c1aed937708e585054c874ff8f33fd1" @patch("cosmos.dbt.graph.datetime") @@ -2399,9 +2399,9 @@ def test_save_yaml_selectors_cache(mock_variable_set, mock_datetime, tmp_dbt_pro # Some macOS versions compute a different directory hash than Linux, while others match the Linux behavior. # The first value is the macOS-specific hash; the second value is the Linux hash, which certain macOS versions also produce. # We allow both here to keep the test stable across macOS releases, while non-macOS platforms assert only the Linux hash. - assert hash_dir in ("9d95cbf6529e2ab51fadd6a3f0a3971f", "8c11a931632283f4bb0af747a35ef0ab") + assert hash_dir in ("9d95cbf6529e2ab51fadd6a3f0a3971f", "5c1aed937708e585054c874ff8f33fd1") else: - assert hash_dir == "8c11a931632283f4bb0af747a35ef0ab" + assert hash_dir == "5c1aed937708e585054c874ff8f33fd1" @pytest.mark.integration