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

`az containerapp update` is not setting minreplicas to 0

Open charris-msft opened this issue 1 year ago • 9 comments

  • If the issue is to do with Azure CLI 2.0 in-particular, create an issue here at Azure/azure-cli

Related command

containerapp update

Extension name (the extension in question)

containerapp

Description of issue (in as much detail as possible)

I originally created a containerapp with a yaml file that specified minReplicas: 0

Now, I want to update minReplicas to 0 so I updated the yaml file like this:

    scale:
      minReplicas: 0
      maxReplicas: 1

and ran

az container app update ... --yaml updated.yaml

However, in the output from the command and in the portal, the minReplicas is still set to 0.

Then, I tried the following:

az containerapp update ... --min-replicas 0

The command completed successfully, but minReplicas did not get updated.

Final try - I updated minReplicas via a Revision in the Portal and that finally worked.


charris-msft avatar Sep 27 '22 12:09 charris-msft

route to CXP team

yonzhan avatar Sep 27 '22 12:09 yonzhan

@charris-msft thanks for reporting, we will investigate further. However, wanted to get a clarification, if this behavior is specific to yaml from CLI command. Does this work with ARM template or updating from portal directly? Thanks. @StrawnSC , @haroonf FYI.

panchagnula avatar Sep 27 '22 16:09 panchagnula

@panchagnula - I saw the issue with yaml from CLI and with the --min-replicas parameter from CLI (no --yaml specified). It behaved as expected when I updated in the portal. I did not try with an ARM template.

charris-msft avatar Sep 27 '22 16:09 charris-msft

@panchagnula - I saw the issue with yaml from CLI and with the --min-replicas parameter from CLI (no --yaml specified). It behaved as expected when I updated in the portal. I did not try with an ARM template.

Gotcha. Could you also provide the CLI version being used (run az --version). CLI updated recently to use the latest api-version, so I am wondering if there is a change here we need to look into. Portal still uses an older api-version. Thanks!

panchagnula avatar Sep 27 '22 17:09 panchagnula

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

Issue Details
  • If the issue is to do with Azure CLI 2.0 in-particular, create an issue here at Azure/azure-cli

Related command

containerapp update

Extension name (the extension in question)

containerapp

Description of issue (in as much detail as possible)

I originally created a containerapp with a yaml file that specified minReplicas: 0

Now, I want to update minReplicas to 0 so I updated the yaml file like this:

    scale:
      minReplicas: 0
      maxReplicas: 1

and ran

az container app update ... --yaml updated.yaml

However, in the output from the command and in the portal, the minReplicas is still set to 0.

Then, I tried the following:

az containerapp update ... --min-replicas 0

The command completed successfully, but minReplicas did not get updated.

Final try - I updated minReplicas via a Revision in the Portal and that finally worked.


Author: charris-msft
Assignees: -
Labels:

bug, Service Attention, Client, Auto-Assign, ContainerApp

Milestone: -

msftbot[bot] avatar Sep 27 '22 17:09 msftbot[bot]

 >  az --version
azure-cli                         2.40.0

core                              2.40.0
telemetry                          1.0.8

Extensions:
connectedk8s                       1.3.3
containerapp                      0.3.11
customlocation                     0.1.3
k8s-extension                      1.3.4
rdbms-connect                      1.0.3

Dependencies:
msal                            1.18.0b1
azure-mgmt-resource             21.1.0b1

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

Python (Windows) 3.10.5 (tags/v3.10.5:f377153, Jun  6 2022, 15:58:59) [MSC v.1929 32 bit (Intel)]

charris-msft avatar Sep 28 '22 00:09 charris-msft