Skip to content

Commit

Permalink
Merge pull request #216 from microsoft/v1.8.0rc1_dataroots
Browse files Browse the repository at this point in the history
v1.8.0rc1
  • Loading branch information
arthurcht authored Mar 1, 2024
2 parents 5277d76 + 91e9bc5 commit 7d414cd
Show file tree
Hide file tree
Showing 7 changed files with 71 additions and 11 deletions.
40 changes: 40 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,32 @@
# Changelog
### v1.8.0rc1

## Features

Supporting dbt-core 1.8.0

## Enhancements

[Decouple imports](https://github.com/dbt-labs/dbt-adapters/discussions/87) to common dbt core and dbt adapter interface packages for future maintainability and extensibility.

* Bump dev requirements
- from pytest~=7.4. to pytest~=8.0.1
- from twine~=4.0.2 to twine~=5.0.0
- from pre-commit~=3.5.0 to pre-commit~=3.6.2
- specify commit SHA of dbt-core and dbt-adapters in dev_requirements.txt, to fix `make dev`

* Inherit [dbt-fabric v1.8.0rc2](https://github.com/microsoft/dbt-fabric/blob/v1.8.0rc2/setup.py) - Bump adapter packages
- from pyodbc>=4.0.35,<5.1.0" to pyodbc>=4.0.35,<5.2.0

> From now on, Apple-silicon users don't have to locally build pyodbc, because M1, M2 binaries is included in pyodbc from 5.1.0 onwards!
## Under the hood
* 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.7.0

* Official release

## v1.7.0rc1

## Features
Expand All @@ -20,6 +48,10 @@
- dbt_clone (same target and state)
- seed

## v1.6.0

* Official release

## v1.6.0rc1

* Support for [dbt-core 1.6](https://github.com/dbt-labs/dbt-core/releases/tag/v1.6.0)
Expand All @@ -39,6 +71,10 @@
- equals
- dbt_clone

## v1.5.0

* Official release

## v.1.5.0rc1

## Features
Expand All @@ -57,6 +93,10 @@
- hooks
- simple_copy

## v1.4.1

* Official release

## v1.4.1rc1

#### Under the hood
Expand Down
2 changes: 1 addition & 1 deletion dbt/adapters/synapse/__version__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
version = "1.7.0rc1"
version = "1.8.0rc1"
6 changes: 3 additions & 3 deletions dbt/adapters/synapse/synapse_adapter.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@

from dbt.adapters.base.relation import BaseRelation
from dbt.adapters.cache import _make_ref_key_dict
from dbt.adapters.events.types import SchemaCreation
from dbt.adapters.fabric import FabricAdapter
from dbt.adapters.sql.impl import CREATE_SCHEMA_MACRO_NAME
from dbt.contracts.graph.nodes import ColumnLevelConstraint, ConstraintType
from dbt.events.functions import fire_event
from dbt.events.types import SchemaCreation
from dbt_common.contracts.constraints import ColumnLevelConstraint, ConstraintType
from dbt_common.events.functions import fire_event

from dbt.adapters.synapse.synapse_column import SynapseColumn
from dbt.adapters.synapse.synapse_connection_manager import SynapseConnectionManager
Expand Down
12 changes: 9 additions & 3 deletions dev_requirements.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
pytest==8.0.0
# 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@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
wheel==0.42.0
pre-commit==3.5.0
pre-commit==3.5.0;python_version<"3.9"
pre-commit==3.6.2;python_version>="3.9"
pytest-dotenv==0.5.2
dbt-tests-adapter~=1.7.4
aiohttp==3.8.3
azure-mgmt-synapse==2.0.0
flaky==3.7.0
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
"Anders Swanson",
"Sam Debruyn",
]
dbt_version = "1.7"
dbt_fabric_requirement = "dbt-fabric~=1.7.4"
dbt_version = "1.8"
dbt_fabric_requirement = "dbt-fabric~=1.8.0rc2"
description = """An Azure Synapse adapter plugin for dbt"""

this_directory = os.path.abspath(os.path.dirname(__file__))
Expand Down
2 changes: 1 addition & 1 deletion tests/functional/adapter/test_dbt_show.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import pytest
from dbt.tests.adapter.dbt_show.test_dbt_show import (
from dbt.tests.adapter.dbt_show.fixtures import (
models__sample_model,
models__sql_header,
seeds__sample_seed,
Expand Down
16 changes: 15 additions & 1 deletion tests/functional/adapter/test_query_comment.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import json

from dbt.tests.adapter.query_comment.test_query_comment import (
BaseEmptyQueryComments,
BaseMacroArgsQueryComments,
Expand All @@ -6,6 +8,7 @@
BaseNullQueryComments,
BaseQueryComments,
)
from dbt.version import __version__ as dbt_version


class TestQueryCommentsSynapse(BaseQueryComments):
Expand All @@ -17,7 +20,18 @@ class TestMacroQueryCommentsSynapse(BaseMacroQueryComments):


class TestMacroArgsQueryCommentsSynapse(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 TestMacroInvalidQueryCommentsSynapse(BaseMacroInvalidQueryComments):
Expand Down

0 comments on commit 7d414cd

Please sign in to comment.