FIX: Validate built wheels outside source checkout - #753
Open
Gaurav Sharma (bewithgaurav) wants to merge 2 commits into
Open
FIX: Validate built wheels outside source checkout#753Gaurav Sharma (bewithgaurav) wants to merge 2 commits into
Gaurav Sharma (bewithgaurav) wants to merge 2 commits into
Conversation
Run Windows x64 and macOS release tests against the final installed wheel while preserving the Windows ARM64 cross-build limitation. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
📊 Code Coverage Report
Diff CoverageDiff: main...HEAD, staged and unstaged changesNo lines with coverage information in this diff. 📋 Files Needing Attention📉 Files with overall lowest coverage (click to expand)mssql_python.pybind.logger_bridge.cpp: 58.9%
mssql_python.pybind.ddbc_bindings.h: 61.5%
mssql_python.pybind.logger_bridge.hpp: 70.8%
mssql_python.pybind.ddbc_bindings.cpp: 75.6%
mssql_python.__init__.py: 77.6%
mssql_python.row.py: 77.6%
mssql_python.pybind.connection.connection_pool.cpp: 81.6%
mssql_python.pybind.connection.connection.cpp: 84.4%
mssql_python.logging.py: 85.5%
mssql_python.connection.py: 85.9%🔗 Quick Links
|
Gaurav Sharma (bewithgaurav)
marked this pull request as ready for review
September 4, 2026 10:14
Copilot started reviewing on behalf of
Gaurav Sharma (bewithgaurav)
September 4, 2026 10:16
View session
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The functional changes align with the stated goal of validating installed wheels, and the only finding is a minor error-message formatting nit in the Windows pipeline step.
Pull request overview
This PR updates CI validation so Windows x64 and macOS stages run pytest against the installed, built wheel from an isolated directory (matching existing Linux behavior), ensuring release validation exercises the packaged artifact rather than the source checkout.
Changes:
- Update Windows x64 and macOS pipeline stages to build a wheel, install it, and run tests from a temp directory that cannot import
mssql_pythonfrom the repo checkout. - Make source-checkout-only tests explicitly skip when running from an installed wheel layout.
- Update the ODBC resolver negative-path test to detect the compiled extension from either an installed wheel or a source checkout.
File summaries
| File | Description |
|---|---|
tests/test_025_odbc_package_required.py |
Detect installed mssql_python location via find_spec() and check for the native extension within that location. |
tests/test_004_cursor.py |
Skip a source-only compilation test when the mssql_python/ source directory is not present. |
OneBranchPipelines/stages/build-windows-single-stage.yml |
Build and test the wheel from an isolated temp directory on x64; keep ARM64 build-only behavior. |
OneBranchPipelines/stages/build-macos-single-stage.yml |
Build, retag, install, and test the wheel from an isolated temp directory. |
OneBranchPipelines/build-release-package-pipeline.yml |
Update stage documentation to reflect wheel-first validation outside the checkout. |
Review details
- Files reviewed: 5/5 changed files
- Comments generated: 1
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
|
||
| $wheels = @(Get-ChildItem "$(Build.SourcesDirectory)\dist" -Filter *.whl -File) | ||
| if ($wheels.Count -ne 1) { | ||
| Write-Error "Expected one wheel in dist\, found $($wheels.Count)" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Work Item / Issue Reference
Summary
Linux release jobs already install each built wheel in an isolated directory and run pytest against the installed artifact. Extend the same validation to Windows x64 and macOS so those stages test the final wheels instead of the source checkout. Windows ARM64 continues to build without execution because its wheels are cross-compiled on an x64 host.
Make source-dependent tests explicit in wheel-only layouts and run native ODBC resolver coverage against the installed package.
This PR depends on #749 for source-contract test compatibility with isolated wheel runs.
Validated by Build-Release-Package-Pipeline run 172314, with all Windows, macOS, and Linux stages passing.