azure-pipelines-tasks: AzureWebAppContainerV1 incorrectly sets 'windowsFxVersion' for linux container
Required Information
Type: Bug
Task Name: AzureWebAppContainer
Issue Description
When a Linux Web App with kind: app,linux,container
does not have linuxFxVersion set (as can happen with an ARM Template), the AzureWebAppContainer incorrectly sets windowsFxVersion instead. This is difficult to debug as the deployment succeeds but the site does not come up.
However, if linuxFxVersion is set to a placeholder value (such as “DOCKER|alpine”) it will correctly be updated. (So there is a workaround).
Explicitly setting a placeholder value is undesirable for many workflows. For example:
- Run an ARM template to ensure the web app exists (this would overwrite the linuxFxVersion to be the placeholder; normally in incremental mode you would not expect the resource to change)
- …additional steps… (failure here leaves the placeholder running!)
- Run this step to deploy the latest version of a docker image (this would overwrite the linuxFxVersion again)
Since the kind reliably indicates the OS, it seems very odd that the wrong configuration setting is updated.
Task logs
Trying to update App Service Configuration settings. Data: {"appCommandLine":null,"windowsFxVersion":"DOCKER|p***:latest"}
Updated App Service Configuration settings.
Restarting App Service: app-...
App Service 'app-...' restarted successfully.
About this issue
- Original URL
- State: open
- Created 3 years ago
- Reactions: 18
- Comments: 30 (7 by maintainers)
How can this issue be swept under the carpet? This is clearly blocking deployment of Linux container.
Just FYI, I switched to the
AzureRmWebAppDeployment@4
task in DevOps, that does it correctly:Due to inactivity we are closing this. If it is still exists please raise a new bug
I’ve hit this issue recently also. I have some Bicep templates that I am using to deploy App Service resources (and other things) within a pipeline, and do not want to set
linuxFxVersion
in the Bicep template because I want that to happen later on in the pipeline via theAzureWebAppContainer
task.If I don’t set
linuxFxVersion
when the App Service is created theAzureWebAppContainer
task ends up settingwindowsFxVersion
i.e. the task output includes:Trying to update App Service Configuration settings. Data: {"appCommandLine":null,"windowsFxVersion":"DOCKER|undefined"}
.As per the issue description, setting a placeholder
linuxFxVersion
on the App Service does workaround this, but it’s not something I want to maintain.I have also now switched to use
az webapp config container set
as per this comment, and that’s settinglinuxFxVersion
fine and has unblocked me for now.In case it’s helpful to have an example, I have switched this:
To this:
@PhilipsonJoseph This issue is still outstanding. As you note above, any ARM template deployed without
linuxFxVersion
startingDOCKER|
stripscontainer
from thekind
soapp,linux,container
becomesapp,linux
. This is easily worked around by not using an exact string match for the OS type lookup, or instead case-insensitively searching “linux” in thekind
so that a match occurs when falling back to the suppliedkind
when the Map misses. I’ll raise a PR.@nadesu @PhilipsonJoseph @v-nagarajku do you know when we might see a review for this one line correction and an update to the task?
I ask as this is currently blocking my team from being able to use this task as intended, and we will need to make alternative plans if we think this may take some time to make it’s way out.
Thank you.
I still have this issue when using AzureRmWebAppDeployment@4.
When I update the Tag of a container which runs as “app,linux,container”, the AzureRmWebAppDeployment@4 process updates the “LinuxFxVersion”. But when I open the container settings in Azure Portal, it seems that the container runs the “WindowsFxVersion” which isn’t updated.
As a workaround, I now also explicitly set the “SiteConfig” Properties when running the AzureRmWebAppDeployment@4. And this works. When updating the tag of a container, it now downloads this correct version when starting the container.
This is my Task now:
I just spent an hour debugging this as well. The
kind
was set toapp,linux
and that seemingly caused the image to be written toWindowsFxVersion
I used the Azure CLI to set the
LinuxFxVersion
, which then updated thekind
toapp,linux,container
, but the deployment task keeps updating theWindowsFxVersion
, maybe because that setting is still populated as well?Is there a way to reset the
WindowsFxVersion
?We’ve also just hit this after spending the afternoon trying to work out why our DevOps deployed image wasn’t working. Same issue.