Skip to content

Commit 994cc7b

Browse files
praveenkuttappanazure-sdk
authored andcommitted
Update copilot instructions to support both local and pipeline based SDK gen
1 parent bc6b026 commit 994cc7b

File tree

2 files changed

+54
-2
lines changed

2 files changed

+54
-2
lines changed

eng/common/instructions/azsdk-tools/local-sdk-workflow.instructions.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@ description: "Guide the user to generate and build SDKs locally for a TypeSpec b
55
# Goal
66

77
Help the user generate and build SDKs locally from TypeSpec API specifications using the `azure-sdk-mcp` tools.
8+
High level steps involved:
9+
1. Generate SDK locally
10+
2. Build / Compile SDK locally
11+
3. Run package checks
12+
4. Run package tests
13+
5. Update change log, metadata and version
814

915
---
1016

@@ -117,3 +123,29 @@ Help the user generate and build SDKs locally from TypeSpec API specifications u
117123
**Actions**:
118124

119125
- Run `azsdk_package_build_code` MCP tool to compile the SDK in the identified project directory.
126+
127+
---
128+
129+
### Step 3: Run package validation
130+
131+
**Actions**:
132+
133+
- Run `azsdk_package_run_check` MCP tool to validate the generated SDK package in the identified project directory.
134+
135+
---
136+
137+
### Step 3: Run package tests
138+
139+
**Actions**:
140+
141+
- Run `azsdk_package_run_tests` MCP tool to run tests on the generated SDK package in the identified project directory.
142+
143+
---
144+
145+
### Step 3: Update change log, metadata and version
146+
147+
**Actions**:
148+
149+
- Run `azsdk_package_update_metadata` MCP tool to update metadata in the identified project directory.
150+
- Run `azsdk_package_update_changelog_content` MCP tool to update change log in the identified project directory.
151+
- Run `azsdk_package_update_version` MCP tool to update version in the identified project directory.

eng/common/instructions/azsdk-tools/typespec-to-sdk.instructions.md

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,28 @@ Pre-requisites:
1717
# SDK generation steps
1818

1919
## Step: Generate SDKs
20-
**Goal**: Generate SDKs
21-
**Message to user**: "SDK generation will take approximately 15-20 minutes. Currently, SDKs are generated using the Azure DevOps pipeline. SDK generation is supported only from a merged API spec or from an API spec pull request in the https://github.com/Azure/azure-rest-api-specs repository."
20+
21+
As a first step, you must prompt the user to understand the intention of SDK generation. Based on the user input, you can either run SDK generation locally or use SDK generation pipeline.
22+
23+
Generate SDK locally in cases below:
24+
- If user wants to walk through each SDK generation step locally. This approach requires user to have the setup for each language to generate SDK locally. User can create a pull request for each language after completing all the steps in SDK generation successfully to get the generated SDK reviewed and merged.
25+
- If user wants troubleshoot a failed SDK generation by the pipeline.
26+
- If SDK or client.tsp customization are needed before creating a pull request.
27+
28+
Generate SDK using pipeline:
29+
- If user wants to generate SDK and get a PR automatically created in Azure SDK language repositories. This approach can be followed if user does not want to setup local environment for each language.
30+
31+
### Generate SDK locally:
32+
33+
**Condition**: If user chooses to generate SDK locally
34+
**Message to user**: "Generating SDKs locally requires you to have the development environment setup for each language. Prompt the user to create a pull request for each language after completing the following steps successfully: generation, validation, build, test and update of metadata, change log, and version."
35+
**Actions**:
36+
Follow the steps in #file:local-sdk-workflow.instructions.md to generate and build SDKs locally from TypeSpec project.
37+
38+
### Generate SDK using pipeline:
39+
40+
**Condition**: If user chooses to generate the SDK using pipeline or when generating SDK by GitHub coding agent
41+
**Message to user**: "SDK generation will take approximately 15-20 minutes. SDKs are generated using the Azure DevOps pipeline. SDK generation is supported only from a merged API spec or from an API spec pull request in the https://github.com/Azure/azure-rest-api-specs repository."
2242
**Actions**:
2343
1. Identify whether TypeSpec is for Management Plane or Data Plane based on project structure and files. tspconfig.yaml file contains `resource-manager` for management plane and `data-plane` for data plane as resource provider.
2444
- Execute the SDK generation pipeline with the following required parameters for all languages:

0 commit comments

Comments
 (0)