From b0ad456cc33582585b7d73df9ab9e157de4a0242 Mon Sep 17 00:00:00 2001 From: Gaurav Sharma Date: Mon, 16 Nov 2026 16:49:06 +0530 Subject: [PATCH 1/4] FIX: Restore Linux wheel image pulls Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../stages/build-linux-single-stage.yml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/OneBranchPipelines/stages/build-linux-single-stage.yml b/OneBranchPipelines/stages/build-linux-single-stage.yml index 0a05b40bb..3e35b3b53 100644 --- a/OneBranchPipelines/stages/build-linux-single-stage.yml +++ b/OneBranchPipelines/stages/build-linux-single-stage.yml @@ -123,14 +123,14 @@ stages: - script: | # Determine image based on LINUX_TAG and ARCH - # Images are published by github.com/microsoft/mssql-rs to GHCR and are - # public, so no registry login is required to pull them. + # Pull the public PyPA images directly because GHCR is not reliably + # reachable from the hosted 1ES agents. # manylinux_2_28 = AlmaLinux 8 / RHEL 8 compatible (glibc 2.28) # musllinux_1_2 = Alpine-based (musl libc) if [[ "$(LINUX_TAG)" == "manylinux_2_28" ]]; then - IMAGE="ghcr.io/microsoft/mssql-rs/import/python-build/manylinux_2_28_$(ARCH):latest" + IMAGE="quay.io/pypa/manylinux_2_28_$(ARCH):latest" elif [[ "$(LINUX_TAG)" == "musllinux" ]]; then - IMAGE="ghcr.io/microsoft/mssql-rs/import/python-build/musllinux_1_2_$(ARCH):latest" + IMAGE="quay.io/pypa/musllinux_1_2_$(ARCH):latest" else echo "ERROR: Unsupported LINUX_TAG '$(LINUX_TAG)'. Expected: manylinux_2_28 or musllinux" >&2 exit 1 @@ -143,7 +143,8 @@ stages: $IMAGE \ tail -f /dev/null displayName: 'Start $(LINUX_TAG) $(ARCH) container' - + retryCountOnTaskFailure: 5 + - script: | set -euo pipefail export PATH=$PATH:`pwd`/docker From fd25491c255588bd27e69c6095a0ed69e8a2c476 Mon Sep 17 00:00:00 2001 From: Gaurav Sharma Date: Mon, 16 Nov 2026 18:45:21 +0530 Subject: [PATCH 2/4] FIX: Make Official runtime selection queue-safe Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../build-release-package-pipeline.yml | 10 +++++++--- tests/test_039_rs_runtime_pipelines.py | 17 ++++++++++++++--- 2 files changed, 21 insertions(+), 6 deletions(-) diff --git a/OneBranchPipelines/build-release-package-pipeline.yml b/OneBranchPipelines/build-release-package-pipeline.yml index 68a579214..abcc40956 100644 --- a/OneBranchPipelines/build-release-package-pipeline.yml +++ b/OneBranchPipelines/build-release-package-pipeline.yml @@ -51,10 +51,11 @@ schedules: # PIPELINE PARAMETERS # ========================= parameters: + # ADO manual runs require a non-empty string; this sentinel maps to no override below. - name: rsVersionOverride - displayName: 'Exact mssql-python-rs test version (NonOfficial only)' + displayName: 'mssql-python-rs test version (NonOfficial only; keep committed for Official)' type: string - default: '' + default: 'committed' # OneBranch build type determines compliance level # - Official: Production builds with full SDL compliance, all security scanning enabled @@ -188,7 +189,10 @@ parameters: # ========================= variables: - name: MSSQL_PYTHON_RS_VERSION - value: ${{ parameters.rsVersionOverride }} + ${{ if eq(parameters.rsVersionOverride, 'committed') }}: + value: '' + ${{ else }}: + value: ${{ parameters.rsVersionOverride }} # Determine effective build type: scheduled builds are Official, manual/PR builds use parameter # Build.Reason values: Schedule, Manual, IndividualCI, PullRequest, BatchedCI - name: effectiveOneBranchType diff --git a/tests/test_039_rs_runtime_pipelines.py b/tests/test_039_rs_runtime_pipelines.py index 944eff36e..2988d4e99 100644 --- a/tests/test_039_rs_runtime_pipelines.py +++ b/tests/test_039_rs_runtime_pipelines.py @@ -37,10 +37,15 @@ "OneBranchPipelines/build-release-package-pipeline.yml", "OneBranchPipelines/stress-test-pipeline.yml", ) +EMPTY_OVERRIDE_ENTRY_POINTS = ( + "eng/pipelines/pr-validation-pipeline.yml", + "eng/pipelines/mssql-odbc-daily-validation-pipeline.yml", + "OneBranchPipelines/stress-test-pipeline.yml", +) -@pytest.mark.parametrize("filename", ENTRY_POINTS) -def test_pipeline_override_is_explicit_and_defaults_to_empty(filename): +@pytest.mark.parametrize("filename", EMPTY_OVERRIDE_ENTRY_POINTS) +def test_nonofficial_pipeline_override_is_explicit_and_defaults_to_empty(filename): source = (ROOT / filename).read_text(encoding="utf-8") assert re.search(r"name: rsVersionOverride[\s\S]*?default: ''", source) assert VERSION_ENV in source @@ -102,7 +107,13 @@ def test_official_entry_points_keep_stable_defaults_without_nightly_resolution() (PIPELINES / "build-release-package-pipeline.yml").read_text(encoding="utf-8") ) override = next(p for p in pipeline["parameters"] if p["name"] == "rsVersionOverride") - assert override["default"] == "" + assert override["default"] == "committed" + runtime = next(v for v in pipeline["variables"] if v["name"] == VERSION_ENV) + assert runtime == { + "name": VERSION_ENV, + "${{ if eq(parameters.rsVersionOverride, 'committed') }}": {"value": ""}, + "${{ else }}": {"value": "${{ parameters.rsVersionOverride }}"}, + } def test_modified_pipeline_yaml_parses(): From ee07ae05ac2728d2184bd5ad892ec6fbb02e7b5c Mon Sep 17 00:00:00 2001 From: Gaurav Sharma Date: Tue, 17 Nov 2026 08:42:19 +0530 Subject: [PATCH 3/4] FIX: Remove unreachable native fetch test Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- tests/test_native_fetch_dispatch.py | 30 ----------------------------- 1 file changed, 30 deletions(-) diff --git a/tests/test_native_fetch_dispatch.py b/tests/test_native_fetch_dispatch.py index 276c056fc..f5611946d 100644 --- a/tests/test_native_fetch_dispatch.py +++ b/tests/test_native_fetch_dispatch.py @@ -438,36 +438,6 @@ def fail_map(cursor): assert observed == [(4, 3, 4), (4, 3, 4)] -@pytest.mark.skipif( - sys.version_info < (3, 13), - reason="Custom MRO prevents type version assignment on CPython 3.13+", -) -def test_native_plan_requires_rearmed_type_dependencies(connection): - runtime = _redesign_runtime() - - class CustomMro(type): - def mro(cls): - return [cls, object] - - class Unversioned(metaclass=CustomMro): - pass - - with _native_fetch_counters() as profiling, connection.cursor() as cursor: - warm(cursor, "fetchone") - policy = runtime[2] - with patch.object(policy, "classes", (*policy.classes, Unversioned)): - ddbc_bindings._invalidate_native_fetch(cursor) - with _fetchone_window(profiling) as declined: - assert cursor.fetchone()[0] == 3 - _assert_fetchone_counts(declined, prepare=1, native=0, fallback=1, sql=1) - ddbc_bindings._invalidate_native_fetch(cursor) - with _fetchone_window(profiling) as restored: - assert cursor.fetchone()[0] == 4 - _assert_fetchone_counts(restored, prepare=1, native=1, fallback=0, sql=1) - assert cursor.rowcount == 4 - assert cursor.rownumber == 3 - - @pytest.mark.parametrize("method", ("fetchval", "iterator")) def test_warm_fetchone_override_is_not_bypassed(connection, method): with connection.cursor() as cursor: From 9f9ccc3700699e80f5baef5a552ff0b007f9a9bb Mon Sep 17 00:00:00 2001 From: Gaurav Sharma Date: Wed, 18 Nov 2026 14:06:48 +0530 Subject: [PATCH 4/4] FIX: Allow four hours for Linux wheel builds Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- OneBranchPipelines/stages/build-linux-single-stage.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/OneBranchPipelines/stages/build-linux-single-stage.yml b/OneBranchPipelines/stages/build-linux-single-stage.yml index 3e35b3b53..4a740aee2 100644 --- a/OneBranchPipelines/stages/build-linux-single-stage.yml +++ b/OneBranchPipelines/stages/build-linux-single-stage.yml @@ -48,8 +48,8 @@ stages: name: Python-1ES-pool demands: - imageOverride -equals PYTHON-1ES-UB2404 - # Six serial build/test cycles exceed two hours under QEMU-based ARM64 emulation. - timeoutInMinutes: 180 + # Allow four hours for six serial build/test cycles under QEMU-based ARM64 emulation. + timeoutInMinutes: 240 variables: # Disable BinSkim for Linux - requires ICU libraries not available in manylinux/musllinux containers