Support Run from Package feature
See original GitHub issueFirst, thanks for your work! This was a long awaited Github action and finally we can run both CI and CD workflows in Github 🚀.
If I understand it correctly, currently the Action uses zip deploy strategy where it’s copying files to the /home/site/wwwroot
directory on the Function App host machine. This is where the runtime will read files from.
I wonder if you’re planning to add support for Run from package? From what I gather it’s a preferred way to run FAs since it has some advantages (atomicity, faster cold starts, etc) over normal copy-to-home-folder strategy.
Besides, run from package seems to be ON by default when deploying with Azure Functions Core Tools. It’d be great to see consistency among the tools!
Issue Analytics
- State:
- Created 3 years ago
- Reactions:5
- Comments:12
Top Results From Across the Web
Run your functions from a package file in Azure - Microsoft Learn
Have the Azure Functions runtime run your functions by mounting a deployment package file that contains your function app project files.
Read more >How to use Azure Function with Run From Package
A detailed guide on how to setup Azure functions with Azure DevOps using Run From Package.
Read more >Deploy Web and Function Apps with Run from Package
The way "Run from Package" works is that you simply set up a special App Setting called WEBSITE_RUN_FROM_PACKAGE and its value tells App ......
Read more >Deploying to App Service that is running from package fails ...
The task became too heavy to manage and we decided to break the tasks. The new tasks are Azure Web App, Azure Web...
Read more >Deploying App Services with 'Run From Package', Azure ...
Azure App Service recently introduced a feature called Run From Package. Rather than uploading our application binaries and other files to ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Oh boy. I’ve been waiting for a while for Linux consumption plans to finally make their way to Canada. Thanks for sharing, I would not have known about this at all! Glad I didn’t get the opportunity to waste my time.
This does seem sadly representative of the state of Azure Functions as a self-serve platform. My functions are written in TypeScript, built with GitHub Actions, and deployed to Azure. It’s a full Microsoft stack, and every day it feels like a mess, with no real signs of hope.
Azure is not for the faint of heart. 😬
Inspired by @aaronadamsCA’s success, I gave it a try and here are the results. Things are definitely not as bright in the Linux land. 😅
Linux Consumption
◉ I created a fresh Function App with
WEBSITE_RUN_FROM_PACKAGE=1
app setting. Published the code with the Github Action. All action’s steps succeeded.Result: code was not deployed. There are no files in the App Files section and no functions in the Functions in the Portal.
In fact, I realized I already opened an issue to update Azure docs to reflect the fact that Linux Consumption does not support
WEBSITE_RUN_FROM_PACKAGE=1
: https://github.com/Azure/azure-functions-core-tools/issues/2356◉ I then removed the
WEBSITE_RUN_FROM_PACKAGE=1
app setting and ran the Github Action again. All action’s steps succeeded.Result: the code was deployed. I assume the files were placed directly in the
/home/site/wwwroot
.Linux Premium
◉ I created a new Function App with
WEBSITE_RUN_FROM_PACKAGE=1
app setting in a EP1 hosting plan. Published the code with the Github Action. All action’s steps succeeded.Result: code was deployed and
WEBSITE_RUN_FROM_PACKAGE=1
was respected. There is a zip file in/home/data/SitePackages
as well as apackagename.txt
referencing it.◉ I created a new Function App without
WEBSITE_RUN_FROM_PACKAGE=1
app setting in a EP1 hosting plan. Published the code with the Github Action. Run Azure Function action failed with the following error:There was no error description in the referenced logs
Result: despite the error, the code was deployed and worked. I could see files under
/home/site/wwwroot
. There was no/home/data/SitePackages
directory.I then ran the Action once again and there was no error that time. Not sure what it was.
Summary
Linux Consumption: currently Functions Action deploys directly to the
wwwroot
folder. It should useWEBSITE_RUN_FROM_PACKAGE=<url>
method by default instead (with configuration option to override if needed). Run from package is the recommended deployment method and it is the default in Azure Functions Core Tools.Linux Premium: currently Functions Action respects the
WEBSITE_RUN_FROM_PACKAGE
setting. This makes sense. It’s still inconsistent with Azure Functions Core Tools’ defaults (WEBSITE_RUN_FROM_PACKAGE=<url>
) though. But that’s probably a part of a bigger discussion of unifying the deployment tooling.