Skip to content

Commit 8dc3704

Browse files
committed
Merge branch 'CopySharedCode' of https://github.com/Azure/azure-sdk-for-python into CopySharedCode
2 parents 1d1558f + 444dcf8 commit 8dc3704

3,853 files changed

Lines changed: 606517 additions & 556450 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/CODEOWNERS

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
# Core
1212
# PRLabel: %Core.Http
13-
/sdk/core/corehttp/ @lmazuel @annatisch @johanste @iscai-msft @kashifkhan
13+
/sdk/core/corehttp/ @lmazuel @johanste @iscai-msft @kashifkhan
1414

1515
# AzureSdkOwners: @kashifkhan
1616
# ServiceLabel: %Core.Http
@@ -19,12 +19,12 @@
1919
# ServiceLabel: %Azure.Core
2020

2121
# PRLabel: %Azure.Core
22-
/sdk/core/ @lmazuel @annatisch @johanste
23-
/sdk/core/azure-core/ @lmazuel @annatisch @johanste @iscai-msft @kashifkhan
22+
/sdk/core/ @lmazuel @johanste
23+
/sdk/core/azure-core/ @lmazuel @johanste @iscai-msft @kashifkhan
2424
/sdk/core/azure-mgmt-core/ @msyyc
2525

2626
# Smoke Tests
27-
/common/smoketest/ @lmazuel @chlowell @annatisch @mccoyp @shurd @southpolesteve
27+
/common/smoketest/ @lmazuel @chlowell @mccoyp @shurd @southpolesteve
2828

2929
####################
3030
# Client Libraries
@@ -70,7 +70,7 @@
7070

7171
# ServiceLabel: %Batch
7272
# PRLabel: %Batch
73-
/sdk/batch/ @cRui861 @dpwatrous @jingjlii @JJJessieWang @wanghoppe @wiboris
73+
/sdk/batch/ @cRui861 @dpwatrous @jingjlii @JJJessieWang @wanghoppe @wiboris @lilinvictorms @iwang2 @xingwu1
7474

7575
# ServiceLabel: %Cognitive - Anomaly Detector
7676
# PRLabel: %Cognitive - Anomaly Detector
@@ -753,7 +753,7 @@
753753
# ServiceOwners: @amber-yujueWang @rhurey @xitzhang @pankopon @emilyjiji
754754

755755
# PRLabel: %Storage
756-
/sdk/storage/ @annatisch @jalauzon-msft @vincenttran-msft @weirongw23-msft
756+
/sdk/storage/ @jalauzon-msft @vincenttran-msft @weirongw23-msft
757757

758758
# ServiceLabel: %Storage
759759
# ServiceOwners: @jalauzon-msft @vincenttran-msft

.github/skills/azsdk-common-generate-sdk-locally/SKILL.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ license: MIT
44
metadata:
55
version: "1.1.0"
66
distribution: shared
7-
description: "Generate, build, and test Azure SDKs locally from TypeSpec with automatic customization. WHEN: \"generate SDK locally\", \"build SDK\", \"run SDK tests\", \"update changelog\", \"fix SDK build errors\", \"fix breaking changes\", \"resolve SDK generation errors\", \"customize TypeSpec\", \"rename SDK client\", \"rename SDK model\", \"hide operation from SDK\", \"fix analyzer errors\", \"resolve customization drift\", \"create subclient\", \"update metadata\", \"update version\". DO NOT USE FOR: publishing to package registries, CI pipeline configuration, API design review. INVOKES: azsdk_verify_setup, azsdk_package_generate_code, azsdk_package_build_code, azsdk_package_run_check, azsdk_package_run_tests, azsdk_customized_code_update, azsdk_package_update_changelog_content, azsdk_package_update_metadata, azsdk_package_update_version."
7+
description: "Generate, build, and test Azure SDKs locally from TypeSpec with automatic customization. WHEN: \"generate SDK locally\", \"build SDK\", \"run SDK tests\", \"run CI checks\", \"validate package\", \"run checks\", \"update changelog\", \"fix SDK build errors\", \"fix breaking changes\", \"resolve SDK generation errors\", \"customize TypeSpec\", \"rename SDK client\", \"rename SDK model\", \"hide operation from SDK\", \"fix analyzer errors\", \"resolve customization drift\", \"create subclient\", \"update metadata\", \"update version\". DO NOT USE FOR: publishing to package registries, CI pipeline configuration, API design review. INVOKES: azsdk_verify_setup, azsdk_package_generate_code, azsdk_package_build_code, azsdk_package_run_check, azsdk_package_run_tests, azsdk_customized_code_update, azsdk_package_update_changelog_content, azsdk_package_update_metadata, azsdk_package_update_version."
88
compatibility: "azure-sdk-mcp server, local azure-sdk-for-{language} clone, language build tools"
99
---
1010

