Use sdkReleaseType for tagIsStable in TypeSpec projects#45768
Merged
Conversation
For TypeSpec projects, determine tagIsStable from sdkReleaseType input instead of using judge_tag_preview. Swagger projects continue to use judge_tag_preview as before. - Extract sdkReleaseType from pipeline input data - Add is_tsp flag to distinguish TypeSpec from Swagger codegen - TypeSpec: tagIsStable = (sdkReleaseType == 'stable') - Swagger: tagIsStable = not judge_tag_preview(...) - Add test_sdk_generator.py with 9 test cases covering the new logic
Member
Author
|
@copilot fix the following ci error: |
Contributor
* Initial plan * Fix Black formatting in test_sdk_generator.py Co-authored-by: msyyc <70930885+msyyc@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: msyyc <70930885+msyyc@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Updates the packaging tooling to compute tagIsStable differently for TypeSpec vs Swagger code generation runs, using the pipeline-provided sdkReleaseType for TypeSpec projects while preserving existing Swagger behavior.
Changes:
- Read
sdkReleaseTypefrom the generator pipeline input and use it to settagIsStablefor TypeSpec projects. - Keep Swagger projects’
tagIsStablebehavior based onjudge_tag_preview(...). - Add unit tests covering TypeSpec vs Swagger
tagIsStablebehavior plus a few helper-function tests.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| eng/tools/azure-sdk-tools/packaging_tools/sdk_generator.py | Updates tagIsStable assignment to use sdkReleaseType for TypeSpec runs and judge_tag_preview for Swagger runs. |
| eng/tools/azure-sdk-tools/tests/test_sdk_generator.py | Adds tests validating the new tagIsStable branching logic and existing helper behaviors. |
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
ChenxiJiang333
approved these changes
Mar 19, 2026
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Changes
For TypeSpec projects, determine
tagIsStablefromsdkReleaseTypepipeline input instead of usingjudge_tag_preview. Swagger projects continue to usejudge_tag_previewas before.What changed
sdkReleaseTypefrom pipeline input datais_tspflag to distinguish TypeSpec from Swagger codegentagIsStable = (sdkReleaseType == "stable")tagIsStable = not judge_tag_preview(...)test_sdk_generator.pywith 9 test cases covering the new logicFiles changed
eng/tools/azure-sdk-tools/packaging_tools/sdk_generator.py— UpdatedtagIsStablelogiceng/tools/azure-sdk-tools/tests/test_sdk_generator.py— New test file