Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
172 commits
Select commit Hold shift + click to select a range
08ad0f3
Update some outdated OAuth comments (#339)
jackyhu-db Jan 30, 2024
72e7886
Redact the URL query parameters from the urllib3.connectionpool logs …
mkazia-db Feb 2, 2024
a101e6e
Bump to version 3.0.3 (#344)
jackyhu-db Feb 2, 2024
f8e31f9
[PECO-1411] Support Databricks OAuth on GCP (#338)
jackyhu-db Feb 5, 2024
80d2681
[PECO-1414] Support Databricks native OAuth in Azure (#351)
jackyhu-db Feb 13, 2024
d6eda0b
Prep for Test Automation (#352)
benc-db Feb 14, 2024
f2daf61
Update code owners (#345)
yunbodeng-db Feb 14, 2024
91f3312
Reverting retry behavior on 429s/503s to how it worked in 2.9.3 (#349)
benc-db Feb 15, 2024
95fe8b2
Bump to version 3.1.0 (#358)
jackyhu-db Feb 16, 2024
a8ab0f5
[PECO-1440] Expose current query id on cursor object (#364)
kravets-levko Mar 4, 2024
25bf249
Add a default for retry after (#371)
benc-db Mar 14, 2024
37f051e
Fix boolean literals (#357)
aholyoke Mar 14, 2024
2edcdcd
Don't retry network requests that fail with code 403 (#373)
Mar 15, 2024
2ec9d99
Bump to 3.1.1 (#374)
benc-db Mar 19, 2024
a3f0153
Fix cookie setting (#379)
benc-db Mar 27, 2024
8e30241
Fixing a couple type problems: how I would address most of #381 (#382)
wyattscarpenter Apr 2, 2024
0c5b462
fix the return types of the classes' __enter__ functions (#384)
wyattscarpenter Apr 2, 2024
ee20ecb
Add Kravets Levko to codeowners (#386)
kravets-levko Apr 15, 2024
970a96e
Prepare for 3.1.2 (#387)
benc-db Apr 18, 2024
c120ec3
Update the proxy authentication (#354)
amir-haroun May 23, 2024
0319346
Fix failing tests (#392)
kravets-levko May 28, 2024
3bbe323
Relax `pyarrow` pin (#389)
dhirschfeld May 29, 2024
4a8d689
Fix log error in oauth.py (#269)
susodapop May 29, 2024
f330be3
Enable `delta.feature.allowColumnDefaults` for all tables (#343)
dhirschfeld May 30, 2024
5dc818c
Fix SQLAlchemy tests (#393)
kravets-levko May 30, 2024
02f67f9
Add more debug logging for CloudFetch (#395)
kravets-levko Jun 6, 2024
02fbd29
Update Thrift package (#397)
m1n0 Jun 12, 2024
c836a02
Prepare release 3.2.0 (#396)
kravets-levko Jun 13, 2024
5af6311
move py.typed to correct places (#403)
wyattscarpenter Jul 2, 2024
87975ea
Upgrade mypy (#406)
wyattscarpenter Jul 3, 2024
3b9b671
Do not retry failing requests with status code 401 (#408)
Hodnebo Jul 3, 2024
71e765f
[PECO-1715] Remove username/password (BasicAuth) auth option (#409)
jackyhu-db Jul 4, 2024
6b8b2d7
[PECO-1751] Refactor CloudFetch downloader: handle files sequentially…
kravets-levko Jul 11, 2024
a4a5401
Fix CloudFetch retry policy to be compatible with all `urllib3` versi…
kravets-levko Jul 11, 2024
4d3acd5
Disable SSL verification for CloudFetch links (#414)
kravets-levko Jul 16, 2024
c8b55c6
Prepare relese 3.3.0 (#415)
kravets-levko Jul 17, 2024
b2a1e9a
Fix pandas 2.2.2 support (#416)
kfollesdal Jul 26, 2024
94c0229
[PECO-1801] Make OAuth as the default authenticator if no authenticat…
jackyhu-db Aug 1, 2024
081db39
[PECO-1857] Use SSL options with HTTPS connection pool (#425)
kravets-levko Aug 22, 2024
c4ef199
Prepare release v3.4.0 (#430)
kravets-levko Aug 27, 2024
38bac97
[PECO-1926] Create a non pyarrow flow to handle small results for the…
jprakash-db Oct 3, 2024
2c0d322
[PECO-1961] On non-retryable error, ensure PySQL includes useful info…
shivam2680 Oct 3, 2024
789be97
Reformatted all the files using black (#448)
jprakash-db Oct 3, 2024
4f1b9de
Prepare release v3.5.0 (#457)
jackyhu-db Oct 18, 2024
a5537bf
[PECO-2051] Add custom auth headers into cloud fetch request (#460)
jackyhu-db Oct 25, 2024
6422bdb
Prepare release 3.6.0 (#461)
jackyhu-db Oct 25, 2024
61ca989
[ PECO - 1768 ] PySQL: adjust HTTP retry logic to align with Go and N…
jprakash-db Nov 20, 2024
658fec8
[ PECO-2065 ] Create the async execution flow for the PySQL Connector…
jprakash-db Nov 26, 2024
a1d2fdf
Fix for check_types github action failing (#472)
jprakash-db Nov 26, 2024
5fdfda0
Remove upper caps on dependencies (#452)
arredond Dec 5, 2024
900a026
Updated the doc to specify native parameters in PUT operation is not …
jprakash-db Dec 6, 2024
90b58d5
Incorrect rows in inline fetch result (#479)
jprakash-db Dec 22, 2024
ab99171
Bumped up to version 3.7.0 (#482)
jprakash-db Dec 23, 2024
e2cf9f4
PySQL Connector split into connector and sqlalchemy (#444)
jprakash-db Dec 27, 2024
cfd3362
Removed CI CD for python3.8 (#490)
jprakash-db Jan 17, 2025
68b2a8d
Added CI CD upto python 3.12 (#491)
jprakash-db Jan 18, 2025
331b5c4
Merging changes from v3.7.1 release (#488)
jprakash-db Jan 18, 2025
6f8e57b
Bumped up to version 4.0.0 (#493)
jprakash-db Jan 22, 2025
66e4cb9
Updated action's version (#455)
newwingbird Feb 27, 2025
35c0782
Support Python 3.13 and update deps (#510)
dhirschfeld Feb 27, 2025
29d4ec0
Improve debugging + fix PR review template (#514)
samikshya-db Mar 2, 2025
30206ad
Forward porting all changes into 4.x.x. uptil v3.7.3 (#529)
jprakash-db Mar 7, 2025
87c2a86
Updated the actions/cache version (#532)
jprakash-db Mar 7, 2025
72b5f72
Updated the CODEOWNERS (#531)
jprakash-db Mar 7, 2025
0909040
Add version check for urllib3 in backoff calculation (#526)
shivam2680 Mar 11, 2025
6268d49
[ES-1372353] make user_agent_header part of public API (#530)
shivam2680 Mar 12, 2025
b6fef94
Updates runner used to run DCO check to use databricks-protected-runn…
madhav-db Mar 12, 2025
fc43a18
Support multiple timestamp formats in non arrow flow (#533)
jprakash-db Mar 18, 2025
e00fdb9
prepare release for v4.0.1 (#534)
shivam2680 Mar 19, 2025
e39ad4d
Relaxed bound for python-dateutil (#538)
jprakash-db Apr 1, 2025
ce7e242
Bumped up the version for 4.0.2 (#539)
jprakash-db Apr 1, 2025
3dcbe49
Added example for async execute query (#537)
jprakash-db Apr 1, 2025
8dfcad6
Added urllib3 version check (#547)
jprakash-db Apr 21, 2025
d254e20
Bump version to 4.0.3 (#549)
jprakash-db Apr 22, 2025
3254efc
Cleanup fields as they might be deprecated/removed/change in the futu…
vikrantpuppala May 9, 2025
e71ed00
Refactor decimal conversion in PyArrow tables to use direct casting (…
jayantsing-db May 12, 2025
c7ea206
[PECOBLR-361] convert column table to arrow if arrow present (#551)
shivam2680 May 16, 2025
a47163e
decouple session class from existing Connection
varun-edachali-dbx May 20, 2025
6d92c76
add open property to Connection to ensure maintenance of existing API
varun-edachali-dbx May 20, 2025
0c0675f
update unit tests to address ThriftBackend through session instead of…
varun-edachali-dbx May 20, 2025
c021435
chore: move session specific tests from test_client to test_session
varun-edachali-dbx May 20, 2025
9b82d61
formatting (black)
varun-edachali-dbx May 20, 2025
8789e32
use connection open property instead of long chain through session
varun-edachali-dbx May 20, 2025
035b5fd
trigger integration workflow
varun-edachali-dbx May 20, 2025
6253d4f
fix: ensure open attribute of Connection never fails
varun-edachali-dbx May 21, 2025
f9fcb79
introduce databricksClient interface and thrift backend implementation
varun-edachali-dbx May 22, 2025
7925954
change names of ThriftBackend -> ThriftDatabricksClient in tests
varun-edachali-dbx May 22, 2025
54804b9
fix: remove excess debug log
varun-edachali-dbx May 22, 2025
cbaa1f3
fix: replace thrift_backend with backend in result set param
varun-edachali-dbx May 22, 2025
98b0984
fix: replace module replacement with concrete mock instance in execut…
varun-edachali-dbx May 22, 2025
882dda7
formatting: black + re-organise backend into new dir
varun-edachali-dbx May 23, 2025
a57f6c3
fix: sql.thrift_backend -> sql.backend.thrift_backend in tests and ex…
varun-edachali-dbx May 23, 2025
d4a49ca
introduce Result Set interface and concrete thrift implementation
varun-edachali-dbx May 25, 2025
574df21
create concrete ThriftResultSet instead of ResultSet type
varun-edachali-dbx May 25, 2025
8ea5cf4
ensure backend client returns a ResultSet type in backend tests
varun-edachali-dbx May 25, 2025
3eba92a
formatting (black)
varun-edachali-dbx May 25, 2025
6735fd5
fix: correct client tests
varun-edachali-dbx May 25, 2025
12388e8
formatting (black)
varun-edachali-dbx May 25, 2025
853e6c3
remove excess comments (nit)
varun-edachali-dbx May 25, 2025
4f8b54c
Update CODEOWNERS (#562)
jprakash-db May 21, 2025
12ee56f
Enhance Cursor close handling and context manager exception managemen…
madhav-db May 21, 2025
a5152d0
PECOBLR-86 improve logging on python driver (#556)
saishreeeee May 22, 2025
2c2984e
Update github actions run conditions (#569)
jprakash-db May 26, 2025
4979422
fix: thrift_backend->backend, ResultSet -> ThriftResultSet
varun-edachali-dbx May 26, 2025
6361e85
fix: thrift_backend -> backend in e2e test_driver
varun-edachali-dbx May 26, 2025
904c304
PySQL Connector split into connector and sqlalchemy (#444)
jprakash-db Dec 27, 2024
e5ac8c6
Removed CI CD for python3.8 (#490)
jprakash-db Jan 17, 2025
e06fd2f
Added CI CD upto python 3.12 (#491)
jprakash-db Jan 18, 2025
7126f97
Merging changes from v3.7.1 release (#488)
jprakash-db Jan 18, 2025
b1245da
Bumped up to version 4.0.0 (#493)
jprakash-db Jan 22, 2025
b54b04a
Support Python 3.13 and update deps (#510)
dhirschfeld Feb 27, 2025
e1d7f71
Improve debugging + fix PR review template (#514)
samikshya-db Mar 2, 2025
1c721e0
Forward porting all changes into 4.x.x. uptil v3.7.3 (#529)
jprakash-db Mar 7, 2025
f1fa67a
Updated the actions/cache version (#532)
jprakash-db Mar 7, 2025
512d37c
Updated the CODEOWNERS (#531)
jprakash-db Mar 7, 2025
ff0ec64
Add version check for urllib3 in backoff calculation (#526)
shivam2680 Mar 11, 2025
c5900c9
Support multiple timestamp formats in non arrow flow (#533)
jprakash-db Mar 18, 2025
c86e99b
prepare release for v4.0.1 (#534)
shivam2680 Mar 19, 2025
bcd6f01
Relaxed bound for python-dateutil (#538)
jprakash-db Apr 1, 2025
ca51d1d
Bumped up the version for 4.0.2 (#539)
jprakash-db Apr 1, 2025
d403fcd
Added example for async execute query (#537)
jprakash-db Apr 1, 2025
1b4154c
Added urllib3 version check (#547)
jprakash-db Apr 21, 2025
eac0433
Bump version to 4.0.3 (#549)
jprakash-db Apr 22, 2025
1b0fc9b
decouple session class from existing Connection
varun-edachali-dbx May 20, 2025
b45871e
add open property to Connection to ensure maintenance of existing API
varun-edachali-dbx May 20, 2025
561c351
update unit tests to address ThriftBackend through session instead of…
varun-edachali-dbx May 20, 2025
a3188ad
chore: move session specific tests from test_client to test_session
varun-edachali-dbx May 20, 2025
ff7abf6
formatting (black)
varun-edachali-dbx May 20, 2025
e7e2333
use connection open property instead of long chain through session
varun-edachali-dbx May 20, 2025
fd4fae6
trigger integration workflow
varun-edachali-dbx May 20, 2025
677e66a
fix: ensure open attribute of Connection never fails
varun-edachali-dbx May 21, 2025
4ec8703
introduce databricksClient interface and thrift backend implementation
varun-edachali-dbx May 22, 2025
6ecb6bf
change names of ThriftBackend -> ThriftDatabricksClient in tests
varun-edachali-dbx May 22, 2025
fe2ce17
formatting: black + re-organise backend into new dir
varun-edachali-dbx May 23, 2025
568b1f4
Update CODEOWNERS (#562)
jprakash-db May 21, 2025
ebbd150
remove un-necessary example change
varun-edachali-dbx May 26, 2025
aa8af45
[empty commit] trigger integration tests
varun-edachali-dbx May 26, 2025
e7be76b
introduce normalised sessionId and CommandId for (near) complete back…
varun-edachali-dbx May 27, 2025
7461715
fix: Any is not defined
varun-edachali-dbx May 27, 2025
b295acd
fix: get_session_id_hex() is not defined
varun-edachali-dbx May 27, 2025
8afc5d5
command_handle -> command_id in ExecuteResponse
varun-edachali-dbx May 27, 2025
b8f9146
fix: active op handle -> active command id in Cursor
varun-edachali-dbx May 27, 2025
7c733ee
fixed (most) tests by accounting for normalised Session interface
varun-edachali-dbx May 27, 2025
0917ea1
fix: convert command id to operationHandle in status_request
varun-edachali-dbx May 27, 2025
3fd2a46
decouple session class from existing Connection
varun-edachali-dbx May 20, 2025
03d3ae7
add open property to Connection to ensure maintenance of existing API
varun-edachali-dbx May 20, 2025
fb0fa46
use connection open property instead of long chain through session
varun-edachali-dbx May 20, 2025
e3770cd
trigger integration workflow
varun-edachali-dbx May 20, 2025
3b8002f
fix: ensure open attribute of Connection never fails
varun-edachali-dbx May 21, 2025
f1a350a
fix: de-complicate earlier connection open logic
varun-edachali-dbx May 23, 2025
98b0dc7
Revert "fix: de-complicate earlier connection open logic"
varun-edachali-dbx May 23, 2025
afee423
[empty commit] attempt to trigger ci e2e workflow
varun-edachali-dbx May 23, 2025
2d24fdd
PECOBLR-86 improve logging on python driver (#556)
saishreeeee May 22, 2025
a5561e8
Revert "Merge remote-tracking branch 'upstream/sea-migration' into de…
varun-edachali-dbx May 23, 2025
0d890a5
Reapply "Merge remote-tracking branch 'upstream/sea-migration' into d…
varun-edachali-dbx May 23, 2025
c2aa762
fix: separate session opening logic from instantiation
varun-edachali-dbx May 23, 2025
fe642da
chore: use get_handle() instead of private session attribute in client
varun-edachali-dbx May 24, 2025
394333c
fix: remove accidentally removed assertions
varun-edachali-dbx May 26, 2025
ef07acd
generalise open session, fix session tests to consider positional args
varun-edachali-dbx May 27, 2025
1ef46cf
formatting (black)
varun-edachali-dbx May 27, 2025
76ca997
correct session logic after duplication during merge
varun-edachali-dbx May 27, 2025
afc6f8f
args -> kwargs in tests
varun-edachali-dbx May 27, 2025
f6660ba
delegate protocol version to SessionId
varun-edachali-dbx May 28, 2025
9871a93
ids -> backend/types
varun-edachali-dbx May 28, 2025
595d795
update open session with normalised SessionId
varun-edachali-dbx May 28, 2025
10ee940
remove merge artifacts, account for result set
varun-edachali-dbx May 28, 2025
3d75d6c
fix: import CommandId in client tests
varun-edachali-dbx May 28, 2025
b8e1bbd
expect session_id in protocol version getter
varun-edachali-dbx May 28, 2025
dac08f2
enforce ResultSet return in exec commands in backend client
varun-edachali-dbx May 28, 2025
7b0cbed
abstract Command State away from Thrift specific types
varun-edachali-dbx May 28, 2025
9267ef9
close_command return not used, replacing with None and logging resp
varun-edachali-dbx May 28, 2025
7c60099
init sea backend
varun-edachali-dbx May 28, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
# the repo. Unless a later match takes precedence, these
# users will be requested for review when someone opens a
# pull request.
* @susodapop @arikfr @yunbodeng-db @andrefurlan-db
* @deeksha-db @samikshya-db @jprakash-db @jackyhu-db @madhav-db @gopalldb @jayantsing-db @vikrantpuppala @shivam2680
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!-- We welcome contributions. All patches must include a sign-off. Please see CONTRIBUTING.md for details -->


## What type of PR is this?
## What type of PR is this?
<!-- Check all that apply, delete what doesn't apply. -->

- [ ] Refactor
Expand All @@ -13,8 +13,8 @@

## How is this tested?

- [ ] Unit tests
- [ ] E2E Tests
- [ ] Unit tests
- [ ] E2E Tests
- [ ] Manually
- [ ] N/A

Expand Down
87 changes: 72 additions & 15 deletions .github/workflows/code-quality-checks.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,30 @@
name: Code Quality Checks
on:
on:
push:
branches:
- main
- sea-migration
- telemetry
pull_request:
branches:
- main
- sea-migration
- telemetry
jobs:
run-unit-tests:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.8, 3.9, "3.10", "3.11"]
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
steps:
#----------------------------------------------
# check-out repo and set-up python
#----------------------------------------------
- name: Check out repository
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Set up python ${{ matrix.python-version }}
id: setup-python
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
#----------------------------------------------
Expand All @@ -38,7 +42,7 @@ jobs:
#----------------------------------------------
- name: Load cached venv
id: cached-poetry-dependencies
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: .venv
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ github.event.repository.name }}-${{ hashFiles('**/poetry.lock') }}
Expand All @@ -58,20 +62,71 @@ jobs:
#----------------------------------------------
- name: Run tests
run: poetry run python -m pytest tests/unit
run-unit-tests-with-arrow:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
steps:
#----------------------------------------------
# check-out repo and set-up python
#----------------------------------------------
- name: Check out repository
uses: actions/checkout@v2
- name: Set up python ${{ matrix.python-version }}
id: setup-python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
#----------------------------------------------
# ----- install & configure poetry -----
#----------------------------------------------
- name: Install Poetry
uses: snok/install-poetry@v1
with:
virtualenvs-create: true
virtualenvs-in-project: true
installer-parallel: true

#----------------------------------------------
# load cached venv if cache exists
#----------------------------------------------
- name: Load cached venv
id: cached-poetry-dependencies
uses: actions/cache@v4
with:
path: .venv-pyarrow
key: venv-pyarrow-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ github.event.repository.name }}-${{ hashFiles('**/poetry.lock') }}
#----------------------------------------------
# install dependencies if cache does not exist
#----------------------------------------------
- name: Install dependencies
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
run: poetry install --no-interaction --no-root
#----------------------------------------------
# install your root project, if required
#----------------------------------------------
- name: Install library
run: poetry install --no-interaction --all-extras
#----------------------------------------------
# run test suite
#----------------------------------------------
- name: Run tests
run: poetry run python -m pytest tests/unit
check-linting:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.8, 3.9, "3.10"]
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
steps:
#----------------------------------------------
# check-out repo and set-up python
#----------------------------------------------
- name: Check out repository
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Set up python ${{ matrix.python-version }}
id: setup-python
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
#----------------------------------------------
Expand All @@ -89,7 +144,7 @@ jobs:
#----------------------------------------------
- name: Load cached venv
id: cached-poetry-dependencies
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: .venv
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ github.event.repository.name }}-${{ hashFiles('**/poetry.lock') }}
Expand All @@ -114,16 +169,16 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.8, 3.9, "3.10"]
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
steps:
#----------------------------------------------
# check-out repo and set-up python
#----------------------------------------------
- name: Check out repository
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Set up python ${{ matrix.python-version }}
id: setup-python
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
#----------------------------------------------
Expand All @@ -141,7 +196,7 @@ jobs:
#----------------------------------------------
- name: Load cached venv
id: cached-poetry-dependencies
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: .venv
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ github.event.repository.name }}-${{ hashFiles('**/poetry.lock') }}
Expand All @@ -157,7 +212,9 @@ jobs:
- name: Install library
run: poetry install --no-interaction
#----------------------------------------------
# black the code
# mypy the code
#----------------------------------------------
- name: Mypy
run: poetry run mypy --install-types --non-interactive src
run: |
mkdir .mypy_cache # Workaround for bad error message "error: --install-types failed (no mypy cache directory)"; see https://github.com/python/mypy/issues/10768#issuecomment-2178450153
poetry run mypy --install-types --non-interactive src
6 changes: 4 additions & 2 deletions .github/workflows/dco-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,15 @@ on: [pull_request]

jobs:
check:
runs-on: ubuntu-latest
runs-on:
group: databricks-protected-runner-group
labels: linux-ubuntu-latest
steps:
- name: Check for DCO
id: dco-check
uses: tisonkun/actions-dco@v1.1
- name: Comment about DCO status
uses: actions/github-script@v6
uses: actions/github-script@v7
if: ${{ failure() }}
with:
script: |
Expand Down
62 changes: 62 additions & 0 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: Integration Tests
on:
push:
paths-ignore:
- "**.MD"
- "**.md"
pull_request:
branches:
- main
- sea-migration
- telemetry

jobs:
run-e2e-tests:
runs-on: ubuntu-latest
environment: azure-prod
env:
DATABRICKS_SERVER_HOSTNAME: ${{ secrets.DATABRICKS_HOST }}
DATABRICKS_HTTP_PATH: ${{ secrets.TEST_PECO_WAREHOUSE_HTTP_PATH }}
DATABRICKS_TOKEN: ${{ secrets.DATABRICKS_TOKEN }}
DATABRICKS_CATALOG: peco
DATABRICKS_USER: ${{ secrets.TEST_PECO_SP_ID }}
steps:
#----------------------------------------------
# check-out repo and set-up python
#----------------------------------------------
- name: Check out repository
uses: actions/checkout@v4
- name: Set up python
id: setup-python
uses: actions/setup-python@v5
with:
python-version: "3.10"
#----------------------------------------------
# ----- install & configure poetry -----
#----------------------------------------------
- name: Install Poetry
uses: snok/install-poetry@v1
with:
virtualenvs-create: true
virtualenvs-in-project: true
installer-parallel: true

#----------------------------------------------
# load cached venv if cache exists
#----------------------------------------------
- name: Load cached venv
id: cached-poetry-dependencies
uses: actions/cache@v4
with:
path: .venv
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ github.event.repository.name }}-${{ hashFiles('**/poetry.lock') }}
#----------------------------------------------
# install dependencies if cache does not exist
#----------------------------------------------
- name: Install dependencies
run: poetry install --no-interaction --all-extras
#----------------------------------------------
# run test suite
#----------------------------------------------
- name: Run e2e tests
run: poetry run python -m pytest tests/e2e
78 changes: 78 additions & 0 deletions .github/workflows/publish-manual.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
name: Publish to PyPI Manual [Production]

# Allow manual triggering of the workflow
on:
workflow_dispatch: {}

jobs:
publish:
name: Publish
runs-on: ubuntu-latest

steps:
#----------------------------------------------
# Step 1: Check out the repository code
#----------------------------------------------
- name: Check out repository
uses: actions/checkout@v2 # Check out the repository to access the code

#----------------------------------------------
# Step 2: Set up Python environment
#----------------------------------------------
- name: Set up python
id: setup-python
uses: actions/setup-python@v2
with:
python-version: 3.9 # Specify the Python version to be used

#----------------------------------------------
# Step 3: Install and configure Poetry
#----------------------------------------------
- name: Install Poetry
uses: snok/install-poetry@v1 # Install Poetry, the Python package manager
with:
virtualenvs-create: true
virtualenvs-in-project: true
installer-parallel: true

# #----------------------------------------------
# # Step 4: Load cached virtual environment (if available)
# #----------------------------------------------
# - name: Load cached venv
# id: cached-poetry-dependencies
# uses: actions/cache@v2
# with:
# path: .venv # Path to the virtual environment
# key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ github.event.repository.name }}-${{ hashFiles('**/poetry.lock') }}
# # Cache key is generated based on OS, Python version, repo name, and the `poetry.lock` file hash

# #----------------------------------------------
# # Step 5: Install dependencies if the cache is not found
# #----------------------------------------------
# - name: Install dependencies
# if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true' # Only run if the cache was not hit
# run: poetry install --no-interaction --no-root # Install dependencies without interaction

# #----------------------------------------------
# # Step 6: Update the version to the manually provided version
# #----------------------------------------------
# - name: Update pyproject.toml with the specified version
# run: poetry version ${{ github.event.inputs.version }} # Use the version provided by the user input

#----------------------------------------------
# Step 7: Build and publish the first package to PyPI
#----------------------------------------------
- name: Build and publish databricks sql connector to PyPI
working-directory: ./databricks_sql_connector
run: |
poetry build
poetry publish -u __token__ -p ${{ secrets.PROD_PYPI_TOKEN }} # Publish with PyPI token
#----------------------------------------------
# Step 7: Build and publish the second package to PyPI
#----------------------------------------------

- name: Build and publish databricks sql connector core to PyPI
working-directory: ./databricks_sql_connector_core
run: |
poetry build
poetry publish -u __token__ -p ${{ secrets.PROD_PYPI_TOKEN }} # Publish with PyPI token
6 changes: 3 additions & 3 deletions .github/workflows/publish-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ jobs:
# check-out repo and set-up python
#----------------------------------------------
- name: Check out repository
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Set up python
id: setup-python
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: 3.9
#----------------------------------------------
Expand All @@ -29,7 +29,7 @@ jobs:
#----------------------------------------------
- name: Load cached venv
id: cached-poetry-dependencies
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: .venv
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ github.event.repository.name }}-${{ hashFiles('**/poetry.lock') }}
Expand Down
Loading
Loading