@@ -44,10 +44,17 @@ Prerequisites: azure-sdk-mcp server must be running. Without MCP, use `npx tsp-c
4444

4545
[SDK repos](references/sdk-repos.md) | [Customization workflow](references/customization-workflow.md) | [Detailed workflow](references/detailed-workflow.md)
4646

47+
## Guardrails
48+
49+
- **NEVER modify generated SDK code files directly for customizations.** Always use `azure-sdk-mcp:azsdk_customized_code_update`. It handles classification, TypeSpec decorators, code patches, regeneration, and build as a single atomic workflow.
50+
- If `azure-sdk-mcp:azsdk_customized_code_update` fails or times out, **report the error to the user** and suggest retrying. Do not attempt to replicate its behavior by editing files manually.
51+
- Only the customization tool understands the correct layering of TypeSpec decorators vs code patches and ensures regenerated code stays consistent.
52+
4753
## Examples
4854

4955
- "Generate the SDK locally for my TypeSpec service"
5056
- "Build and test the Python SDK package"
57+
- "Run CI checks for my SDK package"
5158
- "Fix the SDK build errors on this PR"
5259
- "The SDK generation has breaking changes, resolve them"
5360
- "Rename FooClient to BarClient for .NET"
@@ -65,4 +72,5 @@ Prerequisites: azure-sdk-mcp server must be running. Without MCP, use `npx tsp-c
6572
- Run `azure-sdk-mcp:azsdk_verify_setup` to confirm MCP and tools.
6673
- If build fails with type conflicts, breaking changes, analyzer errors, or customization drift, use `azure-sdk-mcp:azsdk_customized_code_update` to apply customizations.
6774
- The customization tool uses a two-phase approach: TypeSpec decorators first (Phase A), then code repairs if needed (Phase B).
75+
- If `azure-sdk-mcp:azsdk_customized_code_update` fails or times out, report the error and retry. Do not manually edit generated SDK code — manual edits will be overwritten on the next regeneration.
6876
- Without MCP, use `npx tsp-client` CLI.

.github/skills/azsdk-common-prepare-release-plan/SKILL.md

Lines changed: 146 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -4,50 +4,164 @@ license: MIT
44
metadata:
55
version: "1.0.0"
66
distribution: shared
7-
description: "Create and manage release plan work items for Azure SDK releases across languages. **UTILITY SKILL**. USE FOR: \"create release plan\", \"update release plan\", \"link SDK PR to plan\", \"namespace approval\", \"check release plan status\". DO NOT USE FOR: SDK code generation, pipeline troubleshooting, API review feedback. INVOKES: azure-sdk-mcp:azsdk_create_release_plan, azure-sdk-mcp:azsdk_get_release_plan, azure-sdk-mcp:azsdk_link_sdk_pull_request_to_release_plan."
8-
compatibility: "azure-sdk-mcp server, API spec PR, or TypeSpec project path"
7+
description: 'Create, get, update, abandon, and link SDK PRs to release plan work items for Azure SDK releases. **UTILITY SKILL**. USE FOR: "create release plan", "get release plan", "update release plan", "update API spec in release plan", "update SDK details in release plan", "abandon release plan", "link SDK PR to plan", "namespace approval", "check release plan status". DO NOT USE FOR: SDK code generation, pipeline troubleshooting, API review feedback. INVOKES: azure-sdk-mcp:azsdk_create_release_plan, azure-sdk-mcp:azsdk_get_release_plan, azure-sdk-mcp:azsdk_get_release_plan_for_spec_pr, azure-sdk-mcp:azsdk_update_release_plan, azure-sdk-mcp:azsdk_update_api_spec_pull_request_in_release_plan, azure-sdk-mcp:azsdk_update_sdk_details_in_release_plan, azure-sdk-mcp:azsdk_abandon_release_plan, azure-sdk-mcp:azsdk_link_sdk_pull_request_to_release_plan.'
8+
compatibility:
9+
requires: "azure-sdk-mcp server, API spec PR in Azure/azure-rest-api-specs"
910
---
1011

