Skip to content

Commit 5872cbd

Browse files
authored
Merge pull request #24 from microsoft/v1.4.0-pr.preview
V1.4.0 pr.preview
2 parents 2ae8352 + 0d87e39 commit 5872cbd

File tree

104 files changed

+1637
-1727
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

104 files changed

+1637
-1727
lines changed

.git-blame-ignore-revs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# .git-blame-ignore-revs
2+
# pre-commit-setup
3+
4eff3237f2bf9d3d206c9234353fb07e70ac6013
4+
# Updated README.md and blackified the code.
5+
29bab50f0e7d9e09b9110500f6e41e1255d3f3f6
Lines changed: 11 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,19 @@
11
---
22
name: Integration tests on Azure
33
on: # yamllint disable-line rule:truthy
4-
push:
4+
workflow_dispatch:
5+
pull_request:
56
branches:
6-
- master
7-
- v*
8-
- azure-testing
9-
pull_request_target:
10-
types: [labeled]
7+
- main
118

129
jobs:
1310
integration-tests-azure:
14-
name: Integration tests on Azure
15-
if: contains(github.event.pull_request.labels.*.name, 'safe to test') || github.ref_name == 'master' || github.ref_name == 'azure-testing'
11+
name: Regular
1612
strategy:
13+
fail-fast: false
1714
matrix:
18-
python_version: ["3.7", "3.8", "3.9", "3.10"]
19-
profile: ["ci_azure_cli", "ci_azure_auto", "ci_azure_environment", "ci_azure_basic"]
15+
python_version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
16+
profile: ["ci_azure_auto"]
2017
msodbc_version: ["17", "18"]
2118
max-parallel: 1
2219
runs-on: ubuntu-latest
@@ -35,39 +32,15 @@ jobs:
3532
- name: Install dependencies
3633
run: pip install -r dev_requirements.txt
3734

38-
- name: Wake up server
39-
env:
40-
DBT_AZURESQL_SERVER: ${{ secrets.DBT_AZURESQL_SERVER }}
41-
DBT_AZURESQL_DB: ${{ secrets.DBT_AZURESQL_DB }}
42-
DBT_AZURESQL_UID: ${{ secrets.DBT_AZURESQL_UID }}
43-
DBT_AZURESQL_PWD: ${{ secrets.DBT_AZURESQL_PWD }}
44-
MSODBC_VERSION: ${{ matrix.msodbc_version }}
45-
run: python devops/scripts/wakeup_azure.py
46-
47-
- name: Configure test users
48-
run: sqlcmd -b -I -i devops/scripts/init.sql
49-
env:
50-
DBT_TEST_USER_1: DBT_TEST_USER_1
51-
DBT_TEST_USER_2: DBT_TEST_USER_2
52-
DBT_TEST_USER_3: DBT_TEST_USER_3
53-
SQLCMDUSER: ${{ secrets.DBT_AZURESQL_UID }}
54-
SQLCMDPASSWORD: ${{ secrets.DBT_AZURESQL_PWD }}
55-
SQLCMDSERVER: ${{ secrets.DBT_AZURESQL_SERVER }}
56-
SQLCMDDBNAME: ${{ secrets.DBT_AZURESQL_DB }}
57-
5835
- name: Run functional tests
5936
env:
6037
DBT_AZURESQL_SERVER: ${{ secrets.DBT_AZURESQL_SERVER }}
6138
DBT_AZURESQL_DB: ${{ secrets.DBT_AZURESQL_DB }}
62-
DBT_AZURESQL_UID: ${{ secrets.DBT_AZURESQL_UID }}
63-
DBT_AZURESQL_PWD: ${{ secrets.DBT_AZURESQL_PWD }}
6439
AZURE_CLIENT_ID: ${{ secrets.DBT_AZURE_SP_NAME }}
6540
AZURE_CLIENT_SECRET: ${{ secrets.DBT_AZURE_SP_SECRET }}
6641
AZURE_TENANT_ID: ${{ secrets.DBT_AZURE_TENANT }}
67-
DBT_TEST_USER_1: DBT_TEST_USER_1
68-
DBT_TEST_USER_2: DBT_TEST_USER_2
69-
DBT_TEST_USER_3: DBT_TEST_USER_3
70-
DBT_TEST_AAD_PRINCIPAL_1: ${{ secrets.DBT_TEST_AAD_PRINCIPAL_1 }}
71-
DBT_TEST_AAD_PRINCIPAL_2: ${{ secrets.DBT_TEST_AAD_PRINCIPAL_2 }}
72-
SQLSERVER_TEST_DRIVER: 'ODBC Driver ${{ matrix.msodbc_version }} for SQL Server'
42+
FABRIC_TEST_DRIVER: 'ODBC Driver ${{ matrix.msodbc_version }} for SQL Server'
43+
DBT_TEST_USER_1: dbo
44+
DBT_TEST_USER_2: dbo
45+
DBT_TEST_USER_3: dbo
7346
run: pytest -ra -v tests/functional --profile "${{ matrix.profile }}"

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

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

