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

az containerapp create hangs with invalid parameter --revision-suffix

Open jscheeres opened this issue 3 years ago • 6 comments

The command az containerapp create hangs infinite with invalid --revision-suffix.

Revision suffix must consist of lower case alphanumeric characters or '-', start with an alphabetic character, and end with an alphanumeric character and cannot have '--'. And a length of max 64 characters.

jscheeres avatar Sep 19 '22 14:09 jscheeres

route to CXP team

yonzhan avatar Sep 19 '22 14:09 yonzhan

@jscheeres Thank you for reaching out, we are looking into it.

RakeshMohanMSFT avatar Sep 20 '22 03:09 RakeshMohanMSFT

@jscheeres I tried creating with "--" value for suffix and it worked without any issue. Can you please share the value you were using which cause the process to hang? az containerapp update -n issue23934capp -g Issue23934 --image issue23934acr.azurecr.io/helloworld-mvc:1.0 --environment Issue23934env --ingress external --target-port 80 --registry-server issue23934acr.azurecr.io --revision-suffix "test--01" --registry-username issue23934acr --registry-password *****

RakeshMohanMSFT avatar Sep 20 '22 11:09 RakeshMohanMSFT

The command below hangs infinite because the revision-suffix does not conforms the naming convention for revision-suffix.

az containerapp create
--name xxxxx-handls-jupj
--resource-group xxxx-tst-rg
--environment xxxx-tst-cae
--image xxxx.azurecr.io/xxxx.handlers:0.3.0-40495-container-a640
--min-replicas 0
--max-replicas 1
--registry-server xxxx.azurecr.io
--registry-username xxxx
--registry-password
--cpu 0.25
--memory 0.5
--revision-suffix 0.3.0-40495-container-a640

You executed an update, which doesn't give an error, but also doesn't set the right suffix.

Also the container app gets into an invalid state.

jscheeres avatar Sep 20 '22 12:09 jscheeres

@jscheeres We are unable to reproduce this issue, please see the screenshot below. Are you using latest version of azure cli 2.40.0 and extension containerapp 0.3.11? image

RakeshMohanMSFT avatar Sep 20 '22 14:09 RakeshMohanMSFT

Ok, i upgraded de az cli to 2.40.0. And executed the following command.

image

Creating the container app is "succeeded". It took at least 15/20 minutes. The output contains the revision-suffix.

image

However when you look at the azure portal the container app does not show the revision name (yellow).

image

And the container app no revisions.

image

The parameter --revision-suffix of the az containerapp create command is accepting invallid input. Because it is not allowed to start a revision-suffix with a numeric character. Like i said in the opening post: "Revision suffix must consist of lower case alphanumeric characters or '-', start with an alphabetic character, and end with an alphanumeric character and cannot have '--'. And a length of max 64 characters."

The CLI should not accept invallid input for this parameter.

jscheeres avatar Sep 20 '22 17:09 jscheeres

@haroonf given the API is accepting this, very sure there is no validation on platform end. If this validation is something we haven't fixed on CLI, can you take care of it. Looks like CreateOrUpdate is allowing this revision name, but GET is not, hence the behavior.

panchagnula avatar Sep 27 '22 23:09 panchagnula

@jscheeres This is fixed in Containerapp-0.3.12.

RakeshMohanMSFT avatar Oct 12 '22 02:10 RakeshMohanMSFT