File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 8383 sudo ACCEPT_EULA=Y apt-get install -y msodbcsql18 unixodbc-dev
8484
8585 - name : Run integration tests
86- run : python -m tox -e ud
86+ run : python -m tox -e "py${PYTHON_VERSION//.}-notdoctest-ci"
8787 env :
8888 cloud_provider : ${{ env.CLOUD_PROVIDER }}
8989 ud_connector_path : " git+https://github.com/snowflakedb/universal-driver@${{ env.UD_BRANCH }}#subdirectory=python"
9292 TOX_PARALLEL_NO_SPINNER : 1
9393
9494 - name : Run datasource tests
95- run : python -m tox -e ud- datasource
95+ run : python -m tox -e datasource
9696 env :
9797 cloud_provider : ${{ env.CLOUD_PROVIDER }}
9898 ud_connector_path : " git+https://github.com/snowflakedb/universal-driver@${{ env.UD_BRANCH }}#subdirectory=python"
Original file line number Diff line number Diff line change 22
33set -e
44
5+ # ── Standard install ─────────────────────────────────────────────────
6+ # Install project dependencies using uv. This section is shared by
7+ # every tox environment and must remain provider-agnostic.
8+ # ─────────────────────────────────────────────────────────────────────
9+
510# Check if uv is installed, and install it if not
611if ! command -v uv & > /dev/null; then
712 echo " uv not found, installing it..."
3338 uv pip install ${snowflake_path} /snowflake_connector_python* ${python_version} * .whl
3439 uv pip install ${uv_options[@]}
3540fi
41+
42+ # ── Universal Driver connector swap ──────────────────────────────────
43+ # When ud_connector_path is set, replace snowflake-connector-python
44+ # with the Universal Driver build. This is a no-op for normal CI.
45+ # ─────────────────────────────────────────────────────────────────────
46+
47+ ud_connector_path=${ud_connector_path:- " " }
48+ if [[ -n " ${ud_connector_path} " ]]; then
49+ echo " Swapping snowflake-connector-python → Universal Driver"
50+ echo " UD connector path: ${ud_connector_path} "
51+ # --reinstall ensures wheel files are always extracted even if the
52+ # version matches a previous install (uv otherwise skips silently).
53+ uv pip uninstall snowflake-connector-python
54+ uv pip install --reinstall " ${ud_connector_path} "
55+ fi
Load diff This file was deleted.
Original file line number Diff line number Diff line change @@ -120,6 +120,8 @@ passenv =
120120 GITHUB_ENV
121121 SNOWPARK_PYTHON_API_TEST_BUCKET_PATH
122122 SNOWPARK_PYTHON_API_S3_STORAGE_INTEGRATION
123+ ; Universal Driver connector path (no-op when unset)
124+ ud_connector_path
123125commands =
124126 notudf: {env:SNOWFLAKE_PYTEST_CMD} -m " {env:SNOWFLAKE_TEST_TYPE} and not udf" {posargs:} {env:RERUN_FLAGS} src/snowflake/snowpark tests
125127 udf: {env:SNOWFLAKE_PYTEST_CMD} -m " {env:SNOWFLAKE_TEST_TYPE} or udf" {posargs:} {env:RERUN_FLAGS} src/snowflake/snowpark tests
@@ -264,44 +266,6 @@ deps =
264266commands =
265267 {env:SNOWFLAKE_PYTEST_CMD} -m " {env:SNOWFLAKE_TEST_TYPE}" {posargs:} tests/integ/datasource -n 8
266268
267- [testenv:ud]
268- description = run integration tests with Universal Driver connector
269- allowlist_externals = bash
270- install_command = bash ./scripts/ud_tox_install_cmd.sh {opts} {packages}
271- passenv =
272- {[testenv]passenv}
273- ud_connector_path
274- LD_PRELOAD
275- setenv =
276- {[testenv]setenv}
277- SNOWFLAKE_PYTEST_VERBOSITY = -vvv
278- SNOWFLAKE_PYTEST_PARALLELISM = -n logical
279- SNOWFLAKE_TEST_TYPE = (unit or integ or doctest)
280- LD_PRELOAD = {env:LD_PRELOAD:}
281- commands =
282- {env:SNOWFLAKE_PYTEST_CMD} -m " {env:SNOWFLAKE_TEST_TYPE} or udf" {posargs:} {env:RERUN_FLAGS} tests
283-
284- [testenv:ud-datasource]
285- description = run datasource tests with Universal Driver connector
286- allowlist_externals = bash
287- install_command = bash ./scripts/ud_tox_install_cmd.sh {opts} {packages}
288- passenv =
289- {[testenv]passenv}
290- ud_connector_path
291- LD_PRELOAD
292- setenv =
293- {[testenv]setenv}
294- LD_PRELOAD = {env:LD_PRELOAD:}
295- deps =
296- {[testenv]deps}
297- databricks-sql-connector > 4.0.0
298- oracledb
299- psycopg2-binary
300- pymysql
301- pyodbc
302- commands =
303- {env:SNOWFLAKE_PYTEST_CMD} -m " {env:SNOWFLAKE_TEST_TYPE}" {posargs:} tests/integ/datasource -n 8
304-
305269[pytest]
306270log_cli = True
307271log_cli_level = DEBUG
You can’t perform that action at this time.
0 commit comments