azure-cli icon indicating copy to clipboard operation
azure-cli copied to clipboard

az containerapp up fails to create resource group when the containerapp extension is present.

Open JimacoMS4 opened this issue 1 year ago • 4 comments

Describe the bug

If a resource group is specified in an az containerapp up command, but does not exist, the command creates it if the containerapp extension is not installed. If the extension is installed, the command fails:

az containerapp up --resource-group my-fastapi-aca-rg --name my-aca-app
--ingress external --target-port 3100 --location eastus --source .
The behavior of this command has been altered by the following extension: containerapp
(ResourceGroupNotFound) Resource group 'my-fastapi-aca-rg' could not be found.

It seems like the command should behave the same regardless of whether the extension is present or not.

Related command

az extension add -n containerapp

Errors

The behavior of this command has been altered by the following extension: containerapp (ResourceGroupNotFound) Resource group 'my-fastapi-aca-rg' could not be found.

Issue script & Debug output

The command didn't create the resource group. (Debug output is too long to attach >65k characters.)

az containerapp up --resource-group my-fastapi-aca-rg --name my-aca-app --ingress external --target-port 3100 --location eastus --source .

Expected behavior

The command creates the resource group.

Environment Summary

azure-cli 2.59.0

core 2.59.0 telemetry 1.1.0

Extensions: containerapp 0.3.50 rdbms-connect 1.0.5 serviceconnector-passwordless 1.0.3

Dependencies: msal 1.27.0 azure-mgmt-resource 23.1.0b2

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

Python (Windows) 3.11.8 (tags/v3.11.8:db85d51, Feb 6 2024, 22:03:32) [MSC v.1937 64 bit (AMD64)]

Legal docs and information: aka.ms/AzureCliLegal

Your CLI is up-to-date.

Additional context

Environment output is from Windows command shell, but got the same behavior in CloudShell Bash environment.

To quickly reproduce this behavior you can follow the steps in this topic: https://learn.microsoft.com/en-us/azure/developer/python/tutorial-containerize-simple-web-app?tabs=web-app-fastapi. (You can skip the local build steps.)

JimacoMS4 avatar Apr 22 '24 22:04 JimacoMS4

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

yonzhan avatar Apr 22 '24 22:04 yonzhan

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

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

Hi @JimacoMS4

Thanks for reporting this issue. I will take a look for it.

Greedygre avatar May 10 '24 03:05 Greedygre