Azure / azure-cli

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

edge-zones extension broken #28891

Open Chambras opened 6 months ago

Chambras commented 6 months ago

Describe the bug

The edge-zones extension is broken for most of the commands in that extension, especially under the extended-zone section. None of the commands there are not working anymore, list, register, show, and unregister.

Related command

az edge-zones extended-zone list

Errors

(InvalidResourceNamespace) The resource namespace 'Microsoft.EdgeZones' is invalid. Code: InvalidResourceNamespace Message: The resource namespace 'Microsoft.EdgeZones' is invalid.

Issue script & Debug output

cli.knack.cli: Command arguments: ['edge-zones', 'extended-zone', 'list', '--debug'] cli.knack.cli: init debug log: Enable color in terminal. cli.knack.cli: Event: Cli.PreExecute [] cli.knack.cli: Event: CommandParser.OnGlobalArgumentsCreate [<function CLILogging.on_global_arguments at 0x000001DD7EE5B880>, <function OutputProducer.on_global_arguments at 0x000001DD7EFE6020>, <function CLIQuery.on_global_arguments at 0x000001DD7F013BA0>] cli.knack.cli: Event: CommandInvoker.OnPreCommandTableCreate [] cli.azure.cli.core: Modules found from index for 'edge-zones': ['azext_edgezones'] 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: edgezones 0.179 2 4 C:\Users\mazambra.azure\cliextensions\edgezones cli.azure.cli.core: Total (1) 0.179 2 4 cli.azure.cli.core: Loaded 2 groups, 4 commands. cli.azure.cli.core: Found a match in the command table. cli.azure.cli.core: Raw command : edge-zones extended-zone list cli.azure.cli.core: Command table: edge-zones extended-zone list cli.knack.cli: Event: CommandInvoker.OnPreCommandTableTruncate [<function AzCliLogging.init_command_file_logging at 0x000001DD01FC5EE0>] cli.azure.cli.core.azlogging: metadata file logging enabled - writing logs to 'C:\Users\mazambra.azure\commands\2024-05-06.09-54-46.edge-zones_extended-zone_list.20780.log'. az_command_data_logger: command args: edge-zones extended-zone list --debug cli.knack.cli: Event: CommandInvoker.OnPreArgumentLoad [<function register_global_subscription_argument..add_subscription_parameter at 0x000001DD020063E0>] cli.knack.cli: Event: CommandInvoker.OnPostArgumentLoad [] cli.knack.cli: Event: CommandInvoker.OnPostCommandTableCreate [<function register_ids_argument..add_ids_arguments at 0x000001DD02050400>, <function register_cache_arguments..add_cache_arguments at 0x000001DD02050540>] cli.knack.cli: Event: CommandInvoker.OnCommandTableLoaded [] cli.knack.cli: Event: CommandInvoker.OnPreParseArgs [] cli.knack.cli: Event: CommandInvoker.OnPostParseArgs [<function OutputProducer.handle_output_argument at 0x000001DD7EFE60C0>, <function CLIQuery.handle_query_parameter at 0x000001DD7F013C40>, <function register_ids_argument..parse_ids_arguments at 0x000001DD020504A0>] az_command_data_logger: extension name: edgezones az_command_data_logger: extension version: 1.0.0b1 This command is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus cli.azure.cli.core.auth.persistence: build_persistence: location='C:\Users\mazambra\.azure\service_principal_entries.bin', encrypt=True cli.azure.cli.core.auth.persistence: build_persistence: location='C:\Users\mazambra\.azure\msal_token_cache.bin', encrypt=True cli.azure.cli.core.auth.binary_cache: load: C:\Users\mazambra.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/fe1582cd-dbdd-4001-a922-9e445ddc8fc4 msal.authority: openid_config("https://login.microsoftonline.com/fe1582cd-dbdd-4001-a922-9e445ddc8fc4/v2.0/.well-known/openid-configuration") = {'token_endpoint': 'https://login.microsoftonline.com/fe1582cd-dbdd-4001-a922-9e445ddc8fc4/oauth2/v2.0/token', 'token_endpoint_auth_methods_supported': ['client_secret_post', 'private_key_jwt', 'client_secret_basic'], 'jwks_uri': 'https://login.microsoftonline.com/fe1582cd-dbdd-4001-a922-9e445ddc8fc4/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/fe1582cd-dbdd-4001-a922-9e445ddc8fc4/v2.0', 'request_uri_parameter_supported': False, 'userinfo_endpoint': 'https://graph.microsoft.com/oidc/userinfo', 'authorization_endpoint': 'https://login.microsoftonline.com/fe1582cd-dbdd-4001-a922-9e445ddc8fc4/oauth2/v2.0/authorize', 'device_authorization_endpoint': 'https://login.microsoftonline.com/fe1582cd-dbdd-4001-a922-9e445ddc8fc4/oauth2/v2.0/devicecode', 'http_logout_supported': True, 'frontchannel_logout_supported': True, 'end_session_endpoint': 'https://login.microsoftonline.com/fe1582cd-dbdd-4001-a922-9e445ddc8fc4/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/fe1582cd-dbdd-4001-a922-9e445ddc8fc4/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? None cli.azure.cli.core.auth.credential_adaptor: CredentialAdaptor.get_token: scopes=('https://management.core.windows.net//.default',), kwargs={} cli.azure.cli.core.auth.msal_authentication: ServicePrincipalCredential.get_token: scopes=('https://management.core.windows.net//.default',), kwargs={} msal.application: Cache hit an AT msal.telemetry: Generate or reuse correlation_id: 45601d24-a216-498e-9ae1-406593d0397c cli.azure.cli.core.sdk.policies: Request URL: 'https://management.azure.com/subscriptions/81ccde3f-30fc-4cc4-9c2b-3174713a9145/providers/Microsoft.EdgeZones/extendedZones?api-version=2024-04-01-preview' 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': '3299daf5-0bb0-11ef-bf9c-002248200dd6' cli.azure.cli.core.sdk.policies: 'CommandName': 'edge-zones extended-zone list' cli.azure.cli.core.sdk.policies: 'ParameterSetName': '--debug' cli.azure.cli.core.sdk.policies: 'User-Agent': 'AZURECLI/2.60.0 (MSI) azsdk-python-core/1.28.0 Python/3.11.8 (Windows-10-10.0.22631-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/81ccde3f-30fc-4cc4-9c2b-3174713a9145/providers/Microsoft.EdgeZones/extendedZones?api-version=2024-04-01-preview HTTP/1.1" 404 114 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': '114' 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': '63756bbc-a3a0-40b7-ab69-1c24b009fc09' cli.azure.cli.core.sdk.policies: 'x-ms-correlation-request-id': '63756bbc-a3a0-40b7-ab69-1c24b009fc09' cli.azure.cli.core.sdk.policies: 'x-ms-routing-request-id': 'EASTUS:20240506T135447Z:63756bbc-a3a0-40b7-ab69-1c24b009fc09' 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: 94BEC4053867463E93471261C8E2EE33 Ref B: BL2AA2010204033 Ref C: 2024-05-06T13:54:47Z' cli.azure.cli.core.sdk.policies: 'Date': 'Mon, 06 May 2024 13:54:47 GMT' cli.azure.cli.core.sdk.policies: Response content: cli.azure.cli.core.sdk.policies: {"error":{"code":"InvalidResourceNamespace","message":"The resource namespace 'Microsoft.EdgeZones' is invalid."}} 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 664, in execute File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/init.py", line 731, 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 714, in _run_job File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/aaz/_paging.py", line 87, in next File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/aaz/_paging.py", line 43, in next File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/aaz/_command.py", line 250, in executor_wrapper File "C:\Users\mazambra.azure\cliextensions\edgezones\azext_edgezones\aaz\latest\edge_zones\extended_zone_list.py", line 53, in _execute_operations self.ExtendedZonesListBySubscription(ctx=self.ctx)() File "C:\Users\mazambra.azure\cliextensions\edgezones\azext_edgezones\aaz\latest\edge_zones\extended_zone_list.py", line 78, 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: (InvalidResourceNamespace) The resource namespace 'Microsoft.EdgeZones' is invalid. Code: InvalidResourceNamespace Message: The resource namespace 'Microsoft.EdgeZones' is invalid.

cli.azure.cli.core.azclierror: (InvalidResourceNamespace) The resource namespace 'Microsoft.EdgeZones' is invalid. Code: InvalidResourceNamespace Message: The resource namespace 'Microsoft.EdgeZones' is invalid. az_command_data_logger: (InvalidResourceNamespace) The resource namespace 'Microsoft.EdgeZones' is invalid. Code: InvalidResourceNamespace Message: The resource namespace 'Microsoft.EdgeZones' is invalid. cli.knack.cli: Event: Cli.PostExecute [<function AzCliLogging.deinit_cmd_metadata_logging at 0x000001DD01FC6160>] az_command_data_logger: exit code: 3 cli.main: Command ran in 1.464 seconds (init: 0.499, invoke: 0.964) telemetry.main: Begin splitting cli events and extra events, total events: 1 telemetry.client: Accumulated 0 events. Flush the clients. telemetry.main: Finish splitting cli events and extra events, cli events: 1 telemetry.save: Save telemetry record of length 3936 in cache telemetry.main: Begin creating telemetry upload process. telemetry.process: Creating upload process: "C:\Program Files\Microsoft SDKs\Azure\CLI2\python.exe C:\Program Files\Microsoft SDKs\Azure\CLI2\Lib\site-packages\azure\cli\telemetry__init__.pyc C:\Users\mazambra.azure" telemetry.process: Return from creating process telemetry.main: Finish creating telemetry upload process.

Expected behavior

Should list the Azure Extended Zones available to a subscription.

Environment Summary

azure-cli 2.60.0

core 2.60.0 telemetry 1.1.0

Extensions: bastion 0.3.0 devcenter 5.0.0 edgezones 1.0.0b1 ssh 2.0.2

Dependencies: msal 1.28.0 azure-mgmt-resource 23.1.0b2

Additional context

No response

yonzhan commented 6 months ago

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