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/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/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/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"] diff --git a/tests/dbt/test_graph.py b/tests/dbt/test_graph.py index 4e4dfe1986..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", "633a523f295ef0cd496525428815537b") + assert hash_dir in ("9d95cbf6529e2ab51fadd6a3f0a3971f", "5c1aed937708e585054c874ff8f33fd1") else: - assert hash_dir == "633a523f295ef0cd496525428815537b" + 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", "633a523f295ef0cd496525428815537b") + assert hash_dir in ("9d95cbf6529e2ab51fadd6a3f0a3971f", "5c1aed937708e585054c874ff8f33fd1") else: - assert hash_dir == "633a523f295ef0cd496525428815537b" + assert hash_dir == "5c1aed937708e585054c874ff8f33fd1" @pytest.mark.integration