From c3abe74aad17a9ca5b792e1195a1855dd8a1facd Mon Sep 17 00:00:00 2001 From: gargsaumya Date: Wed, 17 Dec 2025 17:47:28 +0530 Subject: [PATCH 1/4] retain .gdn files during auto sync --- OneBranchPipelines/github-ado-sync.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/OneBranchPipelines/github-ado-sync.yml b/OneBranchPipelines/github-ado-sync.yml index fd859b0a..97d6884e 100644 --- a/OneBranchPipelines/github-ado-sync.yml +++ b/OneBranchPipelines/github-ado-sync.yml @@ -66,8 +66,8 @@ jobs: git config user.name "ADO Sync Bot" git fetch github main - git rm -rf . - git checkout github/main -- . + git rm -rf . -- :!.gdn + git checkout github/main -- . :!.gdn echo timestamp.txt >> .git\info\exclude echo branchname.txt >> .git\info\exclude git diff --cached --quiet From 563ff879c55527ce79b2ea53e673f6cf9a5a828d Mon Sep 17 00:00:00 2001 From: gargsaumya Date: Wed, 24 Dec 2025 12:36:20 +0530 Subject: [PATCH 2/4] sql server 2025 in pr validation --- OneBranchPipelines/github-ado-sync.yml | 4 +- eng/pipelines/pr-validation-pipeline.yml | 106 +++++++++++++++++++++-- 2 files changed, 99 insertions(+), 11 deletions(-) diff --git a/OneBranchPipelines/github-ado-sync.yml b/OneBranchPipelines/github-ado-sync.yml index 97d6884e..fd859b0a 100644 --- a/OneBranchPipelines/github-ado-sync.yml +++ b/OneBranchPipelines/github-ado-sync.yml @@ -66,8 +66,8 @@ jobs: git config user.name "ADO Sync Bot" git fetch github main - git rm -rf . -- :!.gdn - git checkout github/main -- . :!.gdn + git rm -rf . + git checkout github/main -- . echo timestamp.txt >> .git\info\exclude echo branchname.txt >> .git\info\exclude git diff --cached --quiet diff --git a/eng/pipelines/pr-validation-pipeline.yml b/eng/pipelines/pr-validation-pipeline.yml index 5912b696..d0ae8c25 100644 --- a/eng/pipelines/pr-validation-pipeline.yml +++ b/eng/pipelines/pr-validation-pipeline.yml @@ -52,12 +52,12 @@ jobs: strategy: matrix: - LocalDB: - sqlVersion: 'LocalDB' - pythonVersion: '3.13' SQLServer2022: sqlVersion: 'SQL2022' pythonVersion: '3.13' + SQLServer2025: + sqlVersion: 'SQL2025' + pythonVersion: '3.14' LocalDB_Python314: sqlVersion: 'LocalDB' pythonVersion: '3.14' @@ -159,6 +159,72 @@ jobs: env: DB_PASSWORD: $(DB_PASSWORD) + # Install SQL Server 2025 (for SQL2025 matrix) + - powershell: | + Write-Host "Downloading SQL Server 2025 Express..." + # Download SQL Server 2025 Express installer + $ProgressPreference = 'SilentlyContinue' + Invoke-WebRequest -Uri "https://go.microsoft.com/fwlink/p/?linkid=2301116" -OutFile "SQL2025-SSEI-Expr.exe" + + Write-Host "Installing SQL Server 2025 Express..." + # Install SQL Server 2025 Express with basic features + Start-Process -FilePath "SQL2025-SSEI-Expr.exe" -ArgumentList "/Action=Download","/MediaPath=$env:TEMP","/MediaType=Core","/Quiet" -Wait + + # Find the downloaded setup file + $setupFile = Get-ChildItem -Path $env:TEMP -Filter "SQLEXPR_x64_ENU.exe" -Recurse | Select-Object -First 1 + + if ($setupFile) { + Write-Host "Extracting SQL Server setup files..." + Start-Process -FilePath $setupFile.FullName -ArgumentList "/x:$env:TEMP\SQLSetup","/u" -Wait + + Write-Host "Running SQL Server setup..." + Start-Process -FilePath "$env:TEMP\SQLSetup\setup.exe" -ArgumentList "/Q","/ACTION=Install","/FEATURES=SQLEngine","/INSTANCENAME=MSSQLSERVER","/SQLSVCACCOUNT=`"NT AUTHORITY\SYSTEM`"","/SQLSYSADMINACCOUNTS=`"BUILTIN\Administrators`"","/TCPENABLED=1","/SECURITYMODE=SQL","/SAPWD=$(DB_PASSWORD)","/IACCEPTSQLSERVERLICENSETERMS" -Wait + } else { + Write-Error "Failed to download SQL Server setup file" + exit 1 + } + + Write-Host "SQL Server 2025 installation completed" + displayName: 'Install SQL Server 2025 Express' + condition: eq(variables['sqlVersion'], 'SQL2025') + env: + DB_PASSWORD: $(DB_PASSWORD) + + # Create database for SQL Server 2025 + - powershell: | + # Wait for SQL Server to start + $maxAttempts = 30 + $attempt = 0 + $connected = $false + + 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 + $connected = $true + Write-Host "SQL Server is ready!" + } catch { + $attempt++ + Write-Host "Waiting... ($attempt/$maxAttempts)" + Start-Sleep -Seconds 2 + } + } + + if (-not $connected) { + Write-Error "Failed to connect to SQL Server after $maxAttempts attempts" + exit 1 + } + + # 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 + sqlcmd -S "localhost" -U "sa" -P "$(DB_PASSWORD)" -d TestDB -Q "ALTER ROLE db_owner ADD MEMBER testuser" -C + displayName: 'Setup database and user for SQL Server 2025' + condition: eq(variables['sqlVersion'], 'SQL2025') + env: + DB_PASSWORD: $(DB_PASSWORD) + - script: | cd mssql_python\pybind build.bat x64 @@ -180,6 +246,14 @@ jobs: env: DB_CONNECTION_STRING: 'Server=localhost;Database=TestDB;Uid=testuser;Pwd=$(DB_PASSWORD);TrustServerCertificate=yes' + # Run tests for SQL Server 2025 + - script: | + python -m pytest -v --junitxml=test-results-sql2025.xml --cov=. --cov-report=xml:coverage-sql2025.xml --capture=tee-sys --cache-clear + 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' + # Download and restore AdventureWorks2022 database for benchmarking - powershell: | Write-Host "Downloading AdventureWorks2022.bak..." @@ -214,7 +288,7 @@ jobs: exit 1 } displayName: 'Download and restore AdventureWorks2022 database' - condition: eq(variables['sqlVersion'], 'SQL2022') + condition: or(eq(variables['sqlVersion'], 'SQL2022'), eq(variables['sqlVersion'], 'SQL2025')) env: DB_PASSWORD: $(DB_PASSWORD) @@ -306,8 +380,8 @@ jobs: Write-Host "`nRunning performance benchmarks..." python benchmarks/perf-benchmarking.py - displayName: 'Run performance benchmarks on SQL Server 2022' - condition: eq(variables['sqlVersion'], 'SQL2022') + displayName: 'Run performance benchmarks on SQL Server 2022/2025' + condition: or(eq(variables['sqlVersion'], 'SQL2022'), eq(variables['sqlVersion'], 'SQL2025')) continueOnError: true env: DB_CONNECTION_STRING: 'Server=localhost;Database=AdventureWorks2022;Uid=sa;Pwd=$(DB_PASSWORD);TrustServerCertificate=yes' @@ -350,6 +424,15 @@ jobs: pool: vmImage: 'macos-latest' + strategy: + matrix: + SQL2022: + sqlServerImage: 'mcr.microsoft.com/mssql/server:2022-latest' + sqlVersion: 'SQL2022' + SQL2025: + sqlServerImage: 'mcr.microsoft.com/mssql/server:2025-latest' + sqlVersion: 'SQL2025' + steps: - task: UsePythonVersion@0 inputs: @@ -382,13 +465,13 @@ jobs: - script: | # Pull and run SQL Server container - docker pull mcr.microsoft.com/mssql/server:2022-latest + docker pull $(sqlServerImage) docker run \ --name sqlserver \ -e ACCEPT_EULA=Y \ -e MSSQL_SA_PASSWORD="${DB_PASSWORD}" \ -p 1433:1433 \ - -d mcr.microsoft.com/mssql/server:2022-latest + -d $(sqlServerImage) # Starting SQL Server container… for i in {1..30}; do @@ -426,7 +509,7 @@ jobs: condition: succeededOrFailed() inputs: testResultsFiles: '**/test-results.xml' - testRunTitle: 'Publish pytest results on macOS' + testRunTitle: 'Publish pytest results on macOS $(sqlVersion)' - job: PytestOnLinux displayName: 'Linux x86_64' @@ -456,6 +539,11 @@ jobs: distroName: 'Debian' sqlServerImage: 'mcr.microsoft.com/mssql/server:2022-latest' useAzureSQL: 'false' + Debian_SQL2025: + dockerImage: 'debian:12' + distroName: 'Debian-SQL2025' + sqlServerImage: 'mcr.microsoft.com/mssql/server:2025-latest' + useAzureSQL: 'false' steps: - script: | From 287e1d695da092e4abd23e1c05960d8e48a9e079 Mon Sep 17 00:00:00 2001 From: gargsaumya Date: Wed, 24 Dec 2025 13:10:58 +0530 Subject: [PATCH 3/4] fix windows sql2025 link --- eng/pipelines/pr-validation-pipeline.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eng/pipelines/pr-validation-pipeline.yml b/eng/pipelines/pr-validation-pipeline.yml index d0ae8c25..ce2fab66 100644 --- a/eng/pipelines/pr-validation-pipeline.yml +++ b/eng/pipelines/pr-validation-pipeline.yml @@ -175,10 +175,10 @@ jobs: if ($setupFile) { Write-Host "Extracting SQL Server setup files..." - Start-Process -FilePath $setupFile.FullName -ArgumentList "/x:$env:TEMP\SQLSetup","/u" -Wait + Start-Process -FilePath $setupFile.FullName -ArgumentList "/x:$env:TEMP\SQL2025Setup","/u" -Wait Write-Host "Running SQL Server setup..." - Start-Process -FilePath "$env:TEMP\SQLSetup\setup.exe" -ArgumentList "/Q","/ACTION=Install","/FEATURES=SQLEngine","/INSTANCENAME=MSSQLSERVER","/SQLSVCACCOUNT=`"NT AUTHORITY\SYSTEM`"","/SQLSYSADMINACCOUNTS=`"BUILTIN\Administrators`"","/TCPENABLED=1","/SECURITYMODE=SQL","/SAPWD=$(DB_PASSWORD)","/IACCEPTSQLSERVERLICENSETERMS" -Wait + Start-Process -FilePath "$env:TEMP\SQL2025Setup\setup.exe" -ArgumentList "/Q","/ACTION=Install","/FEATURES=SQLEngine","/INSTANCENAME=MSSQLSERVER","/SQLSVCACCOUNT=`"NT AUTHORITY\SYSTEM`"","/SQLSYSADMINACCOUNTS=`"BUILTIN\Administrators`"","/TCPENABLED=1","/SECURITYMODE=SQL","/SAPWD=$(DB_PASSWORD)","/IACCEPTSQLSERVERLICENSETERMS" -Wait } else { Write-Error "Failed to download SQL Server setup file" exit 1 From 97963cc6072a89bb691340e60581435892c459fc Mon Sep 17 00:00:00 2001 From: gargsaumya Date: Wed, 24 Dec 2025 14:26:52 +0530 Subject: [PATCH 4/4] fix sownload links --- eng/pipelines/pr-validation-pipeline.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eng/pipelines/pr-validation-pipeline.yml b/eng/pipelines/pr-validation-pipeline.yml index ce2fab66..ebdda36f 100644 --- a/eng/pipelines/pr-validation-pipeline.yml +++ b/eng/pipelines/pr-validation-pipeline.yml @@ -98,7 +98,7 @@ jobs: Write-Host "Downloading SQL Server 2022 Express..." # Download SQL Server 2022 Express installer $ProgressPreference = 'SilentlyContinue' - Invoke-WebRequest -Uri "https://go.microsoft.com/fwlink/p/?linkid=2216019" -OutFile "SQL2022-SSEI-Expr.exe" + Invoke-WebRequest -Uri "https://download.microsoft.com/download/5/1/4/5145fe04-4d30-4b85-b0d1-39533663a2f1/SQL2022-SSEI-Expr.exe" -OutFile "SQL2022-SSEI-Expr.exe" Write-Host "Installing SQL Server 2022 Express..." # Install SQL Server 2022 Express with basic features @@ -164,7 +164,7 @@ jobs: Write-Host "Downloading SQL Server 2025 Express..." # Download SQL Server 2025 Express installer $ProgressPreference = 'SilentlyContinue' - Invoke-WebRequest -Uri "https://go.microsoft.com/fwlink/p/?linkid=2301116" -OutFile "SQL2025-SSEI-Expr.exe" + Invoke-WebRequest -Uri "https://go.microsoft.com/fwlink/p/?linkid=2216019&clcid=0x409&culture=en-us&country=us" -OutFile "SQL2025-SSEI-Expr.exe" Write-Host "Installing SQL Server 2025 Express..." # Install SQL Server 2025 Express with basic features