Azure / azure-cli

Azure Command-Line Interface
MIT License
3.99k stars 2.96k forks source link

az sql db list-editions filter documentation is wrong #28916

Open jason-berk-k1x opened 4 months ago

jason-berk-k1x commented 4 months ago

Describe the bug

https://learn.microsoft.com/en-us/cli/azure/sql/db?view=azure-cli-latest#az-sql-db-list-editions

--dtu Number of DTUs to search for. If unspecified, all DTU sizes are shown.

--vcores Number of vcores to search for. If unspecified, all vcore sizes are shown.

Related command

az sql db list-editions -l eastus -o table --dtu az sql db list-editions -l eastus -o table --vcores

Errors

➜ ~ az sql db list-editions -l eastus -o table --vcores argument --vcores: expected one argument

➜ ~ az sql db list-editions -l eastus -o table --dtu argument --dtu: expected one argument

Issue script & Debug output

urllib3.connectionpool: Starting new HTTPS connection (1): app.aladdin.microsoft.com:443 urllib3.connectionpool: https://app.aladdin.microsoft.com:443 "GET /api/v1.0/suggestions?query=%7B%22command%22%3A+%22sql+db+list-editions%22%2C+%22parameters%22%3A+%22--output%2C--location%2C--dtu%22%7D&clientType=AzureCli&context=%7B%22versionNumber%22%3A+%222.60.0%22%2C+%22errorType%22%3A+%22ExpectedArgument%22%2C+%22correlationId%22%3A+%222ec35904-b962-4f19-9460-8aa650e891b4%22%2C+%22subscriptionId%22%3A+%22833a7ac0-fe3f-4b82-80d1-621b55359f32%22%2C+%22eventId%22%3A+%229e250672-9e7c-4854-a99e-b31b021670d3%22%7D HTTP/1.1" 200 None cli.azure.cli.core.azclierror: Traceback (most recent call last): File "/opt/homebrew/Cellar/python@3.11/3.11.9/Frameworks/Python.framework/Versions/3.11/lib/python3.11/argparse.py", line 1907, in parse_known_args namespace, args = self._parse_known_args(args, namespace) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/homebrew/Cellar/python@3.11/3.11.9/Frameworks/Python.framework/Versions/3.11/lib/python3.11/argparse.py", line 2128, in _parse_known_args start_index = consume_optional(start_index) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/homebrew/Cellar/python@3.11/3.11.9/Frameworks/Python.framework/Versions/3.11/lib/python3.11/argparse.py", line 2058, in consume_optional arg_count = match_argument(action, selected_patterns) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/homebrew/Cellar/python@3.11/3.11.9/Frameworks/Python.framework/Versions/3.11/lib/python3.11/argparse.py", line 2222, in _match_argument raise ArgumentError(action, msg) argparse.ArgumentError: argument --dtu: expected one argument

Expected behavior

command works as documented

Environment Summary

➜ ~ az --version azure-cli 2.60.0

core 2.60.0 telemetry 1.1.0

Extensions: account 0.2.5 azure-devops 1.0.0 containerapp 0.3.50

Dependencies: msal 1.28.0 azure-mgmt-resource 23.1.0b2

Additional context

No response

yonzhan commented 4 months ago

Thank you for opening this issue, we will look into it.