Skip to content

Commit eb3e265

Browse files
authored
Merge branch 'master' into fix-deadlocks
2 parents ddcab64 + 24eccf6 commit eb3e265

File tree

16 files changed

+66
-37
lines changed

16 files changed

+66
-37
lines changed

.github/workflows/integration-tests-azure.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
if: contains(github.event.pull_request.labels.*.name, 'safe to test') || github.ref_name == 'master' || github.ref_name == 'azure-testing'
1616
strategy:
1717
matrix:
18-
python_version: ["3.7", "3.8", "3.9", "3.10"]
18+
python_version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
1919
profile: ["ci_azure_cli", "ci_azure_auto", "ci_azure_environment", "ci_azure_basic"]
2020
msodbc_version: ["17", "18"]
2121
max-parallel: 1

.github/workflows/integration-tests-sqlserver.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
name: Integration tests on SQL Server
1616
strategy:
1717
matrix:
18-
python_version: ["3.7", "3.8", "3.9", "3.10"]
18+
python_version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
1919
msodbc_version: ["17", "18"]
2020
sqlserver_version: ["2017", "2019", "2022"]
2121
runs-on: ubuntu-latest

.github/workflows/publish-docker.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
publish-docker-client:
1313
strategy:
1414
matrix:
15-
python_version: ["3.7", "3.8", "3.9", "3.10"]
15+
python_version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
1616
docker_target: ["msodbc17", "msodbc18"]
1717
runs-on: ubuntu-latest
1818
permissions:
@@ -30,7 +30,7 @@ jobs:
3030
password: ${{ secrets.GITHUB_TOKEN }}
3131

3232
- name: Build and push Docker image
33-
uses: docker/build-push-action@v3.2.0
33+
uses: docker/build-push-action@v4.0.0
3434
with:
3535
context: devops
3636
build-args: PYTHON_VERSION=${{ matrix.python_version }}
@@ -60,7 +60,7 @@ jobs:
6060
password: ${{ secrets.GITHUB_TOKEN }}
6161

6262
- name: Build and push Docker image
63-
uses: docker/build-push-action@v3.2.0
63+
uses: docker/build-push-action@v4.0.0
6464
with:
6565
context: devops
6666
build-args: MSSQL_VERSION=${{ matrix.mssql_version }}

.github/workflows/unit-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
name: Unit tests
1616
strategy:
1717
matrix:
18-
python_version: ["3.7", "3.8", "3.9", "3.10"]
18+
python_version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
1919
runs-on: ubuntu-latest
2020
permissions:
2121
contents: read

.pre-commit-config.yaml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ repos:
2121
- id: mixed-line-ending
2222
- id: check-docstring-first
2323
- repo: 'https://github.com/adrienverge/yamllint'
24-
rev: v1.28.0
24+
rev: v1.31.0
2525
hooks:
2626
- id: yamllint
2727
args:
@@ -32,13 +32,13 @@ repos:
3232
hooks:
3333
- id: absolufy-imports
3434
- repo: 'https://github.com/hadialqattan/pycln'
35-
rev: v2.1.2
35+
rev: v2.1.3
3636
hooks:
3737
- id: pycln
3838
args:
3939
- '--all'
4040
- repo: 'https://github.com/pycqa/isort'
41-
rev: 5.10.1
41+
rev: 5.12.0
4242
hooks:
4343
- id: isort
4444
args:
@@ -50,7 +50,7 @@ repos:
5050
- '--python-version'
5151
- '39'
5252
- repo: 'https://github.com/psf/black'
53-
rev: 22.10.0
53+
rev: 23.3.0
5454
hooks:
5555
- id: black
5656
args:
@@ -65,8 +65,8 @@ repos:
6565
- '--target-version=py39'
6666
- '--check'
6767
- '--diff'
68-
- repo: 'https://gitlab.com/pycqa/flake8'
69-
rev: 3.9.2
68+
- repo: 'https://github.com/pycqa/flake8'
69+
rev: 6.0.0
7070
hooks:
7171
- id: flake8
7272
args:
@@ -78,7 +78,7 @@ repos:
7878
stages:
7979
- manual
8080
- repo: 'https://github.com/pre-commit/mirrors-mypy'
81-
rev: v0.991
81+
rev: v1.2.0
8282
hooks:
8383
- id: mypy
8484
args:

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
11
# Changelog
22

3+
### v1.4.0
4+
5+
#### Features
6+
7+
* Support for [dbt-core 1.4](https://github.com/dbt-labs/dbt-core/releases/tag/v1.4.1)
8+
* [Incremental predicates](https://docs.getdbt.com/docs/build/incremental-models#about-incremental_predicates) are currently not supported in this adapter
9+
* Add support for Python 3.11
10+
* Replace deprecated exception functions
11+
* Consolidate timestamp macros
12+
313
### v1.3.0
414

515
#### Features

dbt/adapters/sqlserver/__version__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
version = "1.3.1"
1+
version = "1.4.0"

dbt/adapters/sqlserver/sql_server_adapter.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,6 @@ def get_rows_different_sql(
7676
column_names: Optional[List[str]] = None,
7777
except_operator: str = "EXCEPT",
7878
) -> str:
79-
8079
"""
8180
note: using is not supported on Synapse so COLUMNS_EQUAL_SQL is adjsuted
8281
Generate SQL for a query that returns a single row with a two

dbt/adapters/sqlserver/sql_server_connection_manager.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -250,23 +250,22 @@ def exception_handler(self, sql):
250250
except pyodbc.Error:
251251
logger.debug("Failed to release connection!")
252252

253-
raise dbt.exceptions.DatabaseException(str(e).strip()) from e
253+
raise dbt.exceptions.DbtDatabaseError(str(e).strip()) from e
254254

255255
except Exception as e:
256256
logger.debug(f"Error running SQL: {sql}")
257257
logger.debug("Rolling back transaction.")
258258
self.release()
259-
if isinstance(e, dbt.exceptions.RuntimeException):
259+
if isinstance(e, dbt.exceptions.DbtRuntimeError):
260260
# during a sql query, an internal to dbt exception was raised.
261261
# this sounds a lot like a signal handler and probably has
262262
# useful information, so raise it without modification.
263263
raise
264264

265-
raise dbt.exceptions.RuntimeException(e)
265+
raise dbt.exceptions.DbtRuntimeError(e)
266266

267267
@classmethod
268268
def open(cls, connection: Connection) -> Connection:
269-
270269
if connection.state == ConnectionState.OPEN:
271270
logger.debug("Connection is already open, skipping open.")
272271
return connection
@@ -276,7 +275,6 @@ def open(cls, connection: Connection) -> Connection:
276275
con_str = [f"DRIVER={{{credentials.driver}}}"]
277276

278277
if "\\" in credentials.host:
279-
280278
# If there is a backslash \ in the host name, the host is a
281279
# SQL Server named instance. In this case then port number has to be omitted.
282280
con_str.append(f"SERVER={credentials.host}")
@@ -374,7 +372,6 @@ def add_query(
374372
bindings: Optional[Any] = None,
375373
abridge_sql_log: bool = False,
376374
) -> Tuple[Connection, Any]:
377-
378375
connection = self.get_thread_connection()
379376

380377
if auto_begin and connection.transaction_open is False:

dbt/include/sqlserver/macros/adapters/freshness.sql

Lines changed: 0 additions & 3 deletions
This file was deleted.

0 commit comments

Comments
 (0)