Skip to content

Comments

FEAT: Integrate mssql_py_core wheel installation into PR validation pipeline#440

Draft
saurabh500 wants to merge 15 commits intomainfrom
dev/saurabh/integrate-mssql-py-core
Draft

FEAT: Integrate mssql_py_core wheel installation into PR validation pipeline#440
saurabh500 wants to merge 15 commits intomainfrom
dev/saurabh/integrate-mssql-py-core

Conversation

@saurabh500
Copy link
Contributor

@saurabh500 saurabh500 commented Feb 18, 2026

Work Item / Issue Reference

AB#42668


Summary

FEAT: Integrate mssql_py_core wheel installation into PR validation pipeline

Adds automated installation of mssql_py_core from the mssql-rs public NuGet feed into the PR validation
pipeline, enabling _bulkcopy API validation on the cursor during test runs.

Changes

New Files

  • eng/scripts/install-mssql-py-core.ps1 — PowerShell script (Windows/macOS) that downloads the
    mssql-py-core-wheels NuGet package, extracts the platform-appropriate wheel, and pip installs it
  • eng/scripts/install-mssql-py-core.sh — Bash equivalent for Linux containers (Debian/Ubuntu, RHEL 9,
    Alpine)
  • eng/versions/mssql-py-core.version — Pinned version file for the NuGet package (currently
    0.1.0-dev.20260218.140230)

Modified Files

  • eng/pipelines/pr-validation-pipeline.yml — Added "Install mssql_py_core" step to all 10 test jobs (2
    Windows, 2 macOS, 6 Linux containers)

Design Decisions

  • Version pinning: The NuGet package version is read from eng/versions/mssql-py-core.version. The file is
    required — scripts error out if it's missing or empty. No "latest" fallback to prevent unexpected breakage
    from upstream changes.
  • No binary dependencies: Scripts use raw HTTP (Invoke-WebRequest/curl) against the NuGet v3 API and native
    archive extraction (Expand-Archive/unzip). No nuget.exe or dotnet CLI required.
  • Public feed: The mssql-rs_Public feed under sqlclientdrivers/public requires no authentication.
  • Local dev friendly: Developers can run .\eng\scripts\install-mssql-py-core.ps1 (or .sh) locally — same
    codepath as CI.

Testing

  • Verified locally on Windows: script downloads 120 MB NuGet package, extracts correct wheel, pip installs,
    and import mssql_py_core succeeds with PyCoreConnection, PyCoreCursor, set_driver_version exports.

@saurabh500 saurabh500 force-pushed the dev/saurabh/integrate-mssql-py-core branch from c92b05a to 6ca65a3 Compare February 18, 2026 19:26
@saurabh500 saurabh500 changed the title FEAT: Integrate mssql_py_core wheel installation into PR validation pipeline FEAT: Integrate mssql_py_core wheel installation into PR validation pipeline Feb 18, 2026
@github-actions github-actions bot added the pr-size: medium Moderate update size label Feb 18, 2026
@github-actions
Copy link

github-actions bot commented Feb 18, 2026

📊 Code Coverage Report

🔥 Diff Coverage

100%


🎯 Overall Coverage

76%


📈 Total Lines Covered: 5500 out of 7160
📁 Project: mssql-python


Diff Coverage

Diff: main...HEAD, staged and unstaged changes

No lines with coverage information in this diff.


📋 Files Needing Attention

📉 Files with overall lowest coverage (click to expand)
mssql_python.pybind.logger_bridge.hpp: 58.8%
mssql_python.pybind.logger_bridge.cpp: 59.2%
mssql_python.row.py: 66.2%
mssql_python.pybind.ddbc_bindings.cpp: 69.3%
mssql_python.pybind.ddbc_bindings.h: 69.7%
mssql_python.pybind.connection.connection.cpp: 75.3%
mssql_python.ddbc_bindings.py: 79.6%
mssql_python.pybind.connection.connection_pool.cpp: 79.6%
mssql_python.cursor.py: 84.7%
mssql_python.__init__.py: 84.9%

🔗 Quick Links

⚙️ Build Summary 📋 Coverage Details

View Azure DevOps Build

Browse Full Coverage Report

@saurabh500 saurabh500 force-pushed the dev/saurabh/integrate-mssql-py-core branch from 6ca65a3 to 63a91cf Compare February 18, 2026 20:36
- Add install-mssql-py-core.ps1 (Windows) and install-mssql-py-core.sh (Linux/macOS)
  scripts that download the mssql-py-core-wheels NuGet package from the public
  Azure Artifacts feed and pip install the platform-appropriate wheel
- Add eng/versions/mssql-py-core.version to pin the NuGet package version
  (no fallback to latest - file is required)
- Add 'Install mssql_py_core' step to all 10 test jobs in pr-validation-pipeline.yml
- No authentication required (public feed), no nuget.exe dependency (raw HTTP + unzip)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@saurabh500 saurabh500 force-pushed the dev/saurabh/integrate-mssql-py-core branch from 63a91cf to e0d975c Compare February 18, 2026 20:37
saurabh500 and others added 5 commits February 18, 2026 13:42
…o wheel available

- Detect musl vs glibc on Linux to use musllinux_1_2 vs manylinux_2_28 wheel tags
- Skip with warning (exit 0) instead of failing when no compatible wheel is found
- Allows Alpine jobs to continue without blocking on missing musllinux wheels

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Missing wheels must block the pipeline — every platform must have a matching wheel.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
ldd --version exits with code 1 on musl/Alpine. Combined with
set -euo pipefail, the piped grep check always took the else branch,
misidentifying Alpine as glibc (manylinux). pip then rejected the
manylinux wheel since it cannot run on musl.

Fix: capture ldd output into a variable with || true before grepping.
Add fallback detection via /etc/alpine-release and /lib/ld-musl-*.
Skip gracefully (exit 0) when no musllinux wheel is available yet.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Add eng/scripts/repackage-with-mssql-py-core.py that downloads the
mssql-py-core-wheels NuGet package, matches each mssql-python wheel
to its corresponding mssql_py_core wheel by platform/Python tags,
extracts the native extension (.pyd/.so) and supporting files, and
injects them into the mssql-python wheel with updated RECORD hashes.

Pipeline changes:
- OneBranch consolidate-artifacts-job.yml: checkout source, install
  Python, run repackaging after wheel consolidation
- eng/pipelines/build-whl-pipeline.yml: run repackaging after wheel
  build in Windows, macOS, and Linux jobs

musllinux wheels are skipped gracefully since mssql_py_core does not
yet ship musllinux builds.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Official builds now validate eng/versions/mssql-py-core.version and
fail if it contains dev, nightly, alpha, beta, rc, or preview tags.
NonOfficial builds are unaffected and can use any version.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

# Install mssql_py_core from NuGet wheel package inside container
- script: |
docker exec test-container-$(distroName) bash -c "
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This could be a job in itself

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And reused everywhere applicable.

@saurabh500 saurabh500 force-pushed the dev/saurabh/integrate-mssql-py-core branch from 4c53fdb to 67da099 Compare February 21, 2026 00:23
@github-actions github-actions bot added pr-size: large Substantial code update and removed pr-size: medium Moderate update size labels Feb 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-size: large Substantial code update

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant