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

Unable to load extension 'containerapp' #28244

Closed
larrywa opened this issue Jan 24, 2024 · 7 comments
Closed

Unable to load extension 'containerapp' #28244

larrywa opened this issue Jan 24, 2024 · 7 comments
Assignees
Labels
Auto-Assign Auto assign by bot Azure CLI Team The command of the issue is owned by Azure CLI team Azure Deployments az deployment/bicep/stack/deployment-scripts/ts/group export ContainerApp Monitor az monitor question The issue doesn't require a change to the product in order to be resolved. Most issues start as that
Milestone

Comments

@larrywa
Copy link

larrywa commented Jan 24, 2024

Describe the bug

I am using Az CLI version 2.56.

I am seeing an error:

WARNING: Unable to load extension 'containerapp: cannot import name 'network_client_factory' from 'azure.cli.command_modules.network._client_factory' (C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\Lib\site-packages\azure\cli\command_modules\network_client_factory.pyc)'. Use --debug for more information.

Expanded error after debug:

DEBUG: cli.knack.cli: Event: MainLoader.OnFailedExtensionLoad []
WARNING: cli.azure.cli.core: Unable to load extension 'containerapp: cannot import name 'network_client_factory' from 'azure.cli.command_modules.network._client_factory' (C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\Lib\site-packages\azure\cli\command_modules\network_client_factory.pyc)'. Use --debug for more information.
DEBUG: cli.azure.cli.core: Traceback (most recent call last):
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/init.py", line 351, in _update_command_table_from_extensions
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/init.py", line 1081, in _load_extension_command_loader
File "D:\a_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/init.py", line 1067, in load_command_loader
File "C:\Users\larrywa.azure\cliextensions\containerapp\azext_containerapp_init
.py", line 23, in load_command_table
from azext_containerapp.commands import load_command_table
File "C:\Users\larrywa.azure\cliextensions\containerapp\azext_containerapp\commands.py", line 10, in
from ._validators import validate_ssh
File "C:\Users\larrywa.azure\cliextensions\containerapp\azext_containerapp_validators.py", line 14, in
from ._ssh_utils import ping_container_app
File "C:\Users\larrywa.azure\cliextensions\containerapp\azext_containerapp_ssh_utils.py", line 20, in
from ._utils import safe_get, is_platform_windows
File "C:\Users\larrywa.azure\cliextensions\containerapp\azext_containerapp_utils.py", line 18, in
from azure.cli.command_modules.network._client_factory import network_client_factory
ImportError: cannot import name 'network_client_factory' from 'azure.cli.command_modules.network._client_factory' (C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\Lib\site-packages\azure\cli\command_modules\network_client_factory.pyc)

When I check for the containerapp extension, it is installed.

I have also uninstalled and reinstalled the CLI.

Any idea what this error means?

Related command

The issue happens during one of these commands:
$eventHubPrimaryKey = az deployment group show -g $resourceGroupName -n event-hub-deployment --query properties.outputs.eventHubPrimaryKey.value --debug
$appInsightsKey = az deployment group show -g $resourceGroupName -n app-insights-deployment --query properties.outputs.instrumentationKey.value --debug
$appInsightsConnectionString = az monitor app-insights component show --app appInsights${suffix} -g $resourceGroupName --query connectionString --debug

Errors

Shown above

Issue script & Debug output

This information is shown above

Expected behavior

The expected behavior is to receive the values in my PS script

Environment Summary

azure-cli 2.56.0

core 2.56.0
telemetry 1.1.0

Extensions:
aks-preview 0.5.132
application-insights 1.2.0
containerapp 0.3.23

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

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

Python (Windows) 3.11.5 (tags/v3.11.5:cce6ba9, Aug 24 2023, 14:21:31) [MSC v.1936 32 bit (Intel)]

Legal docs and information: aka.ms/AzureCliLegal

Your CLI is up-to-date.

Additional context

No response

@larrywa larrywa added the bug This issue requires a change to an existing behavior in the product in order to be resolved. label Jan 24, 2024
@microsoft-github-policy-service microsoft-github-policy-service bot added Auto-Assign Auto assign by bot Monitor az monitor labels Jan 24, 2024
@microsoft-github-policy-service microsoft-github-policy-service bot added Azure CLI Team The command of the issue is owned by Azure CLI team question The issue doesn't require a change to the product in order to be resolved. Most issues start as that Azure Deployments az deployment/bicep/stack/deployment-scripts/ts/group export labels Jan 24, 2024
@yonzhan
Copy link
Collaborator

yonzhan commented Jan 24, 2024

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

@microsoft-github-policy-service microsoft-github-policy-service bot added the Service Attention This issue is responsible by Azure service team. label Jan 24, 2024
Copy link
Contributor

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

@yonzhan yonzhan added ContainerApp and removed bug This issue requires a change to an existing behavior in the product in order to be resolved. Azure CLI Team The command of the issue is owned by Azure CLI team labels Jan 24, 2024
Copy link
Contributor

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @Azure/deployments-owners.

Copy link
Contributor

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

Copy link
Contributor

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

@AllyW AllyW removed the Service Attention This issue is responsible by Azure service team. label Jan 29, 2024
@AllyW
Copy link
Member

AllyW commented Jan 29, 2024

Hi @larrywa , cause some migration happened to network sdk in azure cli 2.47.0, therefore, containerapp is influenced and needs to be upgraded to 0.32.4 or later (run az upgrade or az extension update --name containerapp).

Updates about network sdk migration, please refer to this post: #25941

@yonzhan yonzhan added this to the Backlog milestone Jan 29, 2024
@yonzhan yonzhan added the Azure CLI Team The command of the issue is owned by Azure CLI team label Jan 29, 2024
@FBoucher
Copy link

it fixed the issue for me, I no longer see that message.

@AllyW AllyW closed this as completed Mar 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Auto-Assign Auto assign by bot Azure CLI Team The command of the issue is owned by Azure CLI team Azure Deployments az deployment/bicep/stack/deployment-scripts/ts/group export ContainerApp Monitor az monitor question The issue doesn't require a change to the product in order to be resolved. Most issues start as that
Projects
None yet
Development

No branches or pull requests

4 participants