Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
e0d975c
Add mssql_py_core wheel installation to PR validation pipeline
saurabh500 Feb 18, 2026
6cc5756
Fix Alpine compatibility: detect musl libc and skip gracefully when n…
saurabh500 Feb 18, 2026
cbef84a
Fail hard when no compatible wheel is found
saurabh500 Feb 18, 2026
3829c5f
Fix musl detection on Alpine for mssql_py_core install
saurabh500 Feb 19, 2026
389ca38
Add mssql_py_core repackaging into mssql-python wheels
saurabh500 Feb 19, 2026
c5544f0
Block Official builds from using dev/nightly mssql-py-core versions
saurabh500 Feb 19, 2026
67da099
Add bulkcopy test, rewrite install scripts, make setup.py validate-only
saurabh500 Feb 21, 2026
d9ad17e
Merge branch 'main' of https://github.com/microsoft/mssql-python into…
saurabh500 Feb 21, 2026
9b29902
REF: Remove mssql_py_core repackaging steps and update package instal…
saurabh500 Feb 21, 2026
2381b4a
FEAT: Enhance connstr_to_pycore_params to handle boolean parameters f…
saurabh500 Feb 21, 2026
4c3bf62
REF: Clean up whitespace in bulkcopy integration tests for improved r…
saurabh500 Feb 21, 2026
610a6cb
REF: Update installation scripts to clarify skipped files and update …
saurabh500 Feb 21, 2026
3b185e3
REF: Update platform tagging for Linux wheels in installation scripts
saurabh500 Feb 21, 2026
fcc6852
REF: Update manylinux tag versions in platform info and installation …
saurabh500 Feb 21, 2026
a82eb05
BUMP: Update version to 0.1.0-dev.20260221.140717
saurabh500 Feb 21, 2026
73b2adb
BUMP: Update version to 0.1.0-dev.20260221.140732
saurabh500 Feb 21, 2026
63fe2c8
REF: Update manylinux version and install mssql_py_core in build stages
saurabh500 Feb 22, 2026
9f0137c
BUMP: Update version to 0.1.0-dev.20260222.140833
saurabh500 Feb 22, 2026
3cb5b66
REF: Remove unused boolean key handling in connection string paramete…
saurabh500 Feb 22, 2026
95797fa
Add installation step for mssql_py_core from NuGet wheels
saurabh500 Feb 23, 2026
a5d1b8b
REF: Improve mssql_py_core validation and error handling in setup.py
saurabh500 Feb 23, 2026
4b8fb4a
Refactor Python command usage in build scripts to use 'python' instea…
saurabh500 Feb 23, 2026
f48e325
Refactor install-mssql-py-core.sh into functions with extracted Pytho…
saurabh500 Feb 23, 2026
a790860
Refactor install-mssql-py-core.ps1 into functions, reuse extract_whee…
saurabh500 Feb 23, 2026
257db01
Refactor mssql_py_core installation steps to use a template for consi…
saurabh500 Feb 23, 2026
7fd968e
Enhance documentation for NuGet feed resolution in scripts to clarify…
saurabh500 Feb 23, 2026
3f34603
Update platform tags for manylinux compatibility in get_platform_info…
saurabh500 Feb 23, 2026
faf381e
Update Docker image tag for manylinux compatibility in build script
saurabh500 Feb 23, 2026
ca28c48
Refactor artifact consolidation and version validation in pipelines
saurabh500 Feb 23, 2026
6a81cf5
Add version file download and validation for mssql-py-core in release…
saurabh500 Feb 23, 2026
ff1ac61
Add glibc version check for mssql_py_core import verification
saurabh500 Feb 23, 2026
a11f322
Add runtime check for mssql_py_core loading in bulkcopy tests
saurabh500 Feb 23, 2026
295bd57
Add version validation for mssql-py-core in release pipelines
saurabh500 Feb 23, 2026
7104581
Refactor comments for clarity and improve formatting in bulkcopy tests
saurabh500 Feb 23, 2026
8a6e7d3
Merge branch 'main' into dev/saurabh/integrate-mssql-py-core
gargsaumya Feb 23, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -61,5 +61,8 @@ build/
*venv*/
**/*venv*/

# Extracted mssql_py_core (from eng/scripts/install-mssql-py-core)
mssql_py_core/

# learning files
learnings/
8 changes: 8 additions & 0 deletions OneBranchPipelines/dummy-release-pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,14 @@ extends:
Write-Host "Symbols: $(if ($symbols) { $symbols.Count } else { 0 }) files"
Write-Host "====================================="

# Step 3.5: Validate mssql-py-core is a stable version (no dev/alpha/beta/rc)
- task: PowerShell@2
displayName: '[TEST] Validate mssql-py-core is a stable version'
inputs:
targetType: 'filePath'
filePath: '$(Build.SourcesDirectory)\OneBranchPipelines\scripts\validate-release-versions.ps1'
arguments: '-VersionFile "$(Build.SourcesDirectory)\artifacts\dist\mssql-py-core.version"'

# Step 4: Verify wheel integrity
- task: PowerShell@2
displayName: '[TEST] Verify Wheel Integrity'
Expand Down
10 changes: 9 additions & 1 deletion OneBranchPipelines/jobs/consolidate-artifacts-job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ jobs:
value: '$(Build.ArtifactStagingDirectory)'

steps:
- checkout: none # No source code needed for consolidation
- checkout: self
fetchDepth: 1

# Download ALL artifacts from current build
# Matrix jobs publish as: Windows_<JobId>, macOS_<JobId>, Linux_<JobId>
Expand Down Expand Up @@ -112,6 +113,13 @@ jobs:
displayName: 'Consolidate Windows symbols (optional)'
continueOnError: true

# Include mssql-py-core version file for traceability
- bash: |
set -e
cp $(Build.SourcesDirectory)/eng/versions/mssql-py-core.version $(ob_outputDirectory)/dist/
echo "mssql-py-core version: $(cat $(ob_outputDirectory)/dist/mssql-py-core.version)"
displayName: 'Include mssql-py-core version'

# Verify consolidation
- bash: |
echo "=========================================="
Expand Down
8 changes: 8 additions & 0 deletions OneBranchPipelines/official-release-pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,14 @@ extends:
Write-Host "Symbols: $(if ($symbols) { $symbols.Count } else { 0 }) files"
Write-Host "====================================="

# Step 3.5: Validate mssql-py-core is a stable version (no dev/alpha/beta/rc)
- task: PowerShell@2
displayName: 'Validate mssql-py-core is a stable version'
inputs:
targetType: 'filePath'
filePath: '$(Build.SourcesDirectory)\OneBranchPipelines\scripts\validate-release-versions.ps1'
arguments: '-VersionFile "$(Build.SourcesDirectory)\artifacts\dist\mssql-py-core.version"'

# Step 4: Verify wheel integrity
- task: PowerShell@2
displayName: 'Verify Wheel Integrity'
Expand Down
49 changes: 49 additions & 0 deletions OneBranchPipelines/scripts/validate-release-versions.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.

<#
.SYNOPSIS
Validates that a version file contains a stable (non-prerelease) version.

.DESCRIPTION
Reads a single .version file and rejects any version containing
dev, alpha, beta, or rc tags. Intended to gate official releases.

.PARAMETER VersionFile
Path to a .version file. Defaults to eng/versions/mssql-py-core.version
relative to the repository root.

.EXAMPLE
# Run from repo root (uses default path):
.\eng\scripts\validate-release-versions.ps1

# Explicit path:
.\eng\scripts\validate-release-versions.ps1 -VersionFile C:\work\mssql-python\eng\versions\mssql-py-core.version
#>

param(
[string]$VersionFile
)

$ErrorActionPreference = 'Stop'

if (-not $VersionFile) {
$repoRoot = (Resolve-Path "$PSScriptRoot\..\..").Path
$VersionFile = Join-Path $repoRoot 'eng\versions\mssql-py-core.version'
}

if (-not (Test-Path $VersionFile)) {
Write-Error "Version file not found: $VersionFile"
exit 1
}

$version = (Get-Content $VersionFile -Raw).Trim()
$name = [System.IO.Path]::GetFileNameWithoutExtension($VersionFile)

if ($version -match '(dev|alpha|beta|rc)') {
Write-Host "FAIL: $name version '$version' is a pre-release ($($Matches[1]))" -ForegroundColor Red
Write-Error "$name version is pre-release. Official releases require stable versions."
exit 1
}

Write-Host "OK: $name version '$version'" -ForegroundColor Green
15 changes: 12 additions & 3 deletions OneBranchPipelines/stages/build-linux-single-stage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,9 @@ stages:

- script: |
# Determine image based on LINUX_TAG and ARCH
# manylinux_2_28 = AlmaLinux 8 (glibc 2.28)
# Note: mssql_py_core (built in mssql-rs) requires OpenSSL 3 / glibc 2.34,
# but it is pre-built and downloaded from NuGet — not compiled here.
if [[ "$(LINUX_TAG)" == "musllinux" ]]; then
IMAGE="quay.io/pypa/musllinux_1_2_$(ARCH)"
else
Expand All @@ -126,10 +129,10 @@ stages:
set -euxo pipefail
if command -v dnf >/dev/null 2>&1; then
dnf -y update || true
dnf -y install gcc gcc-c++ make cmake unixODBC-devel krb5-libs keyutils-libs ccache || true
dnf -y install gcc gcc-c++ make cmake unixODBC-devel krb5-libs keyutils-libs ccache curl || true
elif command -v yum >/dev/null 2>&1; then
yum -y update || true
yum -y install gcc gcc-c++ make cmake unixODBC-devel krb5-libs keyutils-libs ccache || true
yum -y install gcc gcc-c++ make cmake unixODBC-devel krb5-libs keyutils-libs ccache curl || true
fi
gcc --version || true
cmake --version || true
Expand All @@ -138,7 +141,7 @@ stages:
docker exec build-$(LINUX_TAG)-$(ARCH) sh -lc '
set -euxo pipefail
apk update || true
apk add --no-cache bash build-base cmake unixodbc-dev krb5-libs keyutils-libs ccache || true
apk add --no-cache bash build-base cmake unixodbc-dev krb5-libs keyutils-libs ccache curl || true
gcc --version || true
cmake --version || true
'
Expand Down Expand Up @@ -208,6 +211,9 @@ stages:
cd /workspace/mssql_python/pybind;
bash build.sh;

# Step 3.5: Extract mssql_py_core from NuGet for this Python version
bash /workspace/eng/scripts/install-mssql-py-core.sh;

# Step 4: Build wheel
echo "Building wheel package...";
cd /workspace;
Expand Down Expand Up @@ -273,6 +279,9 @@ stages:
cd /workspace/mssql_python/pybind;
bash build.sh;

# Step 3.5: Extract mssql_py_core from NuGet for this Python version
bash /workspace/eng/scripts/install-mssql-py-core.sh;

# Step 4: Build wheel
echo "Building wheel package...";
cd /workspace;
Expand Down
10 changes: 10 additions & 0 deletions OneBranchPipelines/stages/build-macos-single-stage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,15 @@ stages:
env:
DB_PASSWORD: $(DB_PASSWORD)

# =========================
# MSSQL_PY_CORE INSTALLATION
# =========================
# Extract mssql_py_core from NuGet into repo root BEFORE testing
# Required for bulkcopy tests which use mssql_py_core native bindings
- script: |
bash $(Build.SourcesDirectory)/eng/scripts/install-mssql-py-core.sh
displayName: 'Install mssql_py_core from NuGet'

# =========================
# TESTING
# =========================
Expand All @@ -186,6 +195,7 @@ stages:
# =========================
# WHEEL BUILD
# =========================

# Build wheel package from setup.py
# Wheel filename: mssql_python-X.Y.Z-cp3XX-cp3XX-macosx_XX_X_universal2.whl
# bdist_wheel = build binary wheel distribution (contains pre-compiled .so)
Expand Down
11 changes: 11 additions & 0 deletions OneBranchPipelines/stages/build-windows-single-stage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,17 @@ stages:
displayName: 'Build PYD for $(targetArch)'
continueOnError: false

# =========================
# MSSQL_PY_CORE INSTALLATION
# =========================
# Extract mssql_py_core from NuGet into repo root BEFORE testing
# Required for bulkcopy tests which use mssql_py_core native bindings
- task: PowerShell@2
displayName: 'Install mssql_py_core from NuGet'
inputs:
targetType: 'filePath'
filePath: '$(Build.SourcesDirectory)\eng\scripts\install-mssql-py-core.ps1'

# =========================
# TESTING
# =========================
Expand Down
62 changes: 62 additions & 0 deletions eng/pipelines/pr-validation-pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,10 @@ jobs:
build.bat x64
displayName: 'Build .pyd file'

- template: steps/install-mssql-py-core.yml
parameters:
platform: windows

# Run tests for LocalDB
- script: |
python -m pytest -v --junitxml=test-results-localdb.xml --cov=. --cov-report=xml:coverage-localdb.xml --capture=tee-sys --cache-clear
Expand Down Expand Up @@ -497,6 +501,10 @@ jobs:
./build.sh
displayName: 'Build pybind bindings (.so)'

- template: steps/install-mssql-py-core.yml
parameters:
platform: unix

- script: |
echo "Build successful, running tests now"
python -m pytest -v --junitxml=test-results.xml --cov=. --cov-report=xml --capture=tee-sys --cache-clear
Expand Down Expand Up @@ -669,6 +677,12 @@ jobs:
"
displayName: 'Build pybind bindings (.so) in $(distroName) container'

