Azure / azure-cli-extensions

Public Repository for Extensions of Azure CLI.
https://docs.microsoft.com/en-us/cli/azure
MIT License
384 stars 1.25k forks source link

Latest `redisenterprise` module attempts to use API that is not available #8033

Open crispygoth opened 2 months ago

crispygoth commented 2 months ago

Describe the bug

Version 1.1.0 of the redisenterprise module appears to be trying to use API version 2024-09-01-preview, that is not currently available.

Related command

az redisenterprise show

Errors

(NoRegisteredProviderFound) No registered resource provider found for location 'uksouth' and API version '2024-09-01-preview' for type 'redisEnterprise'. The supported api-versions are '2024-06-01-preview, 2024-03-01-preview, 2024-02-01, 2023-11-01, 2023-10-01-preview, 2023-07-01, 2023-03-01-preview, 2022-11-01-preview, 2022-01-01, 2021-08-01, 2021-03-01, 2021-02-01-preview, 2020-04-01-preview, 2020-10-01-preview'. The supported locations are 'eastus, swedencentral, westeurope, westus, eastus2, westus2, westus3, northcentralus, southcentralus, uksouth, southeastasia, australiaeast, northeurope, centralus, centralindia, westcentralus, canadacentral, brazilsouth, japaneast, eastasia, germanywestcentral'. Code: NoRegisteredProviderFound Message: No registered resource provider found for location 'uksouth' and API version '2024-09-01-preview' for type 'redisEnterprise'. The supported api-versions are '2024-06-01-preview, 2024-03-01-preview, 2024-02-01, 2023-11-01, 2023-10-01-preview, 2023-07-01, 2023-03-01-preview, 2022-11-01-preview, 2022-01-01, 2021-08-01, 2021-03-01, 2021-02-01-preview, 2020-04-01-preview, 2020-10-01-preview'. The supported locations are 'eastus, swedencentral, westeurope, westus, eastus2, westus2, westus3, northcentralus, southcentralus, uksouth, southeastasia, australiaeast, northeurope, centralus, centralindia, westcentralus, canadacentral, brazilsouth, japaneast, eastasia, germanywestcentral'.

Issue script & Debug output

DEBUG: cli.knack.cli: Command arguments: ['redisenterprise', 'show', '-g', 'XXX', '-n', 'XXX', '--debug'] 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 0x7f29c43f80e0>, <function OutputProducer.on_global_arguments at 0x7f29c43a62a0>, <function CLIQuery.on_global_arguments at 0x7f29c41bbd80>] DEBUG: cli.knack.cli: Event: CommandInvoker.OnPreCommandTableCreate [] DEBUG: cli.azure.cli.core: Modules found from index for 'redisenterprise': ['azext_redisenterprise'] DEBUG: cli.azure.cli.core: Loading command modules: DEBUG: cli.azure.cli.core: Name Load Time Groups Commands DEBUG: cli.azure.cli.core: Total (0) 0.000 0 0 DEBUG: cli.azure.cli.core: These extensions are not installed and will be skipped: ['azext_ai_examples', 'azext_next'] DEBUG: cli.azure.cli.core: Loading extensions: DEBUG: cli.azure.cli.core: Name Load Time Groups Commands Directory DEBUG: cli.azure.cli.core: redisenterprise 0.132 3 18 /home/chris.butler/.azure/cliextensions/redisenterprise DEBUG: cli.azure.cli.core: Total (1) 0.132 3 18 DEBUG: cli.azure.cli.core: Loaded 3 groups, 18 commands. DEBUG: cli.azure.cli.core: Found a match in the command table. DEBUG: cli.azure.cli.core: Raw command : redisenterprise show DEBUG: cli.azure.cli.core: Command table: redisenterprise show DEBUG: cli.knack.cli: Event: CommandInvoker.OnPreCommandTableTruncate [<function AzCliLogging.init_command_file_logging at 0x7f29c3480ea0>] DEBUG: cli.azure.cli.core.azlogging: metadata file logging enabled - writing logs to '/home/chris.butler/.azure/commands/2024-09-26.19-57-35.redisenterprise_show.3828388.log'. INFO: az_command_data_logger: command args: redisenterprise show -g {} -n {} --debug DEBUG: cli.knack.cli: Event: CommandInvoker.OnPreArgumentLoad [<function register_global_subscription_argument..add_subscription_parameter at 0x7f29c34d1f80>] DEBUG: cli.knack.cli: Event: CommandInvoker.OnPostArgumentLoad [] DEBUG: cli.knack.cli: Event: CommandInvoker.OnPostCommandTableCreate [<function register_ids_argument..add_ids_arguments at 0x7f29c34ed1c0>, <function register_cache_arguments..add_cache_arguments at 0x7f29c34ed300>] DEBUG: cli.knack.cli: Event: CommandInvoker.OnCommandTableLoaded [] DEBUG: cli.knack.cli: Event: CommandInvoker.OnPreParseArgs [] DEBUG: cli.knack.cli: Event: CommandInvoker.OnPostParseArgs [<function OutputProducer.handle_output_argument at 0x7f29c43a6340>, <function CLIQuery.handle_query_parameter at 0x7f29c41bbe20>, <function register_ids_argument..parse_ids_arguments at 0x7f29c34ed260>] INFO: az_command_data_logger: extension name: redisenterprise INFO: az_command_data_logger: extension version: 1.1.0 DEBUG: cli.azure.cli.core.auth.persistence: build_persistence: location='/home/chris.butler/.azure/msal_token_cache.json', encrypt=False DEBUG: cli.azure.cli.core.auth.binary_cache: load: /home/chris.butler/.azure/msal_http_cache.bin DEBUG: urllib3.util.retry: Converted retries value: 1 -> Retry(total=1, connect=None, read=None, redirect=None, status=None) INFO: msal.authority: Initializing with Entra authority: https://login.microsoftonline.com/XXX DEBUG: msal.authority: openid_config("XXX") = XXX DEBUG: msal.application: Broker enabled? None DEBUG: cli.azure.cli.core.auth.credential_adaptor: CredentialAdaptor.get_token: scopes=('https://management.core.windows.net//.default',), kwargs={} DEBUG: cli.azure.cli.core.auth.msal_authentication: UserCredential.get_token: scopes=('https://management.core.windows.net//.default',), claims=None, kwargs={} DEBUG: msal.application: Cache hit an AT DEBUG: msal.telemetry: Generate or reuse correlation_id: efa919b5-9ec7-4867-b371-c5fc8f3eae30 DEBUG: cli.azure.cli.core.sdk.policies: Request URL: 'https://management.azure.com/subscriptions/XXX/resourceGroups/XXX/providers/Microsoft.Cache/redisEnterprise/XXX?api-version=2024-09-01-preview' DEBUG: cli.azure.cli.core.sdk.policies: Request method: 'GET' DEBUG: cli.azure.cli.core.sdk.policies: Request headers: DEBUG: cli.azure.cli.core.sdk.policies: 'Accept': 'application/json' DEBUG: cli.azure.cli.core.sdk.policies: 'x-ms-client-request-id': '92e960ed-7c41-11ef-b4ca-19e32589e997' DEBUG: cli.azure.cli.core.sdk.policies: 'CommandName': 'redisenterprise show' DEBUG: cli.azure.cli.core.sdk.policies: 'ParameterSetName': '-g -n --debug' DEBUG: cli.azure.cli.core.sdk.policies: 'User-Agent': 'AZURECLI/2.61.0 (DEB) azsdk-python-core/1.28.0 Python/3.11.8 (Linux-5.15.0-1071-azure-x86_64-with-glibc2.31)' DEBUG: cli.azure.cli.core.sdk.policies: 'Authorization': '**' DEBUG: cli.azure.cli.core.sdk.policies: Request body: DEBUG: cli.azure.cli.core.sdk.policies: This request has no body DEBUG: urllib3.connectionpool: Starting new HTTPS connection (1): management.azure.com:443 DEBUG: urllib3.connectionpool: https://management.azure.com:443 "GET /subscriptions/XXX/resourceGroups/XXX/providers/Microsoft.Cache/redisEnterprise/XXX?api-version=2024-09-01-preview HTTP/1.1" 400 742 DEBUG: cli.azure.cli.core.sdk.policies: Response status: 400 DEBUG: cli.azure.cli.core.sdk.policies: Response headers: DEBUG: cli.azure.cli.core.sdk.policies: 'Cache-Control': 'no-cache' DEBUG: cli.azure.cli.core.sdk.policies: 'Pragma': 'no-cache' DEBUG: cli.azure.cli.core.sdk.policies: 'Content-Length': '742' DEBUG: cli.azure.cli.core.sdk.policies: 'Content-Type': 'application/json; charset=utf-8' DEBUG: cli.azure.cli.core.sdk.policies: 'Expires': '-1' DEBUG: cli.azure.cli.core.sdk.policies: 'x-ms-failure-cause': 'gateway' DEBUG: cli.azure.cli.core.sdk.policies: 'x-ms-request-id': 'a0f77740-f42e-4393-9774-34c25a09297c' DEBUG: cli.azure.cli.core.sdk.policies: 'x-ms-correlation-request-id': 'a0f77740-f42e-4393-9774-34c25a09297c' DEBUG: cli.azure.cli.core.sdk.policies: 'x-ms-routing-request-id': 'UKSOUTH:20240926T195735Z:a0f77740-f42e-4393-9774-34c25a09297c' DEBUG: cli.azure.cli.core.sdk.policies: 'Strict-Transport-Security': 'max-age=31536000; includeSubDomains' DEBUG: cli.azure.cli.core.sdk.policies: 'X-Content-Type-Options': 'nosniff' DEBUG: cli.azure.cli.core.sdk.policies: 'X-Cache': 'CONFIG_NOCACHE' DEBUG: cli.azure.cli.core.sdk.policies: 'X-MSEdge-Ref': 'Ref A: E015CB4FE54247AFBC289911EC1E0684 Ref B: AMS231032609021 Ref C: 2024-09-26T19:57:35Z' DEBUG: cli.azure.cli.core.sdk.policies: 'Date': 'Thu, 26 Sep 2024 19:57:34 GMT' DEBUG: cli.azure.cli.core.sdk.policies: Response content: DEBUG: cli.azure.cli.core.sdk.policies: {"error":{"code":"NoRegisteredProviderFound","message":"No registered resource provider found for location 'uksouth' and API version '2024-09-01-preview' for type 'redisEnterprise'. The supported api-versions are '2024-06-01-preview, 2024-03-01-preview, 2024-02-01, 2023-11-01, 2023-10-01-preview, 2023-07-01, 2023-03-01-preview, 2022-11-01-preview, 2022-01-01, 2021-08-01, 2021-03-01, 2021-02-01-preview, 2020-04-01-preview, 2020-10-01-preview'. The supported locations are 'eastus, swedencentral, westeurope, westus, eastus2, westus2, westus3, northcentralus, southcentralus, uksouth, southeastasia, australiaeast, northeurope, centralus, centralindia, westcentralus, canadacentral, brazilsouth, japaneast, eastasia, germanywestcentral'."}} DEBUG: cli.azure.cli.core.azclierror: Traceback (most recent call last): File "/opt/az/lib/python3.11/site-packages/knack/cli.py", line 233, in invoke cmd_result = self.invocation.execute(args) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/az/lib/python3.11/site-packages/azure/cli/core/commands/init.py", line 664, in execute raise ex File "/opt/az/lib/python3.11/site-packages/azure/cli/core/commands/init.py", line 731, in _run_jobs_serially results.append(self._run_job(expanded_arg, cmd_copy)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/az/lib/python3.11/site-packages/azure/cli/core/commands/init.py", line 701, in _run_job result = cmd_copy(params) ^^^^^^^^^^^^^^^^ File "/opt/az/lib/python3.11/site-packages/azure/cli/core/commands/init.py", line 334, in call return self.handler(args, kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/az/lib/python3.11/site-packages/azure/cli/core/commands/command_operation.py", line 363, in handler show_exception_handler(ex) File "/opt/az/lib/python3.11/site-packages/azure/cli/core/commands/arm.py", line 432, in show_exception_handler raise ex File "/opt/az/lib/python3.11/site-packages/azure/cli/core/commands/command_operation.py", line 361, in handler return op(*command_args) ^^^^^^^^^^^^^^^^^^ File "/home/chris.butler/.azure/cliextensions/redisenterprise/azext_redisenterprise/custom.py", line 225, in redisenterprise_show cluster = _ClusterShow(cli_ctx=cmd.cli_ctx)(command_args={ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/az/lib/python3.11/site-packages/azure/cli/core/aaz/_command.py", line 155, in call return self._handler(args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/chris.butler/.azure/cliextensions/redisenterprise/azext_redisenterprise/aaz/latest/redisenterprise/_show.py", line 30, in _handler self._execute_operations() File "/home/chris.butler/.azure/cliextensions/redisenterprise/azext_redisenterprise/aaz/latest/redisenterprise/_show.py", line 60, in _execute_operations self.RedisEnterpriseGet(ctx=self.ctx)() File "/home/chris.butler/.azure/cliextensions/redisenterprise/azext_redisenterprise/aaz/latest/redisenterprise/_show.py", line 84, in call return self.on_error(session.http_response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/az/lib/python3.11/site-packages/azure/cli/core/aaz/_operation.py", line 332, in on_error raise HttpResponseError(response=response, error_format=error_format) azure.core.exceptions.HttpResponseError: (NoRegisteredProviderFound) No registered resource provider found for location 'uksouth' and API version '2024-09-01-preview' for type 'redisEnterprise'. The supported api-versions are '2024-06-01-preview, 2024-03-01-preview, 2024-02-01, 2023-11-01, 2023-10-01-preview, 2023-07-01, 2023-03-01-preview, 2022-11-01-preview, 2022-01-01, 2021-08-01, 2021-03-01, 2021-02-01-preview, 2020-04-01-preview, 2020-10-01-preview'. The supported locations are 'eastus, swedencentral, westeurope, westus, eastus2, westus2, westus3, northcentralus, southcentralus, uksouth, southeastasia, australiaeast, northeurope, centralus, centralindia, westcentralus, canadacentral, brazilsouth, japaneast, eastasia, germanywestcentral'. Code: NoRegisteredProviderFound Message: No registered resource provider found for location 'uksouth' and API version '2024-09-01-preview' for type 'redisEnterprise'. The supported api-versions are '2024-06-01-preview, 2024-03-01-preview, 2024-02-01, 2023-11-01, 2023-10-01-preview, 2023-07-01, 2023-03-01-preview, 2022-11-01-preview, 2022-01-01, 2021-08-01, 2021-03-01, 2021-02-01-preview, 2020-04-01-preview, 2020-10-01-preview'. The supported locations are 'eastus, swedencentral, westeurope, westus, eastus2, westus2, westus3, northcentralus, southcentralus, uksouth, southeastasia, australiaeast, northeurope, centralus, centralindia, westcentralus, canadacentral, brazilsouth, japaneast, eastasia, germanywestcentral'.

