{Core} aaz: Remove requests in main thread#32824
Conversation
️✔️AzureCLI-FullTest
|
|
Thank you for your contribution! We will review the pull request and get back to you soon. |
|
Hi @necusjz, |
|
The git hooks are available for azure-cli and azure-cli-extensions repos. They could help you run required checks before creating the PR. Please sync the latest code with latest dev branch (for azure-cli) or main branch (for azure-cli-extensions). pip install azdev --upgrade
azdev setup -c <your azure-cli repo path> -r <your azure-cli-extensions repo path>
|
️✔️AzureCLI-BreakingChangeTest
|
There was a problem hiding this comment.
Pull request overview
This PR removes an eager requests import from the AAZ polling implementation to reduce CLI startup/import-chain overhead (notably for -h scenarios where AAZ is imported transitively).
Changes:
- Removed the top-level
requestsimport (and related comments) fromazure.cli.core.aaz._pollerto avoid importingrequestson module import.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Related command
Description
in core aaz, the use of
requestscan cause performance degradation for modules such asnetworkandstorage—that is, any modules with potential import chains.the following is an experiment conducted for

az network -h:before:
after:

Testing Guide
History Notes
[Component Name 1] BREAKING CHANGE:
az command a: Make some customer-facing breaking change[Component Name 2]
az command b: Add some customer-facing featureThis checklist is used to make sure that common guidelines for a pull request are followed.
The PR title and description has followed the guideline in Submitting Pull Requests.
I adhere to the Command Guidelines.
I adhere to the Error Handling Guidelines.