- template: steps/install-mssql-py-core.yml
parameters:
platform: container
containerName: test-container-$(distroName)
venvActivate: 'source /opt/venv/bin/activate'
Copy link
Collaborator

Choose a reason for hiding this comment

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

noice, this is a good idea
we might need to start templating pr-validation further and parametrizing plat-specific commands into them


- script: |
# Uninstall ODBC Driver before running tests
docker exec test-container-$(distroName) bash -c "
Expand Down Expand Up @@ -984,6 +998,12 @@ jobs:
displayName: 'Build pybind bindings (.so) in $(distroName) ARM64 container'
retryCountOnTaskFailure: 2

- template: steps/install-mssql-py-core.yml
parameters:
platform: container
containerName: test-container-$(distroName)-$(archName)
venvActivate: 'source /opt/venv/bin/activate'

- script: |
# Uninstall ODBC Driver before running tests
docker exec test-container-$(distroName)-$(archName) bash -c "
Expand Down Expand Up @@ -1192,6 +1212,12 @@ jobs:
"
displayName: 'Build pybind bindings (.so) in RHEL 9 container'

- template: steps/install-mssql-py-core.yml
parameters:
platform: container
containerName: test-container-rhel9
venvActivate: 'source myvenv/bin/activate'

- script: |
# Uninstall ODBC Driver before running tests
docker exec test-container-rhel9 bash -c "
Expand Down Expand Up @@ -1411,6 +1437,12 @@ jobs:
displayName: 'Build pybind bindings (.so) in RHEL 9 ARM64 container'
retryCountOnTaskFailure: 2

- template: steps/install-mssql-py-core.yml
parameters:
platform: container
containerName: test-container-rhel9-arm64
venvActivate: 'source myvenv/bin/activate'

- script: |
# Uninstall ODBC Driver before running tests
docker exec test-container-rhel9-arm64 bash -c "
Expand Down Expand Up @@ -1638,6 +1670,12 @@ jobs:
"
displayName: 'Build pybind bindings (.so) in Alpine x86_64 container'

- template: steps/install-mssql-py-core.yml
parameters:
platform: container
containerName: test-container-alpine
venvActivate: 'source /workspace/venv/bin/activate'

- script: |
# Uninstall ODBC Driver before running tests to use bundled libraries
docker exec test-container-alpine bash -c "
Expand Down Expand Up @@ -1883,6 +1921,12 @@ jobs:
displayName: 'Build pybind bindings (.so) in Alpine ARM64 container'
retryCountOnTaskFailure: 2

- template: steps/install-mssql-py-core.yml
parameters:
platform: container
containerName: test-container-alpine-arm64
venvActivate: 'source /workspace/venv/bin/activate'

- script: |
# Uninstall ODBC Driver before running tests to use bundled libraries
docker exec test-container-alpine-arm64 bash -c "
Expand Down Expand Up @@ -2005,6 +2049,10 @@ jobs:
build.bat x64
displayName: 'Build .pyd file'

- template: steps/install-mssql-py-core.yml
parameters:
platform: windows

- script: |
python -m pytest -v --junitxml=test-results-azuresql.xml --cov=. --cov-report=xml:coverage-azuresql.xml --capture=tee-sys --cache-clear
displayName: 'Run tests on Azure SQL Database'
Expand Down Expand Up @@ -2047,6 +2095,10 @@ jobs:
./build.sh
displayName: 'Build pybind bindings (.so)'

- template: steps/install-mssql-py-core.yml
parameters:
platform: unix

- script: |
python -m pytest -v --junitxml=test-results-azuresql.xml --cov=. --cov-report=xml:coverage-azuresql.xml --capture=tee-sys --cache-clear
displayName: 'Run tests on Azure SQL Database'
Expand Down Expand Up @@ -2118,6 +2170,12 @@ jobs:
"
displayName: 'Build pybind bindings (.so) in Ubuntu container'

- template: steps/install-mssql-py-core.yml
parameters:
platform: container
containerName: test-container-ubuntu-azuresql
venvActivate: 'source /opt/venv/bin/activate'

- script: |
docker exec test-container-ubuntu-azuresql bash -c "
export DEBIAN_FRONTEND=noninteractive
Expand Down Expand Up @@ -2212,6 +2270,10 @@ jobs:
./build.sh codecov
displayName: 'Build pybind bindings with coverage'

- template: steps/install-mssql-py-core.yml
parameters:
platform: unix

- script: |
# Generate unified coverage (Python + C++)
chmod +x ./generate_codecov.sh
Expand Down
Loading
Loading