From 6f56c76e4c421bf2b086446b23538fcea0737320 Mon Sep 17 00:00:00 2001 From: Quigley Malcolm Date: Wed, 16 Oct 2024 10:30:32 -0500 Subject: [PATCH 1/3] Add test for ensuring bad incremental strategies get validated/caught --- tests/functional/adapter/test_basic.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/functional/adapter/test_basic.py b/tests/functional/adapter/test_basic.py index bf31a123..d5a01300 100644 --- a/tests/functional/adapter/test_basic.py +++ b/tests/functional/adapter/test_basic.py @@ -10,6 +10,7 @@ from dbt.tests.adapter.basic.test_incremental import ( BaseIncremental, BaseIncrementalNotSchemaChange, + BaseIncrementalBadStrategy, ) from dbt.tests.adapter.basic.test_singular_tests import BaseSingularTests from dbt.tests.adapter.basic.test_singular_tests_ephemeral import BaseSingularTestsEphemeral @@ -55,6 +56,10 @@ class TestBaseIncrementalNotSchemaChange(BaseIncrementalNotSchemaChange): pass +class TestBaseIncrementalBadStrategy(BaseIncrementalBadStrategy): + pass + + class TestSingularTests(BaseSingularTests): pass From 2d6284296d07363c41f48c5721f22a3ff4e3c088 Mon Sep 17 00:00:00 2001 From: Quigley Malcolm Date: Thu, 17 Oct 2024 09:24:24 -0700 Subject: [PATCH 2/3] REVERT THIS COMMIT - Temporarily update dbt-adapters/dbt-tests-adapters dependencies This is necessary because the changes we are making in dbt-adapters via https://github.com/dbt-labs/dbt-adapters/pull/331 only get tested when run with an adapter. So this branch on dbt-postgres is not just for ensuring the test is run, but also proof for the open PR in dbt-adapters that the tests work. To show that though, we have to update the dependencies to temporarily point at the dbt-adapters branch that has the work (because the work hasn't been merged to main yet) --- pyproject.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 726dc64a..450be743 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -54,9 +54,9 @@ path = "dbt/adapters/postgres/__version__.py" [tool.hatch.envs.default] dependencies = [ - "dbt-adapters @ git+https://github.com/dbt-labs/dbt-adapters.git", + "dbt-adapters @ git+https://github.com/dbt-labs/dbt-adapters.git@qmalcolm--330-always-ensure-valid-materialization", "dbt-common @ git+https://github.com/dbt-labs/dbt-common.git", - "dbt-tests-adapter @ git+https://github.com/dbt-labs/dbt-adapters.git#subdirectory=dbt-tests-adapter", + "dbt-tests-adapter @ git+https://github.com/dbt-labs/dbt-adapters.git@qmalcolm--330-always-ensure-valid-materialization#subdirectory=dbt-tests-adapter", "dbt-core @ git+https://github.com/dbt-labs/dbt-core.git#subdirectory=core", 'pre-commit==3.7.0;python_version>="3.9"', 'pre-commit==3.5.0;python_version=="3.8"', From c5c4750bdfc88ebec0aaabee5bb48931893827a0 Mon Sep 17 00:00:00 2001 From: Quigley Malcolm Date: Thu, 17 Oct 2024 23:28:22 -0700 Subject: [PATCH 3/3] Revert "REVERT THIS COMMIT - Temporarily update dbt-adapters/dbt-tests-adapters dependencies" This reverts commit 2d6284296d07363c41f48c5721f22a3ff4e3c088. --- pyproject.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index bb4a65ac..f3aa52c1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -53,9 +53,9 @@ path = "dbt/adapters/postgres/__version__.py" [tool.hatch.envs.default] dependencies = [ - "dbt-adapters @ git+https://github.com/dbt-labs/dbt-adapters.git@qmalcolm--330-always-ensure-valid-materialization", + "dbt-adapters @ git+https://github.com/dbt-labs/dbt-adapters.git", "dbt-common @ git+https://github.com/dbt-labs/dbt-common.git", - "dbt-tests-adapter @ git+https://github.com/dbt-labs/dbt-adapters.git@qmalcolm--330-always-ensure-valid-materialization#subdirectory=dbt-tests-adapter", + "dbt-tests-adapter @ git+https://github.com/dbt-labs/dbt-adapters.git#subdirectory=dbt-tests-adapter", "dbt-core @ git+https://github.com/dbt-labs/dbt-core.git#subdirectory=core", "pre-commit==3.7.0", "freezegun",