Skip to content

Conversation

@gargsaumya
Copy link
Contributor

@gargsaumya gargsaumya commented Dec 24, 2025

Work Item / Issue Reference

AB#40316

GitHub Issue: #<ISSUE_NUMBER>


Summary

This pull request adds support for testing against SQL Server 2025 across Windows, macOS, and Linux CI pipelines. It introduces new matrix configurations, installation steps, and test/benchmark execution for SQL Server 2025, ensuring the project is validated on the upcoming SQL Server release as well as existing versions.

CI Pipeline Enhancements for SQL Server 2025:

Windows pipeline updates:

  • Added a new matrix entry for SQLServer2025 with Python 3.14 to the Windows pipeline, alongside the installation and setup scripts for SQL Server 2025 Express, including database and user creation steps. [1] [2]
  • Configured test execution and code coverage collection for SQL Server 2025, mirroring existing steps for SQL Server 2022.
  • Updated AdventureWorks2022 database restore and performance benchmarking steps to also run for SQL Server 2025. [1] [2]

macOS and Linux pipeline updates:

  • Added matrix entries and logic to run tests against SQL Server 2025 Docker images on both macOS and Linux, in addition to SQL Server 2022. [1] [2]
  • Updated Docker commands to use the matrix-provided SQL Server image, supporting both 2022 and 2025 images.

General improvements:

  • Enhanced test result publishing to include the SQL Server version in the run title for better traceability.

Other minor changes:

  • Updated the git rm and git checkout commands in the ADO sync pipeline to exclude the .gdn directory from removal and checkout, preventing accidental deletion of required files.

