Open AlexMasson opened 3 months ago
Hi @AlexMasson , The issue seems similar to the other one where we're currently working on a fix.
Meanwhile the az resource update
command you mentioned in additional context should work, can you try that command once similar to how we suggested here https://github.com/Azure/azure-functions-on-container-apps/issues/53#issuecomment-2133530698 and let me know if that works. Thanks!
Hi @vivekjilla and thank you for your answer.
Unfortunattely this is not working. I get a Operation returned an invalid status 'Bad Request'
when I execute the given command.
When I go to the Activity Log in Azure Portal, I can see this error : DefaultHostName is invalid. DefaultHostName is not supported for Azure Functions on Azure Container apps. Please retry the operation without DefaultHostName.
.
Also, I can only execute this command in bash, this is not working in powershell :
'<acr name>.azurecr.io' is not recognized as an internal or external command,
operable program or batch file.
The command :
az resource update --name "xxx" --resource-group "xxx" --resource-type 'Microsoft.Web/sites/config' --set properties.linuxFxVersion="DOCKER|<acr name>.azurecr.io/xxx:1.36.0-beta.2"
I had a different issue when running the az resource update
. In my case, because I have access to multiple subscriptions, it was selecting the wrong one by default, which resulted in an AuthorizationFailed
error. Providing the additional parameter --subscription name
solved the problem.
az resource update \
-g <resource group name> \
-n <function app name>/config/web \
--subscription <subscription> \
--resource-type 'Microsoft.Web/sites/config' \
--set properties.linuxFxVersion="DOCKER|<acr name>.azurecr.io/azure-functions/dotnet8-quickstart-demo:1.0"
Hi @AlexMasson, apologies for late response here. I see one difference in your command for --name
parameter.
We should append /config/web
after the function app name, like --name <functionappname>/config/web
, when using az resource update
command for this usecase. Can you please try that option and let us know if that helps.
Hi @vivekjilla and thank you for your answer.
It worked, but unfortunately only once, when I executed this command independently from my computer.
From our azure devops pipelines, I now come across the same error as the issue I created :
Cannot modify this site because another operation is in progress. Details: Id: f60469b7-9d75-4cb4-b402-60455acef476, OperationName: ContainerAppUpdateAppSettings, CreatedTime: 6/19/2024 7:10:24 AM, RequestId: 029ce9d0-bb09-43cf-ba73-b66817fd991b, EntityType: 3
We have 2 steps in our pipelines :
To update the app settings, we use the following command, which works:
az webapp config appsettings set --resource-group "xxx" --name "xxx" --settings "@xxx.txt" --output "none"
Is there a workaround also to update our appsettings as well as the image?
Hi @AlexMasson, can we try introducing a delay of 2 mins between two steps to unblock for now.
Hi @vivekjilla and sorry for the delay. This is working thank you, it will do the job for now.
Which trigger/binding are you using? All of them
Which language are you using? C#
Expected behavior The image is updated without error.
Actual behavior
To Reproduce function-aca.txt (change extension to .bicep).
function-aca.bicep
.az functionapp config container set --name "amntest-funcapp" --resource-group "amn-test" --image "mcr.microsoft.com/azure-functions/dotnet-isolated:4-dotnet-isolated8.0" --output "none"
Logs Here are the verbose logs from AzCli :
Additional context I also try with the AzCli command
az resource patch --name "core-bi-func-dev-migration" --resource-group "imago-core-bi-dev-rg" --properties '{ \"siteConfig\": { \"linuxFxVersion\": \"DOCKER|imago.azurecr.io/core-bi-function-core-bi:1.36.0-beta.2\" } }'
but then I get this error :