Problem with overwriting function.json in Azure Function

Viewed 559

I would like to ask you about solution to my current problem. First of all, I would like to emphasize that it is not duplicate even though quite similar articles can be found on stackoverflow.

Behavior of my azure function:

When configuration property "WEBSITE_RUN_FROM_PACKAGE" is set to 1, function is available in "Functions" and I get the following information:

Your app is currently in read only mode because you are running from a package file. To make any changes update the content in your zip file and WEBSITE_RUN_FROM_PACKAGE app setting.

Basing on stackoverflow articles changing the property value to 0 should make function.json editable. However I get a second information:

Your app is currently in read only mode because you have source control integration enabled.

What is more function not loger exists in "Functions" and function.json is not more available on Kudu's debugconsole in wwwroot/sites.

enter image description here

2 Answers

For the first information, you should set 0 for WEBSITE_RUN_FROM_PACKAGE.

For the 2nd information:

Your app is currently in read only mode because you have source control integration enabled.

It means that you have setup continuous deployment for your function app. You should disable it by the following steps:

Nav to azure portal -> your function app -> Deployment Center, then click the disconnect button(it might be a little different if the source is different). Here is the screenshot:

enter image description here

Remember to enable continuous deployment again after you make some changes to your function app.

As your app is deployed from github pipelines you should change properties in source code and deploy new version. If you will change WEBSITE_RUN_FROM_PACKAGE to 0, all properties will be overwritten during next deployment.

Related