ERROR: cli.azure.cli.core.azclierror: (NoRegisteredProviderFound) No registered resource provider found for location 'uksouth' and API version '2024-09-01-preview' for type 'redisEnterprise'. The supported api-versions are '2024-06-01-preview, 2024-03-01-preview, 2024-02-01, 2023-11-01, 2023-10-01-preview, 2023-07-01, 2023-03-01-preview, 2022-11-01-preview, 2022-01-01, 2021-08-01, 2021-03-01, 2021-02-01-preview, 2020-04-01-preview, 2020-10-01-preview'. The supported locations are 'eastus, swedencentral, westeurope, westus, eastus2, westus2, westus3, northcentralus, southcentralus, uksouth, southeastasia, australiaeast, northeurope, centralus, centralindia, westcentralus, canadacentral, brazilsouth, japaneast, eastasia, germanywestcentral'. Code: NoRegisteredProviderFound Message: No registered resource provider found for location 'uksouth' and API version '2024-09-01-preview' for type 'redisEnterprise'. The supported api-versions are '2024-06-01-preview, 2024-03-01-preview, 2024-02-01, 2023-11-01, 2023-10-01-preview, 2023-07-01, 2023-03-01-preview, 2022-11-01-preview, 2022-01-01, 2021-08-01, 2021-03-01, 2021-02-01-preview, 2020-04-01-preview, 2020-10-01-preview'. The supported locations are 'eastus, swedencentral, westeurope, westus, eastus2, westus2, westus3, northcentralus, southcentralus, uksouth, southeastasia, australiaeast, northeurope, centralus, centralindia, westcentralus, canadacentral, brazilsouth, japaneast, eastasia, germanywestcentral'. ERROR: az_command_data_logger: (NoRegisteredProviderFound) No registered resource provider found for location 'uksouth' and API version '2024-09-01-preview' for type 'redisEnterprise'. The supported api-versions are '2024-06-01-preview, 2024-03-01-preview, 2024-02-01, 2023-11-01, 2023-10-01-preview, 2023-07-01, 2023-03-01-preview, 2022-11-01-preview, 2022-01-01, 2021-08-01, 2021-03-01, 2021-02-01-preview, 2020-04-01-preview, 2020-10-01-preview'. The supported locations are 'eastus, swedencentral, westeurope, westus, eastus2, westus2, westus3, northcentralus, southcentralus, uksouth, southeastasia, australiaeast, northeurope, centralus, centralindia, westcentralus, canadacentral, brazilsouth, japaneast, eastasia, germanywestcentral'. Code: NoRegisteredProviderFound Message: No registered resource provider found for location 'uksouth' and API version '2024-09-01-preview' for type 'redisEnterprise'. The supported api-versions are '2024-06-01-preview, 2024-03-01-preview, 2024-02-01, 2023-11-01, 2023-10-01-preview, 2023-07-01, 2023-03-01-preview, 2022-11-01-preview, 2022-01-01, 2021-08-01, 2021-03-01, 2021-02-01-preview, 2020-04-01-preview, 2020-10-01-preview'. The supported locations are 'eastus, swedencentral, westeurope, westus, eastus2, westus2, westus3, northcentralus, southcentralus, uksouth, southeastasia, australiaeast, northeurope, centralus, centralindia, westcentralus, canadacentral, brazilsouth, japaneast, eastasia, germanywestcentral'. DEBUG: cli.knack.cli: Event: Cli.PostExecute [<function AzCliLogging.deinit_cmd_metadata_logging at 0x7f29c3481120>] INFO: az_command_data_logger: exit code: 1 INFO: cli.main: Command ran in 0.578 seconds (init: 0.248, invoke: 0.329) 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 5332 in cache INFO: telemetry.main: Begin creating telemetry upload process. INFO: telemetry.process: Creating upload process: "/opt/az/bin/python3 /opt/az/lib/python3.11/site-packages/azure/cli/telemetry/init.py /home/chris.butler/.azure" INFO: telemetry.process: Return from creating process INFO: telemetry.main: Finish creating telemetry upload process.

Expected behavior

Expected to obtain details of our Redis Enterprise cache resource

Environment Summary

azure-cli 2.61.0 *

core 2.61.0 * telemetry 1.1.0

Extensions: redisenterprise 1.1.0

Dependencies: msal 1.28.0 azure-mgmt-resource 23.1.1

Python location '/opt/az/bin/python3' Extensions directory '/home/chris.butler/.azure/cliextensions' Python (Linux) 3.11.8 (main, May 16 2024, 03:47:41) [GCC 9.4.0]

Legal docs and information: aka.ms/AzureCliLegal

                                                                                                                                                                                                             You have 2 update(s) available. Consider updating your CLI installation with 'az upgrade'

Additional context

No response

yonzhan commented 2 months ago

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

priyankarking commented 1 month ago

Pls revert to old version, we are working on fixing this: image

priyankarking commented 1 month ago

This issue is applicable to both 1.1.0 and 1.2.0. Pls use 1.0.0 meanwhile until this bug is closed.