.github/workflows/publish-docker.yml

Lines changed: 4 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,14 @@ on: # yamllint disable-line rule:truthy
66
- 'devops/**'
77
- '.github/workflows/publish-docker.yml'
88
branches:
9-
- 'master'
9+
- main
10+
- v*
1011

1112
jobs:
1213
publish-docker-client:
1314
strategy:
1415
matrix:
15-
python_version: ["3.7", "3.8", "3.9", "3.10"]
16+
python_version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
1617
docker_target: ["msodbc17", "msodbc18"]
1718
runs-on: ubuntu-latest
1819
permissions:
@@ -30,7 +31,7 @@ jobs:
3031
password: ${{ secrets.GITHUB_TOKEN }}
3132

3233
- name: Build and push Docker image
33-
uses: docker/build-push-action@v3.2.0
34+
uses: docker/build-push-action@v4.0.0
3435
with:
3536
context: devops
3637
build-args: PYTHON_VERSION=${{ matrix.python_version }}
@@ -39,32 +40,3 @@ jobs:
3940
platforms: linux/amd64
4041
target: ${{ matrix.docker_target }}
4142
tags: ghcr.io/${{ github.repository }}:CI-${{ matrix.python_version }}-${{ matrix.docker_target }}
42-
43-
publish-docker-server:
44-
strategy:
45-
matrix:
46-
mssql_version: ["2017", "2019", "2022"]
47-
runs-on: ubuntu-latest
48-
permissions:
49-
contents: read
50-
packages: write
51-
steps:
52-
- name: Checkout
53-
uses: actions/checkout@v3
54-
55-
- name: Log in to the Container registry
56-
uses: docker/login-action@v2.1.0
57-
with:
58-
registry: ghcr.io
59-
username: ${{ github.actor }}
60-
password: ${{ secrets.GITHUB_TOKEN }}
61-
62-
- name: Build and push Docker image
63-
uses: docker/build-push-action@v3.2.0
64-
with:
65-
context: devops
66-
build-args: MSSQL_VERSION=${{ matrix.mssql_version }}
67-
file: devops/server.Dockerfile
68-
push: true
69-
platforms: linux/amd64
70-
tags: ghcr.io/${{ github.repository }}:server-${{ matrix.mssql_version }}

.github/workflows/unit-tests.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,22 @@
11
---
22
name: Unit tests
33
on: # yamllint disable-line rule:truthy
4+
workflow_dispatch:
45
push:
56
branches:
6-
- master
7+
- main
78
- v*
89
pull_request:
910
branches:
10-
- master
11+
- main
1112
- v*
1213

1314
jobs:
1415
unit-tests:
1516
name: Unit tests
1617
strategy:
1718
matrix:
18-
python_version: ["3.7", "3.8", "3.9", "3.10"]
19+
python_version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
1920
runs-on: ubuntu-latest
2021
permissions:
2122
contents: read
@@ -33,4 +34,4 @@ jobs:
3334
run: pip install -r dev_requirements.txt
3435

3536
- name: Run unit tests
36-
run: pytest tests/unit
37+
run: pytest -n auto -ra -v tests/unit

.pre-commit-config.yaml

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
default_language_version:
2-
python: python3.9
2+
python: python3.10.8
33
repos:
44
- repo: 'https://github.com/pre-commit/pre-commit-hooks'
55
rev: v4.4.0
@@ -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.32.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,12 +78,13 @@ repos:
7878
stages:
7979
- manual
8080
- repo: 'https://github.com/pre-commit/mirrors-mypy'
81-
rev: v0.991
81+
rev: v1.3.0
8282
hooks:
8383
- id: mypy
8484
args:
8585
- '--show-error-codes'
8686
- '--ignore-missing-imports'
87+
- '--explicit-package-bases'
8788
files: '^dbt/adapters'
8889
- id: mypy
8990
alias: mypy-check

.vscode/launch.json

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"version": "0.2.0",
3+
"configurations": [
4+
5+
{
6+
"name": "Python: Current File",
7+
"type": "python",
8+
"request": "launch",
9+
"program": "${file}",
10+
"console": "integratedTerminal",
11+
"justMyCode": false
12+
}
13+
]
14+
}

.vscode/settings.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"python.testing.pytestArgs": [
3+
"tests"
4+
],
5+
"python.testing.unittestEnabled": false,
6+
"python.testing.pytestEnabled": true
7+
}

0 commit comments

Comments
 (0)