-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Sync eng/common directory with azure-sdk-tools for PR 11868 #35982
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
raych1
merged 14 commits into
main
from
sync-eng/common-user/raych1/local-sdk-instructions-11868
Sep 18, 2025
Merged
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
d95d700
added instructions for sdk local workflow
raych1 99e6ec0
fix case
raych1 420e971
Added missing comma
raych1 11264fe
Update eng/common/instructions/azsdk-tools/local-sdk-workflow.instruc…
raych1 4495662
Update eng/common/instructions/azsdk-tools/local-sdk-workflow.instruc…
raych1 9ae1c71
Update eng/common/instructions/azsdk-tools/local-sdk-workflow.instruc…
raych1 41c57db
Update eng/common/instructions/azsdk-tools/local-sdk-workflow.instruc…
raych1 278be36
Replace 'tspconfigPath' by the literal file name
raych1 519e61a
Added routing step to choose workflow
raych1 78b95e0
Added goal and action to some steps properly
raych1 0ca3587
Specified mcp tool name explicitly
raych1 9773fa7
Added back step to choose sdk generation approach
raych1 7c05264
Specified the mcp tool names explicitly
raych1 9f3a5cb
Update eng/common/instructions/azsdk-tools/local-sdk-workflow.instruc…
raych1 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
32 changes: 0 additions & 32 deletions
32
eng/common/instructions/azsdk-tools/create-sdk-locally.instructions.md
This file was deleted.
Oops, something went wrong.
119 changes: 119 additions & 0 deletions
119
eng/common/instructions/azsdk-tools/local-sdk-workflow.instructions.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,119 @@ | ||
| --- | ||
| description: "Guide the user to generate and build SDKs locally for a TypeSpec based API spec" | ||
| --- | ||
|
|
||
| # Goal | ||
|
|
||
| Help the user generate and build SDKs locally from TypeSpec API specifications using the `azure-sdk-mcp` tools. | ||
|
|
||
| --- | ||
|
|
||
| ## Part A: Generate SDK Locally | ||
|
|
||
| ### Step 1: Outline workflow | ||
|
|
||
| **Goal**: Ensure the user understands the overall SDK generation and build process before starting. | ||
| **Actions**: | ||
|
|
||
| - Present the high-level steps involved in generating and building SDK locally: | ||
| 1. Select target language | ||
| 2. Verify SDK repository | ||
| 3. Validate repository path | ||
| 4. Identify path to configuration file | ||
| 5. Generate SDK using `azsdk_package_generate_code` MCP tool | ||
| 6. Identify SDK project path | ||
| 7. Build/Compile SDK using `azsdk_package_build_code` MCP tool | ||
| - Ask the user to confirm readiness to proceed. | ||
|
|
||
| --- | ||
|
|
||
| ### Step 2: Select language | ||
|
|
||
| **Goal**: Confirm the target language for SDK generation. | ||
| **Actions**: | ||
|
|
||
| - Prompt user to choose one of the supported languages: | ||
| - .NET | ||
| - Java | ||
| - JavaScript | ||
| - Python | ||
| - Go | ||
| - Validate input against the allowed list. | ||
|
|
||
| --- | ||
|
|
||
| ### Step 3: Verify SDK repository | ||
|
|
||
| **Goal**: Ensure the correct Azure SDK language repository is available locally. | ||
| **Actions**: | ||
|
|
||
| - Prompt user to provide the path to their **locally cloned repository** for the selected language. | ||
| - Note: The **local folder name can be arbitrary**, but the repository must have originated from one of the official Azure SDK repositories: | ||
| - `azure-sdk-for-net` (.NET) | ||
| - `azure-sdk-for-java` (Java) | ||
| - `azure-sdk-for-js` (JavaScript) | ||
| - `azure-sdk-for-python` (Python) | ||
| - `azure-sdk-for-go` (Go) | ||
| - If the repository is not cloned → instruct user to clone the appropriate remote repository from GitHub. | ||
| - MCP tool will automatically validate the remote origin and repository structure. | ||
|
|
||
| --- | ||
|
|
||
| ### Step 4: Validate repository path | ||
|
|
||
| **Actions**: | ||
|
|
||
| - Check if the provided repository path exists and matches the selected SDK language repository. | ||
| - If invalid → prompt user to re-enter a valid path. | ||
|
|
||
| --- | ||
|
|
||
| ### Step 5: Identify path to configuration file | ||
|
|
||
| **Goal**: Determine the correct path to the TypeSpec configuration file based on the working context. | ||
| **Actions**: | ||
|
|
||
| - **Scenario A: Working in a repository cloned from `azure-rest-api-specs`** | ||
| - Identify the path to `tspconfig.yaml` (local path or HTTPS URL). | ||
| - The local folder name can be arbitrary; the MCP tool will validate that the remote origin URL points to the official `azure-rest-api-specs` repository. | ||
| - Example paths (pointing directly to tspconfig.yaml): | ||
| - `/home/usr/azure-rest-api-specs/specification/contosowidgetmanager/Contoso.Management/tspconfig.yaml` | ||
| - `https://github.com/Azure/azure-rest-api-specs/blob/4af373fc5826cf5a2365a20dde01c4b2efde48f0/specification/contosowidgetmanager/Contoso.Management/tspconfig.yaml` | ||
|
|
||
| - **Scenario B: Working in one of the official Azure SDK language repositories** | ||
| (i.e., originally cloned from `azure-sdk-for-net`, `azure-sdk-for-java`, `azure-sdk-for-js`, `azure-sdk-for-python`, `azure-sdk-for-go`) | ||
| - Identify the path to `tsp-location.yaml`. | ||
| - The local folder name can be arbitrary; MCP tool will validate the remote origin URL. | ||
| - Example path: | ||
| `/home/usr/azure-sdk-for-net/sdk/contoso/Azure.ResourceManager.Contoso/tsp-location.yaml` | ||
|
|
||
| --- | ||
|
|
||
| ### Step 6: Generate SDK | ||
|
|
||
| **Actions**: | ||
|
|
||
| - Run `azsdk_package_generate_code` MCP tool to generate the SDK locally. | ||
|
|
||
| --- | ||
|
|
||
| ## Part B: Build / Compile SDK Locally | ||
|
|
||
| ### Step 1: Identify SDK project path | ||
|
|
||
| **Goal**: Locate the generated SDK project directory for building/compiling. | ||
| **Actions**: | ||
|
|
||
| - Find the project directory inside the selected Azure SDK language repository. | ||
| - Typical structure: | ||
| `sdk/{service-name}/{package-name}/` | ||
| - Example: | ||
| `/path/to/azure-sdk-for-net/contoso/Azure.ResourceManager.Contoso/` | ||
|
|
||
| --- | ||
|
|
||
| ### Step 2: Build/Compile the SDK | ||
|
|
||
| **Actions**: | ||
|
|
||
| - Run `azsdk_package_build_code` MCP tool to compile the SDK in the identified project directory. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.