Copilot AI review requested due to automatic review settings December 24, 2025 07:24
@github-actions github-actions bot added the pr-size: medium Moderate update size label Dec 24, 2025
Write-Host "Waiting for SQL Server 2025 to start..."
while (-not $connected -and $attempt -lt $maxAttempts) {
try {
sqlcmd -S "localhost" -U "sa" -P "$(DB_PASSWORD)" -Q "SELECT 1" -C

Check notice

Code scanning / devskim

Accessing localhost could indicate debug code, or could hinder scaling. Note

Do not leave debug code in production
}
# Create database and user
sqlcmd -S "localhost" -U "sa" -P "$(DB_PASSWORD)" -Q "CREATE DATABASE TestDB" -C

Check notice

Code scanning / devskim

Accessing localhost could indicate debug code, or could hinder scaling. Note

Do not leave debug code in production
# Create database and user
sqlcmd -S "localhost" -U "sa" -P "$(DB_PASSWORD)" -Q "CREATE DATABASE TestDB" -C
sqlcmd -S "localhost" -U "sa" -P "$(DB_PASSWORD)" -Q "CREATE LOGIN testuser WITH PASSWORD = '$(DB_PASSWORD)'" -C

Check notice

Code scanning / devskim

Accessing localhost could indicate debug code, or could hinder scaling. Note

Do not leave debug code in production
# Create database and user
sqlcmd -S "localhost" -U "sa" -P "$(DB_PASSWORD)" -Q "CREATE DATABASE TestDB" -C
sqlcmd -S "localhost" -U "sa" -P "$(DB_PASSWORD)" -Q "CREATE LOGIN testuser WITH PASSWORD = '$(DB_PASSWORD)'" -C
sqlcmd -S "localhost" -U "sa" -P "$(DB_PASSWORD)" -d TestDB -Q "CREATE USER testuser FOR LOGIN testuser" -C

Check notice

Code scanning / devskim

Accessing localhost could indicate debug code, or could hinder scaling. Note

Do not leave debug code in production
sqlcmd -S "localhost" -U "sa" -P "$(DB_PASSWORD)" -Q "CREATE DATABASE TestDB" -C
sqlcmd -S "localhost" -U "sa" -P "$(DB_PASSWORD)" -Q "CREATE LOGIN testuser WITH PASSWORD = '$(DB_PASSWORD)'" -C
sqlcmd -S "localhost" -U "sa" -P "$(DB_PASSWORD)" -d TestDB -Q "CREATE USER testuser FOR LOGIN testuser" -C
sqlcmd -S "localhost" -U "sa" -P "$(DB_PASSWORD)" -d TestDB -Q "ALTER ROLE db_owner ADD MEMBER testuser" -C

Check notice

Code scanning / devskim

Accessing localhost could indicate debug code, or could hinder scaling. Note

Do not leave debug code in production
displayName: 'Run tests with coverage on SQL Server 2025'
condition: eq(variables['sqlVersion'], 'SQL2025')
env:
DB_CONNECTION_STRING: 'Server=localhost;Database=TestDB;Uid=testuser;Pwd=$(DB_PASSWORD);TrustServerCertificate=yes'

Check notice

Code scanning / devskim

Accessing localhost could indicate debug code, or could hinder scaling. Note

Do not leave debug code in production
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This pull request adds support for testing against SQL Server 2025 across Windows, macOS, and Linux CI pipelines. The changes introduce new matrix configurations and installation steps for SQL Server 2025, extending test coverage to the upcoming SQL Server release.

Key Changes:

  • Added SQL Server 2025 matrix entries across all three platforms (Windows, macOS, Linux) using Python 3.14
  • Implemented SQL Server 2025 Express installation and setup steps for Windows pipeline
  • Extended AdventureWorks2022 database restore and performance benchmarking to run on SQL Server 2025
  • Modified macOS and Linux pipelines to pull and test against SQL Server 2025 Docker images
Comments suppressed due to low confidence (1)

eng/pipelines/pr-validation-pipeline.yml:71

  • Python 3.14 may not be available through the UsePythonVersion@0 task without additional configuration. The build pipeline in OneBranchPipelines/stages/build-windows-single-stage.yml shows that Python 3.14 requires special handling with NuGet downloads (lines 64-107) because "Microsoft hasn't added Python 3.14 to the standard Python registry yet". This PR validation pipeline uses UsePythonVersion@0 with a githubToken parameter at line 70, but doesn't include the special installation steps needed for Python 3.14. This will likely cause the pipeline to fail when trying to use Python 3.14.
      SQLServer2025:
        sqlVersion: 'SQL2025'
        pythonVersion: '3.14'
      LocalDB_Python314:
        sqlVersion: 'LocalDB'
        pythonVersion: '3.14'

  steps:
  - task: UsePythonVersion@0
    inputs:
      versionSpec: '$(pythonVersion)'
      addToPath: true
      githubToken: $(GITHUB_TOKEN)
    displayName: 'Use Python $(pythonVersion)'

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@github-actions
Copy link

github-actions bot commented Dec 24, 2025

📊 Code Coverage Report

🔥 Diff Coverage

100%


🎯 Overall Coverage

76%


📈 Total Lines Covered: 5357 out of 7037
📁 Project: mssql-python


Diff Coverage

Diff: main...HEAD, staged and unstaged changes

No lines with coverage information in this diff.


📋 Files Needing Attention

📉 Files with overall lowest coverage (click to expand)
mssql_python.pybind.logger_bridge.hpp: 58.8%
mssql_python.pybind.logger_bridge.cpp: 59.2%
mssql_python.row.py: 66.2%
mssql_python.helpers.py: 67.5%
mssql_python.pybind.ddbc_bindings.cpp: 69.3%
mssql_python.pybind.ddbc_bindings.h: 71.7%
mssql_python.pybind.connection.connection.cpp: 73.6%
mssql_python.ddbc_bindings.py: 79.6%
mssql_python.pybind.connection.connection_pool.cpp: 79.6%
mssql_python.connection.py: 83.9%

🔗 Quick Links

⚙️ Build Summary 📋 Coverage Details

View Azure DevOps Build

Browse Full Coverage Report

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-size: medium Moderate update size

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants