{Core} Hotfix: Fix inifite extension install loop#17698
{Core} Hotfix: Fix inifite extension install loop#17698fengzhou-msft merged 5 commits intoAzure:releasefrom
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.