Azure-Functions icon indicating copy to clipboard operation
Azure-Functions copied to clipboard

Pipelines Fail Deploying Dotnet Isolated Linux Function App (Consumption)

Open Jordan-Murray opened this issue 3 years ago • 7 comments

Hi there.

Issue - Intermitant Deploying of Donet Isolated Linux Function App (Consumption)

We're trying to use Azure Pipelines to publish and deploy a Function App to Azure.

  • .NET 6 - Isolated
  • Linux
  • Consumption

Our YAML pipeline is correct as it's worked in many other cases. The error we get can be seen in the screenshot below PipelineFail

Occasionally the pipeline would succeed, without changing anything, however, the functions would not actually be loaded if you looked in the Function App in the Azure Portal nor callable via Postman.

Publishing via Visual Studio would also intermittently work, sometimes succeeding, sometimes failing because of a ZipDeploy error. However, when the VS publishing occasionally worked, it would deploy and publish correctly, with all functions showing up in Azure and targetable. StackTrace

The only workaround we've found is to use a Windows function app instead of Linux.

Function App Configuration

SCM_DO_BUILD_DURING_DEPLOYMENT - 0 FUNCTIONS_WORKER_RUNTIME - dotnet-isolated

Jordan-Murray avatar Jan 12 '23 14:01 Jordan-Murray

I can also duplicate this easily. Simply create a dotnet-isolated Linux function within a consumption plan, create a brand new function using visual studio and then try and deploy using a ADO pipeline and I get the exact same issue. Can provide access to repo/pipelines if required.

tomaustin700 avatar Jan 13 '23 10:01 tomaustin700

This issue suggests that it's not possible to do a zip deployment to a Linux consumption plan function: https://github.com/microsoft/azure-pipelines-tasks/issues/13885

It's also documented here: https://learn.microsoft.com/en-us/azure/azure-functions/functions-deployment-technologies#external-package-url under External Package Url.

It would be good if the error produced mentions that this is a problem, does this need addressing in the AzureFunctionApp Azure DevOps task?

tomaustin700 avatar Jan 13 '23 10:01 tomaustin700

Yes, it appears that zip deployment is not currently supported for Linux consumption plan functions, as noted in the issue you linked and in the documentation you provided. This limitation is likely due to the way that Linux consumption plan functions are designed and managed, which may not be compatible with the zip deployment process.

It would be helpful if the error message produced by the Azure Function App Azure DevOps task more clearly communicated this limitation, rather than implying that there is a problem with the deployment itself. If you would like to see this addressed, you can submit a feature request or suggestion to the Azure DevOps team through the Azure DevOps Developer Community or the Azure DevOps UserVoice forum.

bhagyshricompany avatar Jan 17 '23 16:01 bhagyshricompany

@patelchandni confirm your comment and validate

bhagyshricompany avatar Jan 17 '23 17:01 bhagyshricompany

@fabiocav pls confirm and validate

bhagyshricompany avatar Feb 07 '23 09:02 bhagyshricompany

Yes, it appears that zip deployment is not currently supported for Linux consumption plan functions, as noted in the issue you linked and in the documentation you provided. This limitation is likely due to the way that Linux consumption plan functions are designed and managed, which may not be compatible with the zip deployment process.

It would be helpful if the error message produced by the Azure Function App Azure DevOps task more clearly communicated this limitation, rather than implying that there is a problem with the deployment itself. If you would like to see this addressed, you can submit a feature request or suggestion to the Azure DevOps team through the Azure DevOps Developer Community or the Azure DevOps UserVoice forum.

Docs say otherwise. https://learn.microsoft.com/en-us/azure/azure-functions/functions-deployment-technologies?tabs=windows#deployment-technology-availability

rf-0 avatar Oct 31 '23 18:10 rf-0

any updates here? there seems to be a mismatch in the documentation between what @tomaustin700 and @rf-0 posted...

fabge avatar Jul 22 '24 10:07 fabge