From 96b1c7a28ca84d99d01e312d15654316ac9b7a34 Mon Sep 17 00:00:00 2001 From: "Arthur Chionh (dataroots)" <90323829+arthurcht@users.noreply.github.com> Date: Fri, 1 Mar 2024 11:00:13 +0100 Subject: [PATCH 1/5] fix "make dev" by adjusting pip install requirements --- setup.py | 1 - 1 file changed, 1 deletion(-) diff --git a/setup.py b/setup.py index 8f98ea4..be9be03 100644 --- a/setup.py +++ b/setup.py @@ -69,7 +69,6 @@ def run(self): "pyodbc>=4.0.35,<5.2.0", "azure-identity>=1.12.0", "dbt-common~=0.1.6", - "dbt-adapters~=0.1.0a6", ], cmdclass={ "verify": VerifyVersionCommand, From 0f1fed5ffebbcd8ed73c79494c28d79c5679a4d2 Mon Sep 17 00:00:00 2001 From: "Arthur Chionh (dataroots)" <90323829+arthurcht@users.noreply.github.com> Date: Fri, 1 Mar 2024 11:01:08 +0100 Subject: [PATCH 2/5] fix "make dev" by adjusting pip install requirements --- dev_requirements.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dev_requirements.txt b/dev_requirements.txt index be69fe1..46d6864 100644 --- a/dev_requirements.txt +++ b/dev_requirements.txt @@ -1,8 +1,8 @@ # install latest changes in dbt-core # TODO: how to automate switching from develop to version branches? -git+https://github.com/dbt-labs/dbt-core.git#egg=dbt-core&subdirectory=core -git+https://github.com/dbt-labs/dbt-adapters.git -git+https://github.com/dbt-labs/dbt-adapters.git#subdirectory=dbt-tests-adapter +git+https://github.com/dbt-labs/dbt-core.git@fc431010ef0bd11ee6a502fc6c9e5e3e75c5d72d#egg=dbt-core&subdirectory=core +git+https://github.com/dbt-labs/dbt-adapters.git@4c289b150853b94beb67921f2a8dd203abe53cbe +git+https://github.com/dbt-labs/dbt-adapters.git@4c289b150853b94beb67921f2a8dd203abe53cbe#subdirectory=dbt-tests-adapter pytest==8.0.1 twine==5.0.0 From e1523c75c0de05a60a207bd580ab755677ef8717 Mon Sep 17 00:00:00 2001 From: "Arthur Chionh (dataroots)" <90323829+arthurcht@users.noreply.github.com> Date: Fri, 1 Mar 2024 11:01:52 +0100 Subject: [PATCH 3/5] pre-release v1.8.0rc1 --- dbt/adapters/fabric/__version__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dbt/adapters/fabric/__version__.py b/dbt/adapters/fabric/__version__.py index f15b401..037ac1f 100644 --- a/dbt/adapters/fabric/__version__.py +++ b/dbt/adapters/fabric/__version__.py @@ -1 +1 @@ -version = "1.8.0a1" +version = "1.8.0rc1" From 278cbb7e3cf58a63cc93e7730357c40f86fef4ad Mon Sep 17 00:00:00 2001 From: "Arthur Chionh (dataroots)" <90323829+arthurcht@users.noreply.github.com> Date: Fri, 1 Mar 2024 12:42:34 +0100 Subject: [PATCH 4/5] fix tests/functional/adapter/test_query_comment.py::TestMacroArgsQueryComments::test_matches_comment to use correct dbt_version (ref dbt-labs/dbt-core) --- tests/functional/adapter/test_query_comment.py | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/tests/functional/adapter/test_query_comment.py b/tests/functional/adapter/test_query_comment.py index 43223be..1488274 100644 --- a/tests/functional/adapter/test_query_comment.py +++ b/tests/functional/adapter/test_query_comment.py @@ -6,6 +6,8 @@ BaseNullQueryComments, BaseQueryComments, ) +from dbt.version import __version__ as dbt_version +import json # Tests # @@ -18,7 +20,18 @@ class TestMacroQueryComments(BaseMacroQueryComments): class TestMacroArgsQueryComments(BaseMacroArgsQueryComments): - pass + def test_matches_comment(self, project) -> bool: + logs = self.run_get_json() + expected_dct = { + "app": "dbt++", + "dbt_version": dbt_version, + "macro_version": "0.1.0", + "message": f"blah: {project.adapter.config.target_name}", + } + expected = r"/* {} */\n".format(json.dumps(expected_dct, sort_keys=True)).replace( + '"', r"\"" + ) + assert expected in logs class TestMacroInvalidQueryComments(BaseMacroInvalidQueryComments): From 3f3d73ff34c8b0b876faea0276d2a8f1583ff968 Mon Sep 17 00:00:00 2001 From: artc95 Date: Fri, 1 Mar 2024 13:14:46 +0100 Subject: [PATCH 5/5] bump v1.8.0rc2 with changelog --- CHANGELOG.md | 6 ++++++ dbt/adapters/fabric/__version__.py | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1658e6e..d641e2c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +### v1.8.0rc2 + +## Bug Fixes +* Remove dbt-adapters requirement in setup.py, and specify commit SHA of dbt-core and dbt-adapters in dev_requirements.txt, to fix `make dev` +* Fix failing test `tests/functional/adapter/test_query_comment.py::TestMacroArgsQueryComments::test_matches_comment` to use correct dbt_version, see [dbt-core](https://github.com/dbt-labs/dbt-core/blob/main/tests/functional/adapter/query_comment/test_query_comment.py) + ### v1.8.0rc1 ## Features diff --git a/dbt/adapters/fabric/__version__.py b/dbt/adapters/fabric/__version__.py index 037ac1f..76a9c93 100644 --- a/dbt/adapters/fabric/__version__.py +++ b/dbt/adapters/fabric/__version__.py @@ -1 +1 @@ -version = "1.8.0rc1" +version = "1.8.0rc2"