Repository navigation
Commit ae798a3
FIX: Enforce bundled native compatibility in Conda packages (#781)
### Work Item / Issue Reference
>
[AB#47315](https://sqlclientdrivers.visualstudio.com/c6d89619-62de-46a0-8b46-70b92a84d85e/_workitems/edit/47315)
### Summary
This pull request introduces significant improvements to the Conda
packaging and validation workflow for `mssql-python`, clarifies the
installation and release process for Conda candidates, and strengthens
platform compatibility and auditing. The most important changes are
grouped below.
**Conda Packaging and Platform Compatibility**
* The Conda recipe now requires `MSSQL_PYTHON_VERSION` to be explicitly
set, preventing accidental builds with the wrong code version. The
combined Conda package now includes both the code and ODBC payload,
eliminating the need for a separate ODBC package as required by pip
installations.
* The Linux `__glibc` dependency is raised to >=2.34 to ensure
compatibility with the full native payload, including the bulk-copy
core.
* On macOS, the build script now explicitly matches `macosx` wheels to
avoid accidentally using Linux wheels in cross-build scenarios.
* For Windows ARM64, the Conda requirements add a `python_abi` pin for
Python 3.12 to ensure ABI compatibility, and the documentation clarifies
that dependencies resolve from the `defaults` channel without automatic
terms acceptance.
**Validation and Auditing Enhancements**
* The Conda build scripts are updated to never silently drop the
bulk-copy core: builds now fail if the required native extension is
missing or incompatible, ensuring no silent reduction in functionality.
* The audit logic now applies PE machine-type validation to both
`win-64` and `win-arm64` packages, and always uses the actual target
subdir for checks.
* The build environment no longer sets or relies on automatic ToS
acceptance for Windows ARM64, and the related environment variable is
removed for clarity and compliance.
**Testing and CI Improvements**
* The CI pipeline now provisions the `testuser` login with `VIEW SERVER
PERFORMANCE STATE` permission, enabling pool eviction tests to observe
physical connections in SQL Server 2022 and 2025 jobs.
**Documentation Updates**
* The main `README.md` and a new `conda/README.md` clarify the temporary
nature of the combined Conda candidate, its installation instructions,
platform requirements, and that these changes do not constitute a public
release or certification.
**Validation Logic Hardening**
* The Python validation logic now includes an additional check to ensure
the required native extension for bulk copy (`mssql_py_core`) is present
and loaded from the correct environment, with improved error messaging
and isolation.
These changes collectively improve the reliability, clarity, and
platform compliance of the Conda packaging and validation process for
`mssql-python`.
---------
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>1 parent ca5d73f commit ae798a3
35 files changed
Lines changed: 4918 additions & 2872 deletions
File tree
- OneBranchPipelines
- jobs
- scripts
- steps
- conda
- mssql-python
- eng
- conda_tools
- formats
- pipelines
- scripts
- tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
5 | | - | |
| 4 | + | |
| 5 | + | |
6 | 6 | | |
7 | | - | |
8 | | - | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
| |||
306 | 307 | | |
307 | 308 | | |
308 | 309 | | |
309 | | - | |
| 310 | + | |
310 | 311 | | |
311 | 312 | | |
312 | 313 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
125 | 125 | | |
126 | 126 | | |
127 | 127 | | |
128 | | - | |
| 128 | + | |
| 129 | + | |
129 | 130 | | |
130 | 131 | | |
131 | | - | |
132 | | - | |
133 | | - | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
134 | 138 | | |
135 | 139 | | |
136 | 140 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
3 | | - | |
4 | | - | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
| 25 | + | |
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| |||
92 | 92 | | |
93 | 93 | | |
94 | 94 | | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
95 | 107 | | |
96 | 108 | | |
97 | 109 | | |
| |||
0 commit comments