functions-action: Linux Consumption Function app sync trigger fails with RBAC auth when WEBSITE_RUN_FROM_PACKAGE is already added with new URL

Hello,

When we try to deploy our node function we are getting following error:

Run Azure/functions-action@v1.4.6
Using RBAC for authentication, GitHub Action will perform resource validation.
Successfully acquired site configs from function app!
Detected function app sku: Consumption
Successfully acquired app settings from function app (RBAC)!
Detected function app language: Node
Will archive . into /home/runner/work/_temp/temp_web_package_***.zip as function app content
Will use WEBSITE_RUN_FROM_PACKAGE to deploy since RBAC is detected and your function app is on Linux Consumption.
Error: Execution Exception (state: PublishContent) (step: Invocation)
Error:   When request Azure resource at PublishContent, Sync Trigger Functionapp : Failed to perform sync trigger on function app. Function app may have malformed content. Please manually restart your function app and inspect the package from WEBSITE_RUN_FROM_PACKAGE.
Error: Deployment Failed!

When I check the WEBSITE_RUN_FROM_PACKAGE Parameter in Azure Portal, I see that the parameter is updated. Removing WEBSITE_RUN_FROM_PACKAGE from function and redeploying works.

Technical details:

  • node function
  • linux
  • RBAC Deployment
  • consumption plan

Any Idea, what could be wrong?

Cheers

About this issue

  • Original URL
  • State: open
  • Created 2 years ago
  • Reactions: 1
  • Comments: 24

Most upvoted comments

Facing the issue a well, I was wondering if anyone was able to resolve this?

Go to azure portal and remove function app setting “WEBSITE_RUN_FROM_PACKAGE”. Once it is successful, then re-deploy using publish profile instead of RBAC like here: https://github.com/Azure/actions-workflow-samples/blob/a9e4bce81a6c87e56021a480805a521403437eaf/FunctionApp/linux-python-functionapp-on-azure.yml#L46

WEBSITE_RUN_FROM_PACKAGE = 1 is not supported on Linux consumption because of which the other option is WEBSITE_RUN_FROM_PACKAGE = URL if the user wants to use a remote zip.

Using ZipDeploy path is the recommended path for Linux Consumption, and it doesn’t increase cold start.

Been experiencing this consistently for 6 months. I can run the same deployment 2 times, with this error the first time, and a successful deployment on the retry.

Using a publish profile with Zip Deploy has the issue of not preserving Linux file permissions, as described here.

Please try to deploy using publish profile instead of RBAC like here: https://github.com/Azure/actions-workflow-samples/blob/a9e4bce81a6c87e56021a480805a521403437eaf/FunctionApp/linux-python-functionapp-on-azure.yml#L46

According to my previous attempts using publish profiles, they are not compatible with WEBSITE_RUN_FROM_PACKAGE values being set, and these are necessary for package deployments. They must be set to a URL for a Linux consumption plan project according to this documentation: https://docs.microsoft.com/en-us/azure/azure-functions/run-functions-from-deployment-package#enable-functions-to-run-from-a-package