Azure / azure-cli

Azure Command-Line Interface
MIT License
4.03k stars 3k forks source link

CLI command does not work: az logic workflow show --resource-group ddd_prjct_lgcapp_rg --name TestWorkflow #30358

Open viveksingh050283 opened 3 hours ago

viveksingh050283 commented 3 hours ago

Describe the bug

CLI command does not work: az logic workflow show --resource-group ddd_prjct_lgcapp_rg --name TestWorkflow

This CLI command "az logic workflow show" does not work with an existing resourcegroup and LogicApp's workflow and throw error: (ResourceNotFound) The Resource 'Microsoft.Logic/workflows/TestWorkflow' under resource group 'ddd_prjct_lgcapp_rg' was not found. For more details please go to https://aka.ms/ARMResourceNotFoundFix

Related command

C:\Users\user2>az logic workflow show --resource-group ddd_prjct_lgcapp_rg --name TestWorkflow

Errors

(ResourceNotFound) The Resource 'Microsoft.Logic/workflows/TestWorkflow' under resource group 'ddd_prjct_lgcapp_rg' was not found. For more details please go to https://aka.ms/ARMResourceNotFoundFix

Issue script & Debug output

C:\Users\user2>az logic workflow show --resource-group ddd_prjct_rg --name TestWorkflow --debug cli.knack.cli: Command arguments: ['logic', 'workflow', 'show', '--resource-group', 'ddd_prjct_rg', '--name', ' TestWorkflow', '--debug'] cli.knack.cli: init debug log: Enable color in terminal. Enable VT mode. cli.knack.cli: Event: Cli.PreExecute [] cli.knack.cli: Event: CommandParser.OnGlobalArgumentsCreate [<function CLILogging.on_global_arguments at 0x000002D6C50DB2E0>, <function OutputProducer.on_global_arguments at 0x000002D6C547C040>, <function CLIQuery.on_global_arguments at 0x000002D6C54A1440>] cli.knack.cli: Event: CommandInvoker.OnPreCommandTableCreate [] cli.azure.cli.core: Modules found from index for 'logic': ['azext_logic'] cli.azure.cli.core: Loading command modules: cli.azure.cli.core: Name Load Time Groups Commands cli.azure.cli.core: Total (0) 0.000 0 0 cli.azure.cli.core: These extensions are not installed and will be skipped: ['azext_ai_examples', 'azext_next'] cli.azure.cli.core: Loading extensions: cli.azure.cli.core: Name Load Time Groups Commands Directory cli.azure.cli.core: logic 0.590 7 16 C:\Users\user2.azure\cliextensions\logic cli.azure.cli.core: Total (1) 0.590 7 16 cli.azure.cli.core: Loaded 7 groups, 16 commands. cli.azure.cli.core: Found a match in the command table. cli.azure.cli.core: Raw command : logic workflow show cli.azure.cli.core: Command table: logic workflow show cli.knack.cli: Event: CommandInvoker.OnPreCommandTableTruncate [<function AzCliLogging.init_command_file_logging at 0x000002D6C6219940>] cli.azure.cli.core.azlogging: metadata file logging enabled - writing logs to 'C:\Users\user2.azure\commands\2024-11-14.45-45-90.logic_workflow_show.1188.log'. az_command_data_logger: command args: logic workflow show --resource-group {} --name {} --debug cli.knack.cli: Event: CommandInvoker.OnPreArgumentLoad [<function register_global_subscription_argument..add_subscription_parameter at 0x000002D6C6262F20>] cli.knack.cli: Event: CommandInvoker.OnPostArgumentLoad [] cli.knack.cli: Event: CommandInvoker.OnPostCommandTableCreate [<function register_ids_argument..add_ids_arguments at 0x000002D6C6281300>, <function register_cache_arguments..add_cache_arguments at 0x000002D6C6281440>, <function register_upcoming_breaking_change_info..update_breaking_change_info at 0x000002D6C62814E0>] cli.knack.cli: Event: CommandInvoker.OnCommandTableLoaded [] cli.knack.cli: Event: CommandInvoker.OnPreParseArgs [] cli.knack.cli: Event: CommandInvoker.OnPostParseArgs [<function OutputProducer.handle_output_argument at 0x000002D6C547C0E0>, <function CLIQuery.handle_query_parameter at 0x000002D6C54A14E0>, <function register_ids_argument..parse_ids_arguments at 0x000002D6C62813A0>] az_command_data_logger: extension name: logic az_command_data_logger: extension version: 1.1.0 cli.azure.cli.core.auth.persistence: build_persistence: location='C:\Users\user2\.azure\msal_token_cache.bin', encrypt=True cli.azure.cli.core.auth.binary_cache: load: C:\Users\user2.azure\msal_http_cache.bin urllib3.util.retry: Converted retries value: 1 -> Retry(total=1, connect=None, read=None, redirect=None, status=None) msal.authority: Initializing with Entra authority: https://login.microsoftonline.com/254254-54-545-96d9-54254242 msal.authority: openid_config("https://login.microsoftonline.com/254254-54-545-96d9-54254242/v2.0/.well-known/openid-configuration") = {'token_endpoint': 'https://login.microsoftonline.com/254254-54-545-96d9-54254242/oauth2/v2.0/token', 'token_endpoint_auth_methods_supported': ['client_secret_post', 'private_key_jwt', 'client_secret_basic'], 'jwks_uri': 'https://login.microsoftonline.com/254254-54-545-96d9-54254242/discovery/v2.0/keys', 'response_modes_supported': ['query', 'fragment', 'form_post'], 'subject_types_supported': ['pairwise'], 'id_token_signing_alg_values_supported': ['RS256'], 'response_types_supported': ['code', 'id_token', 'code id_token', 'id_token token'], 'scopes_supported': ['openid', 'profile', 'email', 'offline_access'], 'issuer': 'https://login.microsoftonline.com/254254-54-545-96d9-54254242/v2.0', 'request_uri_parameter_supported': False, 'userinfo_endpoint': 'https://graph.microsoft.com/oidc/userinfo', 'authorization_endpoint': 'https://login.microsoftonline.com/254254-54-545-96d9-54254242/oauth2/v2.0/authorize', 'device_authorization_endpoint': 'https://login.microsoftonline.com/254254-54-545-96d9-54254242/oauth2/v2.0/devicecode', 'http_logout_supported': True, 'frontchannel_logout_supported': True, 'end_session_endpoint': 'https://login.microsoftonline.com/254254-54-545-96d9-54254242/oauth2/v2.0/logout', 'claims_supported': ['sub', 'iss', 'cloud_instance_name', 'cloud_instance_host_name', 'cloud_graph_host_name', 'msgraph_host', 'aud', 'exp', 'iat', 'auth_time', 'acr', 'nonce', 'preferred_username', 'name', 'tid', 'ver', 'at_hash', 'c_hash', 'email'], 'kerberos_endpoint': 'https://login.microsoftonline.com/254254-54-545-96d9-54254242/kerberos', 'tenant_region_scope': 'NA', 'cloud_instance_name': 'microsoftonline.com', 'cloud_graph_host_name': 'graph.windows.net', 'msgraph_host': 'graph.microsoft.com', 'rbac_url': 'https://pas.windows.net'} msal.application: Broker enabled? True cli.azure.cli.core.auth.credential_adaptor: CredentialAdaptor.get_token: scopes=('https://management.core.windows.net//.default',), kwargs={} cli.azure.cli.core.auth.msal_credentials: UserCredential.get_token: scopes=('https://management.core.windows.net//.default',), claims=None, kwargs={} msal.application: Cache hit an AT msal.telemetry: Generate or reuse correlation_id: 254254-54-545-96d9-54254242 cli.azure.cli.core.sdk.policies: Request URL: 'https://management.azure.com/subscriptions/254254-54-545-96d9-54254242/resourceGroups/ddd_prjct_rg/providers/Microsoft.Logic/workflows/ TestWorkflow?api-version=2019-05-01' cli.azure.cli.core.sdk.policies: Request method: 'GET' cli.azure.cli.core.sdk.policies: Request headers: cli.azure.cli.core.sdk.policies: 'Accept': 'application/json' cli.azure.cli.core.sdk.policies: 'x-ms-client-request-id': '254254-54-545-96d9-54254242' cli.azure.cli.core.sdk.policies: 'CommandName': 'logic workflow show' cli.azure.cli.core.sdk.policies: 'ParameterSetName': '--resource-group --name --debug' cli.azure.cli.core.sdk.policies: 'User-Agent': 'AZURECLI/2.66.0 (MSI) azsdk-python-core/1.31.0 Python/3.12.7 (Windows-11-10.0.22621-SP0)' cli.azure.cli.core.sdk.policies: 'Authorization': '*****' cli.azure.cli.core.sdk.policies: Request body: cli.azure.cli.core.sdk.policies: This request has no body urllib3.connectionpool: Starting new HTTPS connection (1): management.azure.com:443 urllib3.connectionpool: https://management.azure.com:443 "GET /subscriptions/254254-54-545-96d9-54254242/resourceGroups/ddd_prjct_rg/providers/Microsoft.Logic/workflows/ TestWorkflow?api-version=2019-05-01 HTTP/1.1" 404 247 cli.azure.cli.core.sdk.policies: Response status: 404 cli.azure.cli.core.sdk.policies: Response headers: cli.azure.cli.core.sdk.policies: 'Cache-Control': 'no-cache' cli.azure.cli.core.sdk.policies: 'Pragma': 'no-cache' cli.azure.cli.core.sdk.policies: 'Content-Length': '247' cli.azure.cli.core.sdk.policies: 'Content-Type': 'application/json; charset=utf-8' cli.azure.cli.core.sdk.policies: 'Expires': '-1' cli.azure.cli.core.sdk.policies: 'x-ms-failure-cause': 'gateway' cli.azure.cli.core.sdk.policies: 'x-ms-request-id': '22253156-7845947739534-93bd692a3813' cli.azure.cli.core.sdk.policies: 'x-ms-correlation-request-id': '22253156-6bc8-0990909-93bd692a3813' cli.azure.cli.core.sdk.policies: 'x-ms-routing-request-id': 'SOUTHCENTRALUS:2000000000000000022253156-absg-4bgh-b56b-93b0000003813' cli.azure.cli.core.sdk.policies: 'Strict-Transport-Security': 'max-age=31536000; includeSubDomains' cli.azure.cli.core.sdk.policies: 'X-Content-Type-Options': 'nosniff' cli.azure.cli.core.sdk.policies: 'X-Cache': 'CONFIG_NOCACHE' cli.azure.cli.core.sdk.policies: 'X-MSEdge-Ref': 'Ref A: 40836ABDA00000004A3234F Ref B: SN4AA200000009 Ref C: 2024-11-14T22:52:23Z' cli.azure.cli.core.sdk.policies: 'Date': 'Thu, 14 Nov 2024 22:52:23 GMT' cli.azure.cli.core.sdk.policies: Response content: cli.azure.cli.core.sdk.policies: {"error":{"code":"ResourceNotFound","message":"The Resource 'Microsoft.Logic/workflows/ TestWorkflow' under resource group 'ddd_prjct_rg' was not found. For more details please go to https://aka.ms/ARMResourceNotFoundFix"}} cli.azure.cli.core.azclierror: Traceback (most recent call last): File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\knack/cli.py", line 233, in invoke File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/init.py", line 666, in execute File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/init.py", line 733, in _run_jobs_serially File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/init.py", line 703, in _run_job File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/aaz/_command.py", line 155, in call File "C:\Users\user2.azure\cliextensions\logic\azext_logic\aaz\latest\logic\workflow_show.py", line 33, in _handler self._execute_operations() File "C:\Users\user2.azure\cliextensions\logic\azext_logic\aaz\latest\logic\workflow_show.py", line 60, in _execute_operations self.WorkflowsGet(ctx=self.ctx)() File "C:\Users\user2.azure\cliextensions\logic\azext_logic\aaz\latest\logic\workflow_show.py", line 84, in call return self.on_error(session.http_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/aaz/_operation.py", line 329, in on_error azure.core.exceptions.ResourceNotFoundError: (ResourceNotFound) The Resource 'Microsoft.Logic/workflows/ TestWorkflow' under resource group 'ddd_prjct_rg' was not found. For more details please go to https://aka.ms/ARMResourceNotFoundFix Code: ResourceNotFound Message: The Resource 'Microsoft.Logic/workflows/ TestWorkflow' under resource group 'ddd_prjct_rg' was not found. For more details please go to https://aka.ms/ARMResourceNotFoundFix

Expected behavior

The command should show the details of the workflow that is provided in the command.

Environment Summary

development

Additional context

No response

yonzhan commented 3 hours ago

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

microsoft-github-policy-service[bot] commented 3 hours ago

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @wsilveiranz.