Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ description: "Guide the user to generate and build SDKs locally for a TypeSpec b
# Goal

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

---

Expand Down Expand Up @@ -65,6 +71,7 @@ Help the user generate and build SDKs locally from TypeSpec API specifications u

- Check if the provided repository path exists and matches the selected SDK language repository.
- If invalid → prompt user to re-enter a valid path.
- Verify setup to ensure all required tools are installed for the selected language.

---

Expand Down Expand Up @@ -117,3 +124,29 @@ Help the user generate and build SDKs locally from TypeSpec API specifications u
**Actions**:

- Run `azsdk_package_build_code` MCP tool to compile the SDK in the identified project directory.

---

### Step 3: Run package validation

**Actions**:

- Run `azsdk_package_run_check` MCP tool to validate the generated SDK package in the identified project directory.

---

### Step 4: Run package tests

**Actions**:

- Run `azsdk_package_run_tests` MCP tool to run tests on the generated SDK package in the identified project directory.

---

### Step 5: Update change log, metadata and version

**Actions**:

- Run `azsdk_package_update_metadata` MCP tool to update metadata in the identified project directory.
- Run `azsdk_package_update_changelog_content` MCP tool to update change log in the identified project directory.
- Run `azsdk_package_update_version` MCP tool to update version in the identified project directory.
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,28 @@ Pre-requisites:
# SDK generation steps

## Step: Generate SDKs
**Goal**: Generate SDKs
**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."

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.

Generate SDK locally in cases below:
- If the 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.
- If SDK or client.tsp customizations are needed before creating a pull request.
- If the user wants to add tests, samples or any customization to the generated SDK.

Generate SDK using pipeline:
- If the user wants to generate SDK and get a PR automatically created in Azure SDK language repositories. This approach can be followed if the user does not want to setup local environment for each language.

### Generate SDK locally:

**Condition**: If user chooses to generate SDK locally
**Message to user**: "Generating SDKs locally requires you to have the development environment set up 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."
**Actions**:
Follow the steps in #file:local-sdk-workflow.instructions.md to generate and build SDKs locally from TypeSpec project.

### Generate SDK using pipeline:

**Condition**: If user chooses to generate the SDK using pipeline or when generating SDK by GitHub coding agent
**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."
**Actions**:
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.
- Execute the SDK generation pipeline with the following required parameters for all languages:
Expand All @@ -33,7 +53,8 @@ Pre-requisites:
2. Monitor pipeline status after 15 minutes and provide updates. If pipeline is in progress, inform user that it may take additional time and check the status later.
3. Display generated SDK PR links when available. If pipeline fails, inform user with error details and suggest to check pipeline logs for more information.
4. If SDK pull request is available for all languages, ask user to review generated SDK pull request and mark them as ready for review when they are ready to get them reviewed and merged.
5. If SDK pull request was created for test purposes, inform user to close the test SDK pull request.
5. Inform the user that they can checkout generated SDK pull request locally and add more tests, samples or code customizations if needed using local SDK generation tools.
6. If SDK pull request was created for test purposes, inform user to close the test SDK pull request.
**Success Criteria**: SDK generation pipeline initiated and SDKs generated

## Step: SDK release plan
Expand Down
Loading