You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
FIX: Use pinned Rust releases with explicit dev-build overrides - #868
Replace the legacy Rust-runtime NuGet transport with exact-version Python wheels.
Local and official/release builds default to the committed released runtime from public PyPI.
GitHub PR validation, which executes in Azure DevOps, resolves the latest published scheduled nightly from the Azure Python feed once per run. Main-branch runs of that validation pipeline follow the same development policy.
All ten validation build/test jobs use that one exact version; the rs-runtime-selection artifact records the selection and nightly wheel URLs/hashes.
Feature testing can still select an exact published version through MSSQL_PYTHON_RS_VERSION or rsVersionOverride, taking precedence over automatic nightly selection.
Use the same selected version in dependency metadata, host/Docker installation, and pre-test version verification.
Preserve cross-architecture Windows validation and Conda artifact provenance.
Block official releases of prerelease runtimes or override-built artifacts.
Install the exact metadata-pinned ODBC dependency from the same selected build in both stress jobs.
Review follow-up also isolates source-pin packaging tests from inherited overrides,
declares their wheel build dependency, and selects toolcache Python 3.12 for coverage
instead of relying on the hosted OS Python's global pip configuration. Intentional
negative-test scanner literals have rule-specific inline suppressions.
The second review follow-up hides both binding and ODBC checkout packages before
stress imports and verifies that ODBC resolves outside the checkout before loading
the binding. Pipeline regressions require their runtime/Conda helper sources, skip
incomplete wheel fixtures, and fail rather than skip when PyYAML is missing from a
complete checkout. PyYAML is declared in the applicable test/build dependency
inputs and all four affected locks; existing locked versions are unchanged.
Automatic nightly selection recognizes scheduled X.Y.Z.devYYYYMMDD releases,
not per-merge versions with an appended build ID. It requires the newest nightly
to have all nine supported cp310-abi3 wheels with valid HTTPS URLs and SHA-256
fragments, and fails on missing, yanked, duplicate or incomplete publications
instead of silently using an older nightly or stable release. Official/release,
daily-validation and stress entry points retain their stable defaults and exact
override support. A feed publication is not an assertion that the producer's
overall build passed, nor proof of a particular Rust commit.
First review follow-up: 1,328 affected tests also passed with an inherited dev-runtime override; 23 skips.
Second review follow-up: 85 pipeline/runtime tests passed both without and with a dev override.
Automatic nightly follow-up: 172 nightly-selection, pipeline, runtime and wheel-download tests passed both without and with an inherited exact dev override.
Live selector CLI resolved 0.3.0.dev20261027 from the Azure Python feed, validated all nine wheel links/hash fragments, emitted the ADO output variable and wrote the selection artifacts.
Existing cross-architecture installer downloaded and metadata-validated the selected nightly's 10.1 MB ARM64 wheel without installing it into the x64 host.
Adjacent Conda/packaging/download regressions: 621 passed, one platform skip; focused profiler pipeline/daily/runtime checks: 32 passed, five platform skips.
The new import-provenance and incomplete-fixture regressions failed before the fixes; actual PowerShell and Git Bash isolation steps passed with synthetic installed packages.
Four hash-required Python 3.10 platform dependency dry-runs passed; all 73 PyYAML SHA-256 hashes match PyPI, and repeated pinned-uv regeneration was stable.
Conda release regression fails with the override guard disabled and passes with it enabled.
Local DevSkim reports none of the three intentional test findings with targeted suppressions; disabling suppressions reproduces all three.
Pinned Black checks and git diff --check passed.
New and changed Python selection/pipeline tests parse with Python 3.10 syntax.
Real dev wheel installation/native import verified through PowerShell and Git Bash.
ARM64 cross-target download and all nine wheel hashes/metadata verified.
Native SQL feature tests and live stress jobs were not executed locally.
The broader profiler module cannot run fully in this checkout: ten tests require the unbuilt cp314 native binding. The changed pipeline's profiler contract passes.
Latest Azure PR validation must pass before this draft is marked ready.
The previous Azure run's Debian/ARM64 failures were missing wheel in the metadata
tests; coverage failed at runtime installation with PEP 668 on OS-managed Python.
Both causes are addressed in this follow-up; remote results still need confirmation.
Public-release download smoke testing was blocked by local TLS connectivity to files.pythonhosted.org; TLS verification remains enabled.
The second follow-up's dependency locks were regenerated through the Microsoft
package proxy because of the same public package-host TLS limitation. Canonical
index and native-platform lock confirmation remains with CI.
Rollout
Coordinate with the companion mssql-rs release-worker PR before the next Rust release: microsoft/mssql-rs#772.
Unix / SQL Server 2022: Python 3.12.3, x86_64, SQL 16.0.4305.5; 5 paired comparisons and 1 warmup.
Unix / SQL Server 2025: Python 3.12.3, x86_64, SQL 17.0.5035.5; 5 paired comparisons and 1 warmup.
A consistent change requires more than 20% median paired movement, at least 1 ms between the median runtimes, and at least 80% of pairs exceeding the relative threshold in the same direction. A slowdown without enough pair agreement is reported as inconsistent.
The displayed change is the median of paired before-and-after ratios. It is not recalculated from the two displayed median runtimes.
Both revisions use profiling-enabled builds on the same agent and database, with alternating order and discarded warmups. Results are diagnostic and do not represent production-wheel latency.
Raw samples and logs are attached to the ADO run as profiler-* artifacts.
This PR replaces NuGet transport for the driver's separate Rust runtime with exact-version Python wheels, using a committed PyPI release by default and explicit overrides for feature testing.
Changes:
Centralizes runtime selection across package metadata, installers, and pre-test verification.
Propagates overrides through build/test pipelines and records artifact provenance for release validation.
Updates Conda handling, contributor documentation, and packaging/pipeline contract tests.
File
Description
tests/test_040_rs_runtime_selection.py
Tests selection, installation, metadata, and verification.
tests/test_039_rs_runtime_pipelines.py
Adds pipeline and release-gate contracts.
tests/test_038_mssql_odbc_daily_validation.py
Updates pin and container-override assertions.
tests/test_037_rs_wheel_download.py
Tests index downloads, hashes, and metadata checks.
tests/test_036_conda_provenance.py
Updates runtime receipt and source-provenance tests.
tests/test_034_conda_verify_cwd.py
Tests producer-version and wheel-hash validation.
tests/test_030_pe_machine_assert.py
Adds the resolver to the packaging fixture.
setup.py
Uses the shared resolver for runtime dependencies.
OneBranchPipelines/stress-test-pipeline.yml
Selects build artifacts and verifies runtime versions.
The platform pattern silently skips valid wheels with dot-separated platform tags, such as manylinux_2_34_x86_64.manylinux_2_35_x86_64. If the index also contains single-tag wheels, staging succeeds while omitting these Linux wheels, although the Conda selector accepts them (eng/conda_tools/contracts.py:207). Allow dot-separated platform tags and add a download regression case with both single-tag and multi-tag wheels.
The reason will be displayed to describe this comment to others. Learn more.
🔵 Needs a closer look
The cross-platform packaging and release-gate migration needs human sign-off, with latest Azure validation and live native/stress execution still unconfirmed.
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
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
Replace the legacy Rust-runtime NuGet transport with exact-version Python wheels.
rs-runtime-selectionartifact records the selection and nightly wheel URLs/hashes.MSSQL_PYTHON_RS_VERSIONorrsVersionOverride, taking precedence over automatic nightly selection.Review follow-up also isolates source-pin packaging tests from inherited overrides,
declares their wheel build dependency, and selects toolcache Python 3.12 for coverage
instead of relying on the hosted OS Python's global pip configuration. Intentional
negative-test scanner literals have rule-specific inline suppressions.
The second review follow-up hides both binding and ODBC checkout packages before
stress imports and verifies that ODBC resolves outside the checkout before loading
the binding. Pipeline regressions require their runtime/Conda helper sources, skip
incomplete wheel fixtures, and fail rather than skip when PyYAML is missing from a
complete checkout. PyYAML is declared in the applicable test/build dependency
inputs and all four affected locks; existing locked versions are unchanged.
Automatic nightly selection recognizes scheduled
X.Y.Z.devYYYYMMDDreleases,not per-merge versions with an appended build ID. It requires the newest nightly
to have all nine supported cp310-abi3 wheels with valid HTTPS URLs and SHA-256
fragments, and fails on missing, yanked, duplicate or incomplete publications
instead of silently using an older nightly or stable release. Official/release,
daily-validation and stress entry points retain their stable defaults and exact
override support. A feed publication is not an assertion that the producer's
overall build passed, nor proof of a particular Rust commit.
Validation
0.3.0.dev20261027from the Azure Python feed, validated all nine wheel links/hash fragments, emitted the ADO output variable and wrote the selection artifacts.git diff --checkpassed.The previous Azure run's Debian/ARM64 failures were missing
wheelin the metadatatests; coverage failed at runtime installation with PEP 668 on OS-managed Python.
Both causes are addressed in this follow-up; remote results still need confirmation.
Public-release download smoke testing was blocked by local TLS connectivity to
files.pythonhosted.org; TLS verification remains enabled.The second follow-up's dependency locks were regenerated through the Microsoft
package proxy because of the same public package-host TLS limitation. Canonical
index and native-platform lock confirmation remains with CI.
Rollout
Coordinate with the companion
mssql-rsrelease-worker PR before the next Rust release: microsoft/mssql-rs#772.This is a draft pending CI and review.