Skip to content

Commit d5bc7d3

Browse files
committed
Merge remote-tracking branch 'origin/main' into saumya/stress-tests-gh
2 parents 1088f4d + 69d4757 commit d5bc7d3

28 files changed

Lines changed: 1622 additions & 78 deletions

.github/workflows/issue-acknowledge.yml

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ jobs:
1111
acknowledge:
1212
runs-on: ubuntu-latest
1313
permissions:
14-
issues: read
14+
issues: write
1515
steps:
1616
# Step 1: Wait 15 minutes
1717
- name: Wait 15 minutes
18-
run: sleep 10
18+
run: sleep 900
1919

2020
# Step 2: Check if a maintainer already responded
2121
- name: Check for existing maintainer response
@@ -24,7 +24,7 @@ jobs:
2424
with:
2525
github-token: ${{ secrets.GITHUB_TOKEN }}
2626
script: |
27-
const maintainers = ['sumitmsft','dlevy-msft-sql'];
27+
const maintainers = ['sumitmsft','dlevy-msft-sql','gargsaumya','bewithgaurav','subrata-ms','jahnvi480','saurabh500'];
2828
2929
const comments = await github.rest.issues.listComments({
3030
owner: context.repo.owner,
@@ -44,11 +44,25 @@ jobs:
4444
if: steps.check.outputs.skip == 'false'
4545
uses: actions/github-script@v7
4646
with:
47-
github-token: ${{ secrets.SUMIT_PAT_FOR_AUTO_RESPONSE }}
47+
github-token: ${{ secrets.GITHUB_TOKEN }}
4848
script: |
4949
await github.rest.issues.createComment({
5050
owner: context.repo.owner,
5151
repo: context.repo.repo,
5252
issue_number: context.payload.issue.number,
53-
body: `Hi @${context.payload.issue.user.login}, thank you for opening this issue!\n\nOur team will review it shortly. We aim to triage all new issues within 24-48 hours and get back to you.\n\nThank you for your patience!`
53+
body: `Hi @${context.payload.issue.user.login}, thank you for opening this issue!\n\nOur team will review it shortly. We aim to triage all new issues within 24-48 hours and get back to you.\n\nIf you have additional information to share, please feel free to update the issue.\n\nThank you for your patience!`
54+
});
55+
56+
# Step 4: Add "triage needed" label if no maintainer has responded
57+
- name: Add triage needed label
58+
if: steps.check.outputs.skip == 'false'
59+
uses: actions/github-script@v7
60+
with:
61+
github-token: ${{ secrets.GITHUB_TOKEN }}
62+
script: |
63+
await github.rest.issues.addLabels({
64+
owner: context.repo.owner,
65+
repo: context.repo.repo,
66+
issue_number: context.payload.issue.number,
67+
labels: ['triage needed']
5468
});

.github/workflows/pr-code-coverage.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -426,8 +426,8 @@ jobs:
426426
--arg covered_lines "${{ env.COVERED_LINES }}" \
427427
--arg total_lines "${{ env.TOTAL_LINES }}" \
428428
--arg patch_coverage_pct "${{ env.PATCH_COVERAGE_PCT }}" \
429-
--arg low_coverage_files "${{ env.LOW_COVERAGE_FILES }}" \
430-
--arg patch_coverage_summary "${{ env.PATCH_COVERAGE_SUMMARY }}" \
429+
--arg low_coverage_files "$LOW_COVERAGE_FILES" \
430+
--arg patch_coverage_summary "$PATCH_COVERAGE_SUMMARY" \
431431
--arg ado_url "${{ env.ADO_URL }}" \
432432
'{
433433
pr_number: $pr_number,

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,5 +61,8 @@ build/
6161
*venv*/
6262
**/*venv*/
6363

64+
# Extracted mssql_py_core (from eng/scripts/install-mssql-py-core)
65+
mssql_py_core/
66+
6467
# learning files
6568
learnings/

OneBranchPipelines/dummy-release-pipeline.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,14 @@ extends:
174174
Write-Host "Symbols: $(if ($symbols) { $symbols.Count } else { 0 }) files"
175175
Write-Host "====================================="
176176
177+
# Step 3.5: Validate mssql-py-core is a stable version (no dev/alpha/beta/rc)
178+
- task: PowerShell@2
179+
displayName: '[TEST] Validate mssql-py-core is a stable version'
180+
inputs:
181+
targetType: 'filePath'
182+
filePath: '$(Build.SourcesDirectory)\OneBranchPipelines\scripts\validate-release-versions.ps1'
183+
arguments: '-VersionFile "$(Build.SourcesDirectory)\artifacts\dist\mssql-py-core.version"'
184+
177185
# Step 4: Verify wheel integrity
178186
- task: PowerShell@2
179187
displayName: '[TEST] Verify Wheel Integrity'

OneBranchPipelines/jobs/consolidate-artifacts-job.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@ jobs:
2626
value: '$(Build.ArtifactStagingDirectory)'
2727

2828
steps:
29-
- checkout: none # No source code needed for consolidation
29+
- checkout: self
30+
fetchDepth: 1
3031

3132
# Download ALL artifacts from current build
3233
# Matrix jobs publish as: Windows_<JobId>, macOS_<JobId>, Linux_<JobId>
@@ -112,6 +113,13 @@ jobs:
112113
displayName: 'Consolidate Windows symbols (optional)'
113114
continueOnError: true
114115
116+
# Include mssql-py-core version file for traceability
117+
- bash: |
118+
set -e
119+
cp $(Build.SourcesDirectory)/eng/versions/mssql-py-core.version $(ob_outputDirectory)/dist/
120+
echo "mssql-py-core version: $(cat $(ob_outputDirectory)/dist/mssql-py-core.version)"
121+
displayName: 'Include mssql-py-core version'
122+
115123
# Verify consolidation
116124
- bash: |
117125
echo "=========================================="

OneBranchPipelines/official-release-pipeline.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,14 @@ extends:
177177
Write-Host "Symbols: $(if ($symbols) { $symbols.Count } else { 0 }) files"
178178
Write-Host "====================================="
179179
180+
# Step 3.5: Validate mssql-py-core is a stable version (no dev/alpha/beta/rc)
181+
- task: PowerShell@2
182+
displayName: 'Validate mssql-py-core is a stable version'
183+
inputs:
184+
targetType: 'filePath'
185+
filePath: '$(Build.SourcesDirectory)\OneBranchPipelines\scripts\validate-release-versions.ps1'
186+
arguments: '-VersionFile "$(Build.SourcesDirectory)\artifacts\dist\mssql-py-core.version"'
187+
180188
# Step 4: Verify wheel integrity
181189
- task: PowerShell@2
182190
displayName: 'Verify Wheel Integrity'
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# Copyright (c) Microsoft Corporation.
2+
# Licensed under the MIT License.
3+
4+
<#
5+
.SYNOPSIS
6+
Validates that a version file contains a stable (non-prerelease) version.
7+
8+
.DESCRIPTION
9+
Reads a single .version file and rejects any version containing
10+
dev, alpha, beta, or rc tags. Intended to gate official releases.
11+
12+
.PARAMETER VersionFile
13+
Path to a .version file. Defaults to eng/versions/mssql-py-core.version
14+
relative to the repository root.
15+
16+
.EXAMPLE
17+
# Run from repo root (uses default path):
18+
.\eng\scripts\validate-release-versions.ps1
19+
20+
# Explicit path:
21+
.\eng\scripts\validate-release-versions.ps1 -VersionFile C:\work\mssql-python\eng\versions\mssql-py-core.version
22+
#>
23+
24+
param(
25+
[string]$VersionFile
26+
)
27+
28+
$ErrorActionPreference = 'Stop'
29+
30+
if (-not $VersionFile) {
31+
$repoRoot = (Resolve-Path "$PSScriptRoot\..\..").Path
32+
$VersionFile = Join-Path $repoRoot 'eng\versions\mssql-py-core.version'
33+
}
34+
35+
if (-not (Test-Path $VersionFile)) {
36+
Write-Error "Version file not found: $VersionFile"
37+
exit 1
38+
}
39+
40+
$version = (Get-Content $VersionFile -Raw).Trim()
41+
$name = [System.IO.Path]::GetFileNameWithoutExtension($VersionFile)
42+
43+
if ($version -match '(dev|alpha|beta|rc)') {
44+
Write-Host "FAIL: $name version '$version' is a pre-release ($($Matches[1]))" -ForegroundColor Red
45+
Write-Error "$name version is pre-release. Official releases require stable versions."
46+
exit 1
47+
}
48+
49+
Write-Host "OK: $name version '$version'" -ForegroundColor Green

OneBranchPipelines/stages/build-linux-single-stage.yml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,9 @@ stages:
104104
105105
- script: |
106106
# Determine image based on LINUX_TAG and ARCH
107+
# manylinux_2_28 = AlmaLinux 8 (glibc 2.28)
108+
# Note: mssql_py_core (built in mssql-rs) requires OpenSSL 3 / glibc 2.34,
109+
# but it is pre-built and downloaded from NuGet — not compiled here.
107110
if [[ "$(LINUX_TAG)" == "musllinux" ]]; then
108111
IMAGE="quay.io/pypa/musllinux_1_2_$(ARCH)"
109112
else
@@ -126,10 +129,10 @@ stages:
126129
set -euxo pipefail
127130
if command -v dnf >/dev/null 2>&1; then
128131
dnf -y update || true
129-
dnf -y install gcc gcc-c++ make cmake unixODBC-devel krb5-libs keyutils-libs ccache || true
132+
dnf -y install gcc gcc-c++ make cmake unixODBC-devel krb5-libs keyutils-libs ccache curl || true
130133
elif command -v yum >/dev/null 2>&1; then
131134
yum -y update || true
132-
yum -y install gcc gcc-c++ make cmake unixODBC-devel krb5-libs keyutils-libs ccache || true
135+
yum -y install gcc gcc-c++ make cmake unixODBC-devel krb5-libs keyutils-libs ccache curl || true
133136
fi
134137
gcc --version || true
135138
cmake --version || true
@@ -138,7 +141,7 @@ stages:
138141
docker exec build-$(LINUX_TAG)-$(ARCH) sh -lc '
139142
set -euxo pipefail
140143
apk update || true
141-
apk add --no-cache bash build-base cmake unixodbc-dev krb5-libs keyutils-libs ccache || true
144+
apk add --no-cache bash build-base cmake unixodbc-dev krb5-libs keyutils-libs ccache curl || true
142145
gcc --version || true
143146
cmake --version || true
144147
'
@@ -208,6 +211,9 @@ stages:
208211
cd /workspace/mssql_python/pybind;
209212
bash build.sh;
210213
214+
# Step 3.5: Extract mssql_py_core from NuGet for this Python version
215+
bash /workspace/eng/scripts/install-mssql-py-core.sh;
216+
211217
# Step 4: Build wheel
212218
echo "Building wheel package...";
213219
cd /workspace;
@@ -273,6 +279,9 @@ stages:
273279
cd /workspace/mssql_python/pybind;
274280
bash build.sh;
275281
282+
# Step 3.5: Extract mssql_py_core from NuGet for this Python version
283+
bash /workspace/eng/scripts/install-mssql-py-core.sh;
284+
276285
# Step 4: Build wheel
277286
echo "Building wheel package...";
278287
cd /workspace;

OneBranchPipelines/stages/build-macos-single-stage.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,15 @@ stages:
169169
env:
170170
DB_PASSWORD: $(DB_PASSWORD)
171171
172+
# =========================
173+
# MSSQL_PY_CORE INSTALLATION
174+
# =========================
175+
# Extract mssql_py_core from NuGet into repo root BEFORE testing
176+
# Required for bulkcopy tests which use mssql_py_core native bindings
177+
- script: |
178+
bash $(Build.SourcesDirectory)/eng/scripts/install-mssql-py-core.sh
179+
displayName: 'Install mssql_py_core from NuGet'
180+
172181
# =========================
173182
# TESTING
174183
# =========================
@@ -186,6 +195,7 @@ stages:
186195
# =========================
187196
# WHEEL BUILD
188197
# =========================
198+
189199
# Build wheel package from setup.py
190200
# Wheel filename: mssql_python-X.Y.Z-cp3XX-cp3XX-macosx_XX_X_universal2.whl
191201
# bdist_wheel = build binary wheel distribution (contains pre-compiled .so)

OneBranchPipelines/stages/build-windows-single-stage.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,17 @@ stages:
238238
displayName: 'Build PYD for $(targetArch)'
239239
continueOnError: false
240240
241+
# =========================
242+
# MSSQL_PY_CORE INSTALLATION
243+
# =========================
244+
# Extract mssql_py_core from NuGet into repo root BEFORE testing
245+
# Required for bulkcopy tests which use mssql_py_core native bindings
246+
- task: PowerShell@2
247+
displayName: 'Install mssql_py_core from NuGet'
248+
inputs:
249+
targetType: 'filePath'
250+
filePath: '$(Build.SourcesDirectory)\eng\scripts\install-mssql-py-core.ps1'
251+
241252
# =========================
242253
# TESTING
243254
# =========================

0 commit comments

Comments
 (0)