1112
# Prepare Release Plan
1213

13-
> Do not display Azure DevOps work item URLs. Only provide Release Plan Link and ID.
14+
> **CRITICAL**: Do not display Azure DevOps work item URLs. Only provide Release Plan Link and Release Plan ID to the user.
1415
1516
## MCP Tools
1617

17-
| Tool | Purpose |
18-
|------|---------|
19-
| `azure-sdk-mcp:azsdk_create_release_plan` | Create plan |
20-
| `azure-sdk-mcp:azsdk_get_release_plan` | Get details |
21-
| `azure-sdk-mcp:azsdk_get_release_plan_for_spec_pr` | Find by spec PR |
22-
| `azure-sdk-mcp:azsdk_update_release_plan` | Update plan fields |
23-
| `azure-sdk-mcp:azsdk_update_sdk_details_in_release_plan` | Update SDK info |
24-
| `azure-sdk-mcp:azsdk_link_sdk_pull_request_to_release_plan` | Link SDK PR |
25-
| `azure-sdk-mcp:azsdk_link_namespace_approval_issue` | Link namespace |
26-
| `azure-sdk-mcp:azsdk_update_api_spec_pull_request_in_release_plan` | Update spec PR |
27-
28-
## Steps
29-
30-
1. **Prerequisites** — Check for API spec PR link or a TypeSpec project path; prompt if unavailable.
31-
2. **Check Existing** — Query by release plan number or spec PR link (do not query by work item ID).
32-
3. **Gather Info** — Collect Service Tree IDs, timeline, and API release type. See [details](references/release-plan-details.md).
33-
4. **API Release Type** — Ask user for API release type: "Private Preview", "Public Preview", or "GA". This is required.
34-
5. **Validate Spec PR** — If spec PR is provided, validate it matches the API release type:
35-
- Private Preview → must be in `azure-rest-api-specs-pr`
36-
- Public Preview / GA → must be in `azure-rest-api-specs`
37-
6. **Create** — Run `azure-sdk-mcp:azsdk_create_release_plan` with `apiReleaseType` parameter. SDK release type defaults automatically (beta for preview, stable for GA).
38-
7. **Namespace** — For mgmt plane first releases, link approval issue.
39-
8. **Link PRs** — Link SDK PRs to plan.
18+
| Tool | Purpose |
19+
| ------------------------------------------------------------------ | ---------------------------------- |
20+
| `azure-sdk-mcp:azsdk_create_release_plan` | Create a new release plan |
21+
| `azure-sdk-mcp:azsdk_get_release_plan` | Get release plan details by ID |
22+
| `azure-sdk-mcp:azsdk_get_release_plan_for_spec_pr` | Find release plan by spec PR URL |
23+
| `azure-sdk-mcp:azsdk_update_release_plan` | Update release plan metadata |
24+
| `azure-sdk-mcp:azsdk_update_api_spec_pull_request_in_release_plan` | Update API spec PR URL in plan |
25+
| `azure-sdk-mcp:azsdk_update_sdk_details_in_release_plan` | Update SDK/package details in plan |
26+
| `azure-sdk-mcp:azsdk_abandon_release_plan` | Abandon a release plan |
27+
| `azure-sdk-mcp:azsdk_link_sdk_pull_request_to_release_plan` | Link SDK PR to release plan |
28+
| `azure-sdk-mcp:azsdk_link_namespace_approval_issue` | Link namespace approval issue |
29+
30+
---
31+
32+
## Use Cases
33+
34+
### 1. Create Release Plan
35+
36+
**When**: User wants to create a release plan for a TypeSpec project.
37+
38+
**Steps**:
39+
40+
1. **Get TypeSpec Project Path** — Ask the user for the relative TypeSpec project path (directory containing `tspconfig.yaml`, e.g. `specification/contosowidgetmanager/Contoso.WidgetManager`). Always use the relative path from the repo root, not an absolute path.
41+
2. **Check Existing** — Run `azure-sdk-mcp:azsdk_get_release_plan` with the relative `typeSpecProjectPath` to check if a release plan already exists.
42+
- If a release plan exists with the **same API release type** the user requested: inform the user that a release plan already exists, show the Release Plan ID, status, and API release type. Suggest the user use the existing release plan. Do NOT create a new one.
43+
- If a release plan exists but for a **different API release type**: inform the user about the existing plan and its API release type, then proceed to create a new release plan using `forceCreateReleasePlan: true` for the user's requested API release type. Do NOT attempt to update the existing release plan's API release type.
44+
- If no release plan exists, proceed to step 3.
45+
3. **Gather Info** — Collect required details from the user. See [details](references/release-plan-details.md):
46+
- Target release month/year (format: "Month YYYY", e.g. "June 2026"). Do NOT use formats like "2026-06" or "06/2026" — these are invalid.
47+
- API release type: Value must be one of the following: "Private Preview", "Public Preview", or "GA"
48+
- SDK release type: Value must be "beta" or "stable" — always ask the user explicitly
49+
- Spec PR URL (optional)
50+
- Service Tree ID (GUID) — optional if previously created
51+
- Product Tree ID (GUID) — optional if previously created
52+
4. **Create** — Run `azure-sdk-mcp:azsdk_create_release_plan` with the collected parameters including `sdkReleaseType`. Use `forceCreateReleasePlan: true` only if an existing release plan was found for a different API release type.
53+
5. **Namespace** — For first management plane releases, link namespace approval issue using `azure-sdk-mcp:azsdk_link_namespace_approval_issue`.
54+
55+
> **IMPORTANT**: Do NOT default the API release type value as the SDK release type. These are separate fields — always ask the user explicitly for the SDK release type.
56+
>
57+
> **IMPORTANT**: Do NOT update an existing release plan to change its API release type. If a release plan exists for a different API release type, force-create a new one instead.
58+
59+
**Tool**: `azure-sdk-mcp:azsdk_create_release_plan`
60+
61+
---
62+
63+
### 2. Get Release Plan
64+
65+
**When**: User wants to check the status or details of an existing release plan.
66+
67+
**Steps**:
68+
69+
1. **Identify Plan** — Ask user for one of:
70+
- Release plan ID or work item ID
71+
- Relative TypeSpec project path (e.g. `specification/contosowidgetmanager/Contoso.WidgetManager`)
72+
- Spec PR URL
73+
2. **Query** — Run `azure-sdk-mcp:azsdk_get_release_plan` with the provided identifier (always use relative path for `typeSpecProjectPath`), OR run `azure-sdk-mcp:azsdk_get_release_plan_for_spec_pr` if only a spec PR URL is available.
74+
3. **Display** — Show the release plan ID, status, linked PRs, and SDK details.
75+
76+
**Tools**: `azure-sdk-mcp:azsdk_get_release_plan`, `azure-sdk-mcp:azsdk_get_release_plan_for_spec_pr`
77+
78+
---
79+
80+
### 3. Update Release Plan / Update API Spec in Release Plan
81+
82+
**When**: User needs to update release plan metadata (spec PR URL, TypeSpec project path, SDK release type, service/product IDs) or update the API spec PR link.
83+
84+
**Steps**:
85+
86+
1. **Identify Plan** — Get the work item ID or TypeSpec project path from the user.
87+
2. **Update Metadata** — Run `azure-sdk-mcp:azsdk_update_release_plan` with:
88+
- `typeSpecProjectPath` (required)
89+
- `workItemId` (optional — resolved from TypeSpec path or spec PR if not provided)
90+
- `specPullRequestUrl` (optional)
91+
- `sdkReleaseType` (required — do NOT default this from API release type; always ask user explicitly)
92+
- `serviceTreeId` (optional)
93+
- `productTreeId` (optional)
94+
3. **Update API Spec PR** — If only the spec PR URL needs updating, run `azure-sdk-mcp:azsdk_update_api_spec_pull_request_in_release_plan` with:
95+
- `specPullRequestUrl` (required)
96+
- `workItemId` or `releasePlanId`
97+
98+
**Tools**: `azure-sdk-mcp:azsdk_update_release_plan`, `azure-sdk-mcp:azsdk_update_api_spec_pull_request_in_release_plan`
99+
100+
---
101+
102+
### 4. Update SDK/Package Details in Release Plan
103+
104+
**When**: User needs to update SDK language and package name details in the release plan after code generation or configuration changes.
105+
106+
**Steps**:
107+
108+
1. **Identify Plan** — Get the release plan work item ID from the user.
109+
2. **Identify TypeSpec Project** — Get or confirm the TypeSpec project path.
110+
3. **Update** — Run `azure-sdk-mcp:azsdk_update_sdk_details_in_release_plan` with:
111+
- `releasePlanWorkItemId` (required)
112+
- `typeSpecProjectPath` (required)
113+
114+
**Tool**: `azure-sdk-mcp:azsdk_update_sdk_details_in_release_plan`
115+
116+
---
117+
118+
### 5. Abandon a Release Plan
119+
120+
**When**: User decides to cancel or discard a release plan that is no longer needed.
121+
122+
**Steps**:
123+
124+
1. **Identify Plan** — Get the work item ID or release plan ID from the user.
125+
2. **Confirm** — Ask user to confirm abandonment: "Are you sure you want to abandon this release plan? This action updates the status to Abandoned."
126+
3. **Abandon** — Run `azure-sdk-mcp:azsdk_abandon_release_plan` with:
127+
- `workItemId` or `releasePlanId`
128+
129+
**Tool**: `azure-sdk-mcp:azsdk_abandon_release_plan`
130+
131+
---
132+
133+
### 6. Link SDK Pull Request to Release Plan
134+
135+
**When**: SDK pull requests have been created and need to be associated with the release plan.
136+
137+
**Steps**:
138+
139+
1. **Identify Plan** — Get the work item ID or release plan ID.
140+
2. **Collect PR Info** — Get the SDK pull request URL and language from the user.
141+
3. **Link** — Run `azure-sdk-mcp:azsdk_link_sdk_pull_request_to_release_plan` with:
142+
- `pullRequestUrl` (required)
143+
- `language` (required — e.g., ".NET", "Java", "JavaScript", "Python", "Go")
144+
- `workItemId` or `releasePlanId`
145+
4. **Repeat** — If multiple SDK PRs exist for different languages, repeat for each.
146+
147+
**Tool**: `azure-sdk-mcp:azsdk_link_sdk_pull_request_to_release_plan`
148+
149+
---
40150

41151
## Examples
42152

43153
- "Create a release plan for my spec PR"
44-
- "Create a release plan for my TypeSpec project"
45-
- "Create a private preview release plan"
46-
- "Create a GA release plan for my spec PR"
154+
- "Get the release plan for work item 12345"
155+
- "What is the status of my release plan?"
156+
- "Update the API spec PR in my release plan"
157+
- "Update SDK details in release plan 67890"
158+
- "Abandon release plan 11111"
47159
- "Link my SDK PR to release plan"
160+
- "Link Python SDK PR #100 to release plan 67890"
48161

49162
## Troubleshooting
50163

51-
- Requires `azure-sdk-mcp` server; no CLI fallback.
52-
- If creation fails, verify Service Tree IDs and the provided spec PR URL or TypeSpec project path.
53-
- If spec PR validation fails, check that the spec PR repo matches the API release type (private repo for Private Preview, public repo for Public Preview/GA).
164+
- Requires `azure-sdk-mcp` server; no CLI fallback — prompt user to configure MCP if unavailable.
165+
- If creation fails, verify spec PR URL and Service Tree IDs.
166+
- If update fails, ensure the work item ID or release plan ID is correct and the plan is not already abandoned.
167+
- If linking fails, verify the SDK PR URL is valid and the language matches a supported value.

0 commit comments

Comments
 (0)