Skip to content

Commit 6cfdb56

Browse files
Merge branch 'main' into sdkauto/azure-mgmt-relationships-6693387
2 parents a3e368e + c0df756 commit 6cfdb56

20 files changed

Lines changed: 161 additions & 34 deletions

File tree

.github/skills/azsdk-common-pipeline-analysis/SKILL.md

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ license: MIT
44
metadata:
55
version: "1.0.0"
66
distribution: shared
7-
description: 'Analyze Azure SDK CI/CD pipeline failures into a structured diagnosis, and define the required output format. Load this skill before calling azsdk_analyze_pipeline, which returns raw failure data that this skill interprets and formats. USE FOR: "pipeline failed", "build failure", "CI check failing", "tests failing in CI", "analyze pipeline", "debug SDK pipeline". DO NOT USE FOR: local build issues without pipeline context, API design review, SDK publishing, applying code fixes (instead use azsdk-common-pipeline-fixer). INVOKES: azure-sdk-mcp:azsdk_analyze_pipeline, azure-sdk-mcp:azsdk_get_pipeline_llm_artifacts, azure-sdk-mcp:azsdk_get_pr_checks, azure-sdk-mcp:azsdk_get_pipeline_status.'
7+
description: 'Analyze Azure SDK CI/CD pipeline failures into a structured diagnosis, and define the required output format. Load this skill before calling azsdk_analyze_pipeline, which returns raw failure data that this skill interprets and formats. USE FOR: "pipeline failed", "build failure", "CI check failing", "tests failing in CI", "analyze pipeline", "debug SDK pipeline". DO NOT USE FOR: local build issues without pipeline context, API design review, SDK publishing, applying code fixes (instead use azsdk-common-pipeline-fixer). INVOKES: azure-sdk-mcp:azsdk_analyze_pipeline, azure-sdk-mcp:azsdk_get_pipeline_llm_artifacts, azure-sdk-mcp:azsdk_get_failed_test_run_data, azure-sdk-mcp:azsdk_get_failed_test_case_data, azure-sdk-mcp:azsdk_get_pr_checks, azure-sdk-mcp:azsdk_get_pipeline_status.'
88
compatibility: "azure-sdk-mcp server, Azure DevOps pipeline build ID or GitHub PR link"
99
---
1010

@@ -22,20 +22,24 @@ This skill analyzes Azure SDK CI/CD pipeline failures and provides a structured
2222

2323
## MCP Tools
2424

25-
| Tool | Purpose |
26-
| ------------------------------------------------ | ---------------------------------------------- |
27-
| `azure-sdk-mcp:azsdk_analyze_pipeline` | Analyze pipeline failure (logs + test results) |
28-
| `azure-sdk-mcp:azsdk_get_pipeline_llm_artifacts` | Download test result artifacts from pipeline |
29-
| `azure-sdk-mcp:azsdk_get_pr_checks` | Get pipeline/check results linked to a PR |
30-
| `azure-sdk-mcp:azsdk_get_pipeline_status` | Get pipeline run status |
25+
| Tool | Purpose |
26+
| ------------------------------------------------ | --------------------------------------------------- |
27+
| `azure-sdk-mcp:azsdk_analyze_pipeline` | Analyze pipeline failure (logs + test results) |
28+
| `azure-sdk-mcp:azsdk_get_pipeline_llm_artifacts` | Download test result artifacts from pipeline |
29+
| `azure-sdk-mcp:azsdk_get_failed_test_run_data` | Full details for every failure in one artifact file |
30+
| `azure-sdk-mcp:azsdk_get_failed_test_case_data` | Full details for a single failing test in a file |
31+
| `azure-sdk-mcp:azsdk_get_pr_checks` | Get pipeline/check results linked to a PR |
32+
| `azure-sdk-mcp:azsdk_get_pipeline_status` | Get pipeline run status |
3133

3234
## Steps
3335

3436
1. **Identify** - Get the build ID, pipeline URL, or PR link (use the PR link when triggered from a PR comment).
35-
2. **Analyze** - Run `azsdk_analyze_pipeline`. It returns `failed_tasks` (log errors from failed steps) and `failed_test_titles` (failed tests grouped by file).
36-
3. **Categorize** each failure: test, build/compilation, validation/lint, or infrastructure.
37-
4. **Diagnose** - Give each failure's root cause and affected file(s)/line(s), and note if several share one root cause. See [failure patterns](references/failure-patterns.md).
38-
5. **Report** - Use the [output format](references/output-format.md): root cause, affected files, per-failure fix + verify command, and fixable vs infrastructure. Recommend `azsdk-common-pipeline-fixer` to apply fixes.
37+
2. **Analyze** - Run `azsdk_analyze_pipeline`. It returns `failed_pipeline_tasks` (log errors from failed steps) and `failed_pipeline_tests`, a lightweight index of failed tests grouped by artifact file. Each entry has `artifact_file_path`, `platform`, and `failed_test_titles` — titles only, no error text, to keep the response small.
38+
3. **Fetch failure details** - Fetch failure details lazily so you don't overload context: call `azsdk_get_failed_test_run_data` with the parameter `failedTestRunsPath` set to `artifact_file_path` once per file to get every failure in it. Or call `azsdk_get_failed_test_case_data` with
39+
`failedTestRunsPath` set to `artifact_file_path` and `testCaseTitle` set to one exact title from `failed_test_titles`. Prefer the per-file call when triaging a whole file's failures.
40+
4. **Categorize** each failure: test, build/compilation, validation/lint, or infrastructure.
41+
5. **Diagnose** - Give each failure's root cause and affected file(s)/line(s), and note if several share one root cause. See [failure patterns](references/failure-patterns.md).
42+
6. **Report** - Use the [output format](references/output-format.md): root cause, affected files, per-failure fix + verify command, and fixable vs infrastructure. Recommend `azsdk-common-pipeline-fixer` to apply fixes.
3943

4044
## Examples
4145

@@ -46,5 +50,5 @@ This skill analyzes Azure SDK CI/CD pipeline failures and provides a structured
4650
## Troubleshooting
4751

4852
- If `azsdk_analyze_pipeline` returns no data, verify the build ID is correct and the run has completed.
49-
- If `failed_test_titles` is empty, rely on `failed_tasks` log analysis (test-artifact upload may not be configured).
53+
- If `failed_pipeline_tests` is empty, rely on `failed_pipeline_tasks` log analysis (test-artifact upload may not be configured).
5054
- For a private/internal pipeline, the user may need to `az login`. See [failure patterns](references/failure-patterns.md).

eng/common/pipelines/templates/archetype-typespec-emitter.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,12 @@ extends:
303303
jobs:
304304
- job: Initialize
305305
steps:
306+
# Regeneration does not read repository history, so fetch only the
307+
# checked-out commit. git-branch-push.ps1's retry path diffs the branch
308+
# tip against its parent, which stays inside the depth-1 boundary.
306309
- checkout: self
310+
fetchDepth: 1
311+
fetchTags: false
307312

308313
- template: /eng/common/pipelines/templates/steps/login-to-github.yml
309314
parameters:
@@ -399,6 +404,8 @@ extends:
399404
emitterNpmrcPath: $(Agent.TempDirectory)/${{ parameters.EmitterPackagePath }}/.npmrc
400405
steps:
401406
- checkout: self
407+
fetchDepth: 1
408+
fetchTags: false
402409

403410
- template: /eng/common/pipelines/templates/steps/login-to-github.yml
404411
parameters:

eng/common/pipelines/templates/jobs/generate-job-matrix.yml

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,16 @@ parameters:
5353
- name: PRMatrixKey
5454
type: string
5555
default: 'ArtifactName'
56+
# Default number of PackageInfo entries assigned to each PR job.
57+
# Used when a pool-specific override is absent or its runtime variable is unset.
5658
- name: PRJobBatchSize
5759
type: number
5860
default: 10
61+
# Optional map of pool names to per-job batch-size overrides.
62+
# Values may be numbers or runtime variables populated by PreGenerationSteps.
63+
- name: PRJobBatchSizeByPool
64+
type: object
65+
default: {}
5966
- name: PRMatrixIndirectFilters
6067
type: object
6168
default: []
@@ -142,6 +149,28 @@ jobs:
142149
- pwsh: |
143150
'${{ convertToJson(parameters.MatrixConfigs) }}' | Set-Content matrix.json
144151
152+
$batchSize = ${{ parameters.PRJobBatchSize }}
153+
$overrides = '${{ convertToJson(parameters.PRJobBatchSizeByPool) }}' | ConvertFrom-Json
154+
$poolOverride = $overrides.PSObject.Properties |
155+
Where-Object { $_.Name -eq '${{ pool.name }}' } |
156+
Select-Object -First 1
157+
# An unset runtime macro remains in $(Name) form; retain the default in that case.
158+
if ($poolOverride) {
159+
$overrideValue = [string]$poolOverride.Value
160+
if (-not [string]::IsNullOrWhiteSpace($overrideValue) -and $overrideValue -notmatch '^\$\(.+\)$') {
161+
try {
162+
$batchSize = [int]$overrideValue
163+
}
164+
catch {
165+
throw "PR job batch size override for ${{ pool.name }} must be an integer, got '$overrideValue'."
166+
}
167+
Write-Host "Using batch size override for ${{ pool.name }}: $batchSize"
168+
}
169+
}
170+
if ($batchSize -le 0) {
171+
throw "PR job batch size for ${{ pool.name }} must be greater than zero."
172+
}
173+
145174
./eng/common/scripts/job-matrix/Create-PrJobMatrix.ps1 `
146175
-PackagePropertiesFolder $(Build.ArtifactStagingDirectory)/PackageInfo `
147176
-PRMatrixFile matrix.json `
@@ -151,7 +180,7 @@ jobs:
151180
-Filters '${{ join(''',''', parameters.MatrixFilters) }}', 'container=^$', 'SupportedClouds=^$|${{ parameters.CloudConfig.Cloud }}', 'Pool=${{ pool.filter }}' `
152181
-IndirectFilters '${{ join(''',''', parameters.PRMatrixIndirectFilters) }}' `
153182
-Replace '${{ join(''',''', parameters.MatrixReplace) }}' `
154-
-PackagesPerPRJob ${{ parameters.PRJobBatchSize }} `
183+
-PackagesPerPRJob $batchSize `
155184
-SparseIndirect $${{ parameters.PRMatrixSparseIndirect }}
156185
displayName: Create ${{ pool.name }} PR Matrix
157186
name: vm_job_matrix_pr_${{ pool.name }}

eng/pipelines/templates/stages/partner-release.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,5 +83,3 @@ extends:
8383
- template: /eng/pipelines/templates/steps/esrp-publish.yml
8484
parameters:
8585
targetFolder: $(Pipeline.Workspace)/esrp-release/
86-
owners: ${{ coalesce(variables['Build.RequestedForEmail'], 'azuresdk@microsoft.com') }}
87-
approvers: ${{ coalesce(variables['Build.RequestedForEmail'], 'azuresdk@microsoft.com') }}
Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,6 @@
11
parameters:
22
- name: targetFolder
33
type: string
4-
- name: owners
5-
type: string
6-
default: $(Build.RequestedForEmail)
7-
- name: approvers
8-
type: string
9-
default: $(Build.RequestedForEmail)
104
steps:
115
- task: EsrpRelease@11
126
displayName: 'Publish to ESRP'
@@ -20,7 +14,7 @@ steps:
2014
Intent: 'PackageDistribution'
2115
ContentType: 'PyPI'
2216
FolderLocation: ${{parameters.targetFolder}}
23-
Owners: ${{parameters.owners}}
24-
Approvers: ${{parameters.approvers}}
17+
Owners: ${{ coalesce(variables['Build.RequestedForEmail'], 'azuresdk@microsoft.com') }}
18+
Approvers: ${{ coalesce(variables['Build.RequestedForEmail'], 'azuresdk@microsoft.com') }}
2519
ServiceEndpointUrl: 'https://api.esrp.microsoft.com'
2620
MainPublisher: 'ESRPRELPACMANTEST'

scripts/breaking_changes_checker/detect_breaking_changes.py

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -775,6 +775,15 @@ def build_report_from_apistub(
775775
return report
776776

777777

778+
def _uninstall_package(package_name: str, pkg_dir: str) -> None:
779+
"""Remove an installed package so APIStub cannot reuse a same-version distribution."""
780+
subprocess.run(
781+
[sys.executable, "-m", "pip", "uninstall", "-y", package_name],
782+
cwd=pkg_dir,
783+
check=False,
784+
)
785+
786+
778787
def _resolve_pypi_version(package_name: str, latest_pypi_version: bool) -> str:
779788
"""Resolve the PyPI version to compare against.
780789
@@ -838,12 +847,16 @@ def main(
838847
# match "current", producing an empty changelog.
839848
if not version:
840849
version = _resolve_pypi_version(package_name, latest_pypi_version)
841-
# "current" is generated from the local source, "stable" from the
842-
# resolved PyPI version.
843-
current = build_report_from_apistub(package_name, pkg_dir, debug=debug, label="current", from_pypi=False)
850+
# APIStub installs each target into this Python environment, and pip skips
851+
# replacement when local and PyPI distributions have the same name/version.
852+
# Clear both snapshots for repeatable runs, then install local last so it
853+
# remains available to downstream SDK generation steps.
854+
_uninstall_package(package_name, pkg_dir)
844855
stable = build_report_from_apistub(
845856
package_name, pkg_dir, version=version, debug=debug, label="stable", from_pypi=True
846857
)
858+
_uninstall_package(package_name, pkg_dir)
859+
current = build_report_from_apistub(package_name, pkg_dir, debug=debug, label="current", from_pypi=False)
847860
checker = compare_report_dicts(stable, current, package_name, changelog)
848861
print(checker.report_changes())
849862
if not changelog and checker.breaking_changes:

scripts/breaking_changes_checker/tests/test_code_report_changelog.py

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -414,6 +414,19 @@ def test_compare_code_reports_for_azure_mgmt_apimanagement_apistub():
414414
)
415415

416416

417+
def test_uninstall_package_uses_active_python_environment():
418+
from breaking_changes_checker import detect_breaking_changes
419+
420+
with mock.patch.object(detect_breaking_changes.subprocess, "run") as run:
421+
detect_breaking_changes._uninstall_package("azure-mgmt-network", "/tmp/azure-mgmt-network")
422+
423+
run.assert_called_once_with(
424+
[sys.executable, "-m", "pip", "uninstall", "-y", "azure-mgmt-network"],
425+
cwd="/tmp/azure-mgmt-network",
426+
check=False,
427+
)
428+
429+
417430
def test_use_apistub_changelog_resolves_stable_from_pypi_and_current_from_local():
418431
"""``--use-apistub`` without ``-s`` must diff local source against the previous PyPI release.
419432
@@ -432,12 +445,17 @@ def test_use_apistub_changelog_resolves_stable_from_pypi_and_current_from_local(
432445
checker = mock.MagicMock()
433446
checker.report_changes.return_value = ""
434447
checker.breaking_changes = []
448+
events = mock.Mock()
435449

436450
with mock.patch("pypi_tools.pypi.PyPIClient", return_value=pypi_client) as pypi_client_cls, mock.patch.object(
451+
detect_breaking_changes, "_uninstall_package"
452+
) as uninstall_package, mock.patch.object(
437453
detect_breaking_changes, "build_report_from_apistub", return_value={}
438454
) as build_report, mock.patch.object(
439455
detect_breaking_changes, "compare_report_dicts", return_value=checker
440456
) as compare:
457+
events.attach_mock(uninstall_package, "uninstall")
458+
events.attach_mock(build_report, "build_report")
441459
detect_breaking_changes.main(
442460
package_name="azure-mgmt-network",
443461
target_module="azure.mgmt.network",
@@ -453,6 +471,25 @@ def test_use_apistub_changelog_resolves_stable_from_pypi_and_current_from_local(
453471
)
454472

455473
assert build_report.call_count == 2, "Expected separate apistub reports for current and stable"
474+
assert events.mock_calls == [
475+
mock.call.uninstall("azure-mgmt-network", "/tmp/azure-mgmt-network"),
476+
mock.call.build_report(
477+
"azure-mgmt-network",
478+
"/tmp/azure-mgmt-network",
479+
version="30.2.0",
480+
debug=False,
481+
label="stable",
482+
from_pypi=True,
483+
),
484+
mock.call.uninstall("azure-mgmt-network", "/tmp/azure-mgmt-network"),
485+
mock.call.build_report(
486+
"azure-mgmt-network",
487+
"/tmp/azure-mgmt-network",
488+
debug=False,
489+
label="current",
490+
from_pypi=False,
491+
),
492+
]
456493

457494
# The resolver must force the public PyPI backend: in CI PIP_INDEX_URL points
458495
# at the curated Azure Artifacts feed, which is not a full mirror of PyPI.

sdk/keyvault/azure-keyvault-certificates/CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
11
# Release History
22

3+
## 4.12.0b3 (Unreleased)
4+
5+
### Features Added
6+
7+
### Breaking Changes
8+
9+
### Bugs Fixed
10+
11+
### Other Changes
12+
313
## 4.12.0b2 (2026-08-12)
414

515
### Bugs Fixed

sdk/keyvault/azure-keyvault-certificates/azure/keyvault/certificates/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33
# Licensed under the MIT License.
44
# ------------------------------------
55

6-
VERSION = "4.12.0b2"
6+
VERSION = "4.12.0b3"

sdk/keyvault/azure-keyvault-secrets/CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
11
# Release History
22

3+
## 4.11.2 (Unreleased)
4+
5+
### Features Added
6+
7+
### Breaking Changes
8+
9+
### Bugs Fixed
10+
11+
### Other Changes
12+
313
## 4.11.1 (2026-08-12)
414

515
### Bugs Fixed

0 commit comments

Comments
 (0)