Azure / Azure/azure-cli

az extension list-available not listing publicly available extensions. Cannot add extension

Open
#27,293 3 comments 0 reactions 0 assignees View on GitHub
Auto-Assign bug Connected Kubernetes Service Attention
Dominant language
Python
Stars
4.6k
Forks
3.5k
Avg merge
3d 10h
Merged PRs (30d)
64

Description

### Describe the bug

Unable to add any extension. Only one extension is showing after running "`az extension list-available --output table`"
Name Version Summary Preview Experimental Installed
---------- --------- --------------------------------------- --------- -------------- -----------
azure-edge 0.0.3a2 The Azure Edge extension for Azure CLI. True False True

As a result, I am unable to add any new extensions as the extension cannot be found. For example:
`az extension add --name connectedk8s`
No extension found with name 'connectedk8s'

I tried uninstalling and reinstalling Azure CLI with no success.

### Related command

az extension list-available --output table
az extension add --name connectedk8s

### Errors

az extension list-available --output table
Name Version Summary Preview Experimental Installed
---------- --------- --------------------------------------- --------- -------------- -----------
azure-edge 0.0.3a2 The Azure Edge extension for Azure CLI. True False True

### Issue script & Debug output

`az extension list-available --output table --debug`
cli.knack.cli: Command arguments: ['extension', 'list-available', '--output', 'table', '--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 [, , ]
cli.knack.cli: Event: CommandInvoker.OnPreCommandTableCreate []
cli.azure.cli.core: Modules found from index for 'extension': ['azure.cli.command_modules.extension']
cli.azure.cli.core: Loading command modules:
cli.azure.cli.core: Name Load Time Groups Commands
cli.azure.cli.core: extension 0.005 1 7
cli.azure.cli.core: Total (1) 0.005 1 7
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: Total (0) 0.000 0 0
cli.azure.cli.core: Loaded 1 groups, 7 commands.
cli.azure.cli.core: Found a match in the command table.
cli.azure.cli.core: Raw command : extension list-available
cli.azure.cli.core: Command table: extension list
cli.azure.cli.core: remaining : available
cli.knack.cli: Event: CommandInvoker.OnPreCommandTableTruncate []
cli.azure.cli.core.azlogging: metadata file logging enabled - writing logs to 'C:\Users\alainuyidi\.azure\commands\2023-08-30.07-47-04.extension_list-available.26484.log'.
az_command_data_logger: command args: extension list-available --output {} --debug
cli.knack.cli: Event: CommandInvoker.OnPreArgumentLoad [.add_subscription_parameter at 0x000001F22DF46F80>]
cli.knack.cli: Event: CommandInvoker.OnPostArgumentLoad []
cli.knack.cli: Event: CommandInvoker.OnPostCommandTableCreate [.add_ids_arguments at 0x000001F22DFA4F70>, .add_cache_arguments at 0x000001F22DFA5090>]
cli.knack.cli: Event: CommandInvoker.OnCommandTableLoaded []
cli.knack.cli: Event: CommandInvoker.OnPreParseArgs []
cli.knack.cli: Event: CommandInvoker.OnPostParseArgs [, , .parse_ids_arguments at 0x000001F22DFA5000>]
urllib3.connectionpool: Starting new HTTPS connection (1): ***:443
urllib3.connectionpool: https://***:443 "GET /***/index.json HTTP/1.1" 200 13042
cli.knack.cli: Event: CommandInvoker.OnTransformResult [, ]
cli.knack.cli: Event: CommandInvoker.OnFilterResult []
Name Version Summary Preview Experimental Installed
---------- --------- --------------------------------------- --------- -------------- -----------
azure-edge 0.0.3a2 The Azure Edge extension for Azure CLI. True False True
cli.knack.cli: Event: Cli.SuccessfulExecute []
cli.knack.cli: Event: Cli.PostExecute []
az_command_data_logger: exit code: 0
cli.__main__: Command ran in 1.734 seconds (init: 0.964, invoke: 0.770)
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 3338 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\alainuyidi\.azure"
telemetry.process: Return from creating process
telemetry.main: Finish creating telemetry upload process.

--------------

`az extension add --name connectedk8s --debug`
cli.knack.cli: Command arguments: ['extension', 'add', '--name', 'connectedk8s', '--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 [, , ]
cli.knack.cli: Event: CommandInvoker.OnPreCommandTableCreate []
cli.azure.cli.core: Modules found from index for 'extension': ['azure.cli.command_modules.extension']
cli.azure.cli.core: Loading command modules:
cli.azure.cli.core: Name Load Time Groups Commands
cli.azure.cli.core: extension 0.004 1 7
cli.azure.cli.core: Total (1) 0.004 1 7
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: Total (0) 0.000 0 0
cli.azure.cli.core: Loaded 1 groups, 7 commands.
cli.azure.cli.core: Found a match in the command table.
cli.azure.cli.core: Raw command : extension add
cli.azure.cli.core: Command table: extension add
cli.knack.cli: Event: CommandInvoker.OnPreCommandTableTruncate []
cli.azure.cli.core.azlogging: metadata file logging enabled - writing logs to 'C:\Users\alainuyidi\.azure\commands\2023-08-30.07-53-58.extension_add.12152.log'.
az_command_data_logger: command args: extension add --name {} --debug
cli.knack.cli: Event: CommandInvoker.OnPreArgumentLoad [.add_subscription_parameter at 0x0000021F0F9E6F80>]
cli.knack.cli: Event: CommandInvoker.OnPostArgumentLoad []
cli.knack.cli: Event: CommandInvoker.OnPostCommandTableCreate [.add_ids_arguments at 0x0000021F0FA44F70>, .add_cache_arguments at 0x0000021F0FA45090>]
cli.knack.cli: Event: CommandInvoker.OnCommandTableLoaded []
cli.knack.cli: Event: CommandInvoker.OnPreParseArgs []
cli.knack.cli: Event: CommandInvoker.OnPostParseArgs [, , .parse_ids_arguments at 0x0000021F0FA45000>]
urllib3.connectionpool: Starting new HTTPS connection (1): azedgecli.blob.core.windows.net:443

### Expected behavior

The **`az extension list-available`** command provides a list of all publicly available extensions.

### Environment Summary

az --version
azure-cli 2.51.0

core 2.51.0
telemetry 1.1.0

Extensions:
account 0.2.1
azure-edge 0.0.3a2
azure-iot 0.21.1
ssh 1.1.2
webpubsub 1.1.0

Dependencies:
msal 1.24.0b1
azure-mgmt-resource 23.1.0b2

Python location 'C:\Program Files\Microsoft SDKs\Azure\CLI2\python.exe'
Extensions directory 'C:\Users\\.azure\cliextensions'

Python (Windows) 3.10.10 (tags/v3.10.10:aad5f6a, Feb 7 2023, 17:20:36) [MSC v.1929 64 bit (AMD64)]

Legal docs and information: aka.ms/AzureCliLegal

### Additional context

Original had the 32-bit version of azure-cli 2.51.0 installed. Installed the 64-bit version but have the same issue.

Contributor guide

Open the contributing guide

Research direction

Start by reproducing `az extension list-available --output table --debug` and `az extension add --name connectedk8s --debug` on the reported Azure CLI 2.51.0 Windows environment. Inspect the extension index request shown in the debug output and the extension command implementation; done means publicly available extensions such as `connectedk8s` are listed and can be added successfully.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, python
Domain
cli, cloud
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.