Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Azure function deployed from package updates not visible

I'm deploying an azure function app from package (using this guide - https://learn.microsoft.com/en-us/azure/azure-functions/run-functions-from-deployment-package) - this deploys correctly. Yet I can't seem to get an update deployed. Even after I upload a new package, changes are not picked up by azure function app. I tried stopping/starting the app to no avail.

How can I force it to pick up changes?

like image 870
Aleks G Avatar asked Oct 17 '25 17:10

Aleks G


1 Answers

I ran into this issue with a newly deployed function using function v3, so this still seems to be an issue.

Short answer:
Remove the .zip in D:\home\data\SitePackages and then redeploy and your changes will get picked up.

Long answer

My setup is using ZIP deployment and WEBSITE_RUN_FROM_PACKAGE = 1.

It helps to know what happens when you use ZIP deployment:

  1. The zip file is not written to wwwroot of your site, but instead to D:\home\data\SitePackages (source: https://learn.microsoft.com/en-us/azure/azure-functions/run-functions-from-deployment-package)
  2. Then the contents of the zip file is mounted to D:\home\site\wwwroot and run from there.

For some reason, the .zip in D:\home\data\SitePackages was not being replaced, it was still the old version. To fix that, I used the Console of the App Service to delete the file before redeploying.

  1. Navigate to your App Service function and open the Console (under Development tools section)
  2. Run cd D:\home\data\SitePackages and then ls to see the files in the folder.
  3. Run a rm command to remove both the zip and text file.
  4. Redeploy your function, and you will see that changes are picked up.
like image 78
Anton Avatar answered Oct 19 '25 11:10

Anton



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!