-
Notifications
You must be signed in to change notification settings - Fork 3.3k
{Core} Hotfix: Fix inifite extension install loop #17698
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
{Core} Hotfix: Fix inifite extension install loop #17698
Conversation
|
I thought of a better place to trigger extension installation rather than How about we check whether the command is in the azure-cli/src/azure-cli-core/azure/cli/core/__init__.py Lines 452 to 460 in 1ca05db
This will be very easy with the extraction of extension installation logic from |
|
As for the behavior of We can repro with import argparse
# create the top-level parser
parser = argparse.ArgumentParser(prog='PROG')
subparsers = parser.add_subparsers(help='sub-command help')
# create the parser for the "a" command
parser_a = subparsers.add_parser('a', help='a help')
parser_a.add_argument('--bar', type=int, help='bar help')
print(parser.parse_args('--bar a'.split()))So checking whether the command is valid is much easier than altering the behavior of |
Thanks for the suggestion. I will check long-term solutions later. |
Description
This PR consolidates changes in #17474 and also has the changes to only allow prefix match for help commands during dynamic extension install to resolve #17696.
Testing Guide
az account -s sub_id set: not trigger extension installaz devops --organization org project list: not trigger extension installaz devops: not trigger extension installaz devops -h: trigger extension installaz devops project list --organization org: trigger extension installaz devops project list: trigger extension installHistory 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 feature.
This 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.