Skip to content

[sdk generation pipeline] find client name in __all__ from __init__.py #41687

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
merged 4 commits into from
Jun 20, 2025

Conversation

msyyc
Copy link
Member

@msyyc msyyc commented Jun 20, 2025

For #41529
To make the script work in mcp tool, we can't assume the package is installed. So the better way is to find client name from source .py file.

@Copilot Copilot AI review requested due to automatic review settings June 20, 2025 07:52
@msyyc msyyc requested review from scbedd and mccoyp as code owners June 20, 2025 07:52
Copilot

This comment was marked as outdated.

@msyyc msyyc requested a review from Copilot June 20, 2025 08:06
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR refactors the way the client name is retrieved by reading the all variable from the package’s init.py file and improves the error messages in the changelog generation function.

  • Updated error messages in sdk_package.py to provide explicit manual instructions.
  • Added a new property in package_utils.py to extract the client title from init.py using the ast module.
  • Modified check_file_with_packaging_tool to utilize the new extraction method.

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
tools/azure-sdk-tools/packaging_tools/sdk_package.py Updated error messages for changelog generation timeout and failure scenarios.
tools/azure-sdk-tools/packaging_tools/package_utils.py Added a property to extract client title from init.py and refactored check_file_with_packaging_tool.
Comments suppressed due to low confidence (1)

tools/azure-sdk-tools/packaging_tools/sdk_package.py:54

  • [nitpick] The updated error message for timeout now instructs manual changelog writing with an emphatic tone. Consider softening the tone or including a reference to documentation to guide the user on next steps.
            md_output = "change log generation was timeout!!! You need to write it manually!!!"

@msyyc
Copy link
Member Author

msyyc commented Jun 20, 2025

/check-enforcer override

@msyyc msyyc merged commit fe57ef1 into main Jun 20, 2025
5 of 10 checks passed
@msyyc msyyc deleted the fix-sdk-generation-2025-06-20 branch June 20, 2025 08:08
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