Skip to content

Commit 1714395

Browse files
committed
Merge branch 'main' into close-conn
2 parents 66192b4 + d524f0e commit 1714395

33 files changed

+4595
-227
lines changed
Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
name: Daily Telemetry E2E Tests
2+
3+
on:
4+
schedule:
5+
- cron: '0 0 * * 0' # Run every Sunday at midnight UTC
6+
7+
workflow_dispatch: # Allow manual triggering
8+
inputs:
9+
test_pattern:
10+
description: 'Test pattern to run (default: tests/e2e/test_telemetry_e2e.py)'
11+
required: false
12+
default: 'tests/e2e/test_telemetry_e2e.py'
13+
type: string
14+
15+
jobs:
16+
telemetry-e2e-tests:
17+
runs-on: ubuntu-latest
18+
environment: azure-prod
19+
20+
env:
21+
DATABRICKS_SERVER_HOSTNAME: ${{ secrets.DATABRICKS_HOST }}
22+
DATABRICKS_HTTP_PATH: ${{ secrets.TEST_PECO_WAREHOUSE_HTTP_PATH }}
23+
DATABRICKS_TOKEN: ${{ secrets.DATABRICKS_TOKEN }}
24+
DATABRICKS_CATALOG: peco
25+
DATABRICKS_USER: ${{ secrets.TEST_PECO_SP_ID }}
26+
27+
steps:
28+
#----------------------------------------------
29+
# check-out repo and set-up python
30+
#----------------------------------------------
31+
- name: Check out repository
32+
uses: actions/checkout@v4
33+
34+
- name: Set up python
35+
id: setup-python
36+
uses: actions/setup-python@v5
37+
with:
38+
python-version: "3.10"
39+
40+
#----------------------------------------------
41+
# ----- install & configure poetry -----
42+
#----------------------------------------------
43+
- name: Install Poetry
44+
uses: snok/install-poetry@v1
45+
with:
46+
virtualenvs-create: true
47+
virtualenvs-in-project: true
48+
installer-parallel: true
49+
50+
#----------------------------------------------
51+
# load cached venv if cache exists
52+
#----------------------------------------------
53+
- name: Load cached venv
54+
id: cached-poetry-dependencies
55+
uses: actions/cache@v4
56+
with:
57+
path: .venv
58+
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ github.event.repository.name }}-${{ hashFiles('**/poetry.lock') }}
59+
60+
#----------------------------------------------
61+
# install dependencies if cache does not exist
62+
#----------------------------------------------
63+
- name: Install dependencies
64+
run: poetry install --no-interaction --all-extras
65+
66+
#----------------------------------------------
67+
# run telemetry E2E tests
68+
#----------------------------------------------
69+
- name: Run telemetry E2E tests
70+
run: |
71+
TEST_PATTERN="${{ github.event.inputs.test_pattern || 'tests/e2e/test_telemetry_e2e.py' }}"
72+
echo "Running tests: $TEST_PATTERN"
73+
poetry run python -m pytest $TEST_PATTERN -v -s
74+
75+
#----------------------------------------------
76+
# upload test results on failure
77+
#----------------------------------------------
78+
- name: Upload test results on failure
79+
if: failure()
80+
uses: actions/upload-artifact@v4
81+
with:
82+
name: telemetry-test-results
83+
path: |
84+
.pytest_cache/
85+
tests-unsafe.log
86+
retention-days: 7
87+

.github/workflows/integration.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,5 +54,9 @@ jobs:
5454
#----------------------------------------------
5555
# run test suite
5656
#----------------------------------------------
57-
- name: Run e2e tests
58-
run: poetry run python -m pytest tests/e2e -n auto
57+
- name: Run e2e tests (excluding daily-only tests)
58+
run: |
59+
# Exclude telemetry E2E tests from PR runs (run daily instead)
60+
poetry run python -m pytest tests/e2e \
61+
--ignore=tests/e2e/test_telemetry_e2e.py \
62+
-n auto

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# Release History
22

3+
# 4.2.1 (2025-11-20)
4+
- Ignore transactions by default (databricks/databricks-sql-python#711 by @jayantsing-db)
5+
6+
# 4.2.0 (2025-11-14)
7+
- Add multi-statement transaction support (databricks/databricks-sql-python#704 by @jayantsing-db)
8+
- Add a workflow to parallelise the E2E tests (databricks/databricks-sql-python#697 by @msrathore-db)
9+
- Bring Python telemetry event model consistent with JDBC (databricks/databricks-sql-python#701 by @nikhilsuri-db)
10+
311
# 4.1.4 (2025-10-15)
412
- Add support for Token Federation (databricks/databricks-sql-python#691 by @madhav-db)
513
- Add metric view support (databricks/databricks-sql-python#688 by @shivam2680)

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,12 @@ or to a Databricks Runtime interactive cluster (e.g. /sql/protocolv1/o/123456789
6767
> to authenticate the target Databricks user account and needs to open the browser for authentication. So it
6868
> can only run on the user's machine.
6969
70+
## Transaction Support
71+
72+
The connector supports multi-statement transactions with manual commit/rollback control. Set `connection.autocommit = False` to disable autocommit mode, then use `connection.commit()` and `connection.rollback()` to control transactions.
73+
74+
For detailed documentation, examples, and best practices, see **[TRANSACTIONS.md](TRANSACTIONS.md)**.
75+
7076
## SQLAlchemy
7177
Starting from `databricks-sql-connector` version 4.0.0 SQLAlchemy support has been extracted to a new library `databricks-sqlalchemy`.
7278

0 commit comments

Comments
 (0)