Skip to content

Use sdkReleaseType for tagIsStable in TypeSpec projects#45769

Merged
msyyc merged 2 commits intofix/tag-is-stable-typespecfrom
copilot/sub-pr-45768
Mar 19, 2026
Merged

Use sdkReleaseType for tagIsStable in TypeSpec projects#45769
msyyc merged 2 commits intofix/tag-is-stable-typespecfrom
copilot/sub-pr-45768

Conversation

Copy link
Contributor

Copilot AI commented Mar 18, 2026

For TypeSpec projects, tagIsStable should be derived from the sdkReleaseType pipeline input rather than judge_tag_preview, which inspects swagger tags. Swagger projects continue using judge_tag_preview as before.

Changes

  • eng/tools/azure-sdk-tools/packaging_tools/sdk_generator.py

    • 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(...)
  • eng/tools/azure-sdk-tools/tests/test_sdk_generator.py — New test file covering:

    • TypeSpec with sdkReleaseType = "stable", "preview", and missing
    • Swagger delegating to judge_tag_preview for both stable and preview
    • Unit tests for extract_sdk_folder and get_readme_python_content

📍 Connect Copilot coding agent with Jira, Azure Boards or Linear to delegate work to Copilot in one click without leaving your project management tool.

Co-authored-by: msyyc <70930885+msyyc@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Mar 18, 2026

Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • pypi.org
    • Triggering command: /home/REDACTED/work/azure-sdk-for-python/azure-sdk-for-python/.venv/bin/pip pip install black (dns block)
    • Triggering command: /home/REDACTED/work/azure-sdk-for-python/azure-sdk-for-python/.venv/bin/pip3 pip3 install black (dns block)
    • Triggering command: /home/REDACTED/work/azure-sdk-for-python/azure-sdk-for-python/.venv/bin/pip pip install --no-deps --find-links /home/REDACTED/.cache/pip black (dns block)
  • scanning-api.github.com
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node /home/REDACTED/work/_temp/ghcca-node/node/bin/node --enable-source-maps /home/REDACTED/work/_temp/copilot-developer-action-main/dist/index.js (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Copilot AI changed the title [WIP] Update tagIsStable logic for TypeSpec projects Use sdkReleaseType for tagIsStable in TypeSpec projects Mar 18, 2026
Copilot AI requested a review from msyyc March 18, 2026 10:13
@msyyc msyyc marked this pull request as ready for review March 19, 2026 01:48
@msyyc msyyc requested review from mccoyp and scbedd as code owners March 19, 2026 01:48
@msyyc msyyc merged commit f9ba8ce into fix/tag-is-stable-typespec Mar 19, 2026
3 checks passed
@msyyc msyyc deleted the copilot/sub-pr-45768 branch March 19, 2026 01:48
msyyc added a commit that referenced this pull request Mar 19, 2026
* Use sdkReleaseType for tagIsStable in TypeSpec projects

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

* Use sdkReleaseType for tagIsStable in TypeSpec projects (#45769)

* 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>

* update

* Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants