Skip to content
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

listed optional parameters are not correct (--ids not working) #28316

Closed
DK-Dennis opened this issue Feb 7, 2024 · 9 comments
Closed

listed optional parameters are not correct (--ids not working) #28316

DK-Dennis opened this issue Feb 7, 2024 · 9 comments
Labels
Auto-Resolve Auto resolve by bot bug This issue requires a change to an existing behavior in the product in order to be resolved. Functions az functionapp Service Attention This issue is responsible by Azure service team. Similar-Issue

Comments

@DK-Dennis
Copy link

DK-Dennis commented Feb 7, 2024

Describe the bug

The documentation reference states that one can use the parameter --ids (instead of --name and --resource-group).
However, when issuing a command using --ids, I get:

Related command

az functionapp functionapp config appsettings list

Errors

az : ERROR: the following arguments are required: --resource-group/-g, --name/-n
At line:1 char:1
+ az functionapp config appsettings list --ids '/subscriptions/794a6ca8 ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (ERROR: the foll...p/-g, --name/-n:String) [], RemoteException
    + FullyQualifiedErrorId : NativeCommandError
 
Examples from AI knowledge base:
az functionapp config appsettings list --name MyWebapp --resource-group MyResourceGroup
Show settings for a function app. (autogenerated)
https://aka.ms/cli_ref
Read more about the command in reference docs

Issue script & Debug output

az functionapp config appsettings list --ids '/subscriptions/79XXX-4eXX-47XX-9e4e-REDACTED/resourceGroups/DEC-test-rg/providers/Microsoft.Web/sites/func-dehe-sandbox'

az functionapp config appsettings list --ids '/subscriptions/79XXX-4eXX-47XX-9e4e-REDACTED/resourceGroups/DEC-test-rg/providers/Microsoft.Web/sites/func-dehe-sandbox' --debug
az : DEBUG: cli.knack.cli: Command arguments: ['functionapp', 'config', 'appsettings', 'list', '--ids', '/subscriptions/794a6ca8-4e39-470e-9e4e-80a33aecd8e9/resour
ceGroups/DEC-test-rg/providers/Microsoft.Web/sites/func-dehe-sandbox', '--debug']
At line:1 char:1
+ az functionapp config appsettings list --ids '/subscriptions/794a6ca8 ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (DEBUG: cli.knac...ox', '--debug']:String) [], RemoteException
    + FullyQualifiedErrorId : NativeCommandError
 
DEBUG: cli.knack.cli: __init__ debug log:
Cannot enable color.
DEBUG: cli.knack.cli: Event: Cli.PreExecute []
DEBUG: cli.knack.cli: Event: CommandParser.OnGlobalArgumentsCreate [<function CLILogging.on_global_arguments at 0x000001C72B95B560>, <function OutputProducer.on_gl
obal_arguments at 0x000001C72BAE5C60>, <function CLIQuery.on_global_arguments at 0x000001C72BB137E0>]
DEBUG: cli.knack.cli: Event: CommandInvoker.OnPreCommandTableCreate []
DEBUG: cli.azure.cli.core: Modules found from index for 'functionapp': ['azure.cli.command_modules.appservice', 'azure.cli.command_modules.serviceconnector']
DEBUG: cli.azure.cli.core: Loading command modules:
DEBUG: cli.azure.cli.core: Name                  Load Time    Groups  Commands
DEBUG: cli.azure.cli.core: appservice                0.198        73       260
DEBUG: cli.azure.cli.core: serviceconnector          0.045        16       235
DEBUG: cli.azure.cli.core: Total (2)                 0.242        89       495
DEBUG: cli.azure.cli.core: These extensions are not installed and will be skipped: ['azext_ai_examples']
DEBUG: cli.azure.cli.core: Loading extensions:
DEBUG: cli.azure.cli.core: Name                  Load Time    Groups  Commands  Directory
DEBUG: cli.azure.cli.core: next                      0.006         1         1  C:\Users\dehe\.azure\cliextensions\next
DEBUG: cli.azure.cli.core: Total (1)                 0.006         1         1  
DEBUG: cli.azure.cli.core: Loaded 88 groups, 496 commands.
DEBUG: cli.azure.cli.core: Found a match in the command table.
DEBUG: cli.azure.cli.core: Raw command  : functionapp config appsettings list
DEBUG: cli.azure.cli.core: Command table: functionapp config appsettings list
DEBUG: cli.knack.cli: Event: CommandInvoker.OnPreCommandTableTruncate [<function AzCliLogging.init_command_file_logging at 0x000001C72D39A160>]
DEBUG: cli.azure.cli.core.azlogging: metadata file logging enabled - writing logs to 'C:\Users\dehe\.azure\commands\2024-02-07.08-32-09.functionapp_config_appsetti
ngs_list.12604.log'.
INFO: az_command_data_logger: command args: functionapp config appsettings list --ids {} --debug
DEBUG: cli.knack.cli: Event: CommandInvoker.OnPreArgumentLoad [<function register_global_subscription_argument.<locals>.add_subscription_parameter at 0x000001C72D3
CE480>]
DEBUG: cli.knack.cli: Event: CommandInvoker.OnPostArgumentLoad []
DEBUG: cli.knack.cli: Event: CommandInvoker.OnPostCommandTableCreate [<function register_ids_argument.<locals>.add_ids_arguments at 0x000001C72D3F4540>, <function 
register_cache_arguments.<locals>.add_cache_arguments at 0x000001C72D3F4680>]
DEBUG: cli.knack.cli: Event: CommandInvoker.OnCommandTableLoaded []
DEBUG: cli.knack.cli: Event: CommandInvoker.OnPreParseArgs []
DEBUG: cli.azure.cli.core.command_recommender: "--ids" is an invalid parameter for command "functionapp config appsettings list".
DEBUG: urllib3.connectionpool: Starting new HTTPS connection (1): app.aladdin.microsoft.com:443
DEBUG: urllib3.connectionpool: https://app.aladdin.microsoft.com:443 "GET /api/v1.0/suggestions?query=%7B%22command%22%3A+%22functionapp+config+appsettings+list%22
%2C+%22parameters%22%3A+%22%22%7D&clientType=AzureCli&context=%7B%22versionNumber%22%3A+%222.56.0%22%2C+%22errorType%22%3A+%22MissingRequiredParameters%22%2C+%22co
rrelationId%22%3A+%221894625c-7aa6-455f-a853-b44d7b920bf9%22%2C+%22subscriptionId%22%3A+%22794a6ca8-4e39-470e-9e4e-80a33aecd8e9%22%2C+%22eventId%22%3A+%222208e39c-
b08f-41b0-bf22-a08cf44e9a97%22%7D HTTP/1.1" 200 None
DEBUG: cli.azure.cli.core.command_recommender: "--ids" is an invalid parameter for command "functionapp config appsettings list".
DEBUG: cli.azure.cli.core.azclierror: NoneType: None
ERROR: cli.azure.cli.core.azclierror: the following arguments are required: --resource-group/-g, --name/-n
ERROR: az_command_data_logger: the following arguments are required: --resource-group/-g, --name/-n
Examples from AI knowledge base:
az functionapp config appsettings list --name MyWebapp --resource-group MyResourceGroup
Show settings for a function app. (autogenerated)
az functionapp config appsettings list --name MyWebapp --resource-group MyResourceGroup --slot staging
Show settings for a function app. (autogenerated)
https://docs.microsoft.com/en-US/cli/azure/functionapp/config/appsettings#az_functionapp_config_appsettings_list
Read more about the command in reference docs
DEBUG: cli.knack.cli: Event: Cli.PostExecute [<function AzCliLogging.deinit_cmd_metadata_logging at 0x000001C72D39A3E0>]
INFO: az_command_data_logger: exit code: 2
INFO: cli.__main__: Command ran in 1.880 seconds (init: 0.309, invoke: 1.571)
INFO: telemetry.main: Begin splitting cli events and extra events, total events: 1
INFO: telemetry.client: Accumulated 0 events. Flush the clients.
INFO: telemetry.main: Finish splitting cli events and extra events, cli events: 1
INFO: telemetry.save: Save telemetry record of length 3722 in cache
INFO: telemetry.main: Begin creating telemetry upload process.
INFO: telemetry.process: Creating upload process: "C:\Program Files\Microsoft SDKs\Azure\CLI2\python.exe C:\Program Files\Microsoft SDKs\Azure\CLI2\Lib\site-packag
es\azure\cli\telemetry\__init__.pyc C:\Users\dehe\.azure"
INFO: telemetry.process: Return from creating process
INFO: telemetry.main: Finish creating telemetry upload process.


Expected behavior

As for many other az functionapp commands, I expect to either use --ids or (--name AND --resource-group, and possibly --subscription) to target the functionapp in question.
--ids seems convenient to use, but it does not work here

Environment Summary

{
"azure-cli": "2.56.0",
"azure-cli-core": "2.56.0",
"azure-cli-telemetry": "1.1.0",
"extensions": {
"interactive": "0.5.3",
"next": "0.1.3"
}
}

Additional context

No response

@DK-Dennis DK-Dennis added the bug This issue requires a change to an existing behavior in the product in order to be resolved. label Feb 7, 2024
Copy link

Hi @DK-Dennis,

2.56.0 is not the latest Azure CLI(2.57.0).

If you haven't already attempted to do so, please upgrade to the latest Azure CLI version by following https://learn.microsoft.com/en-us/cli/azure/update-azure-cli.

@azure-client-tools-bot-prd azure-client-tools-bot-prd bot added the Auto-Resolve Auto resolve by bot label Feb 7, 2024
@yonzhan
Copy link
Collaborator

yonzhan commented Feb 7, 2024

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

@yonzhan yonzhan added Functions az functionapp Service Attention This issue is responsible by Azure service team. labels Feb 7, 2024
Copy link
Contributor

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @AnatoliB, @Francisco-Gamino, @shreyabatra4.

@DK-Dennis
Copy link
Author

FYI: I've just upgraded to
{
"azure-cli": "2.57.0",
"azure-cli-core": "2.57.0",
"azure-cli-telemetry": "1.1.0",
"extensions": {
"interactive": "0.5.3",
"next": "0.1.3"
}
}
I seemingly get the same results

@DK-Dennis
Copy link
Author

Is there somewhere else, I can (or should) report this issue, please? It's been more than two months now..

Copy link

Hi @DK-Dennis
Find similar issue #23383.

Issue title az webapp config appsettings list should support the optional parameter --ids
Create time 2022-07-29
Comment number 2

Please confirm if this resolves your issue.

Copy link
Contributor

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @AnatoliB, @Francisco-Gamino, @shreyabatra4.

@DK-Dennis
Copy link
Author

Hi @DK-Dennis Find similar issue #23383.

Issue title az webapp config appsettings list should support the optional parameter --ids
Create time 2022-07-29
Comment number 2
Please confirm if this resolves your issue.

Sadly/ironically, it only confirms my growing suspicion, that nothing good is ever going to come out of this, and that your reference documentation is really only a statement of intent.
Please also fix the bot, that wastes my time by making me look at issues that have no solution in them...

@DK-Dennis
Copy link
Author

Never mind, jokes is probably on me, as I can no longer find the documentation that states --ids kan be used for the list command.
I will, however, support the feature request, that was lnked as similar, as it would bring some consistancy to the command structure.

Kindest regards,
Dennis

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Auto-Resolve Auto resolve by bot bug This issue requires a change to an existing behavior in the product in order to be resolved. Functions az functionapp Service Attention This issue is responsible by Azure service team. Similar-Issue
Projects
None yet
Development

No branches or pull requests

2 participants