0

We have an azure function app, and it had only one function CheckPerformance before.

Now we created several new functions and in the hosts.json, I put

{
  "version": "2.0",
  "functions": [
    "V2PipelineTrigger",
   "CheckLatestPerformanceV2"
  ]
}

To my surprise, every time I deploy the code through the VSTS pipeline, the old function (CheckLatestPerformance) is enabled.

My understanding is that azure function will be discovered from this host.json. So how come the old function is constantly re-enabled?

daxu
  • 3,514
  • 5
  • 38
  • 76

1 Answers1

0

Firstly, I could not reproduce your problem, I publish three functions and only add two function values in the function.json, the function3 is not able to run.

Then it is about how to disable function, even the way you are using could implement this feature, however, this is not recommended, you could find it in this doc: functions.

Intended for use only when running locally. In function apps in Azure, you should instead follow the steps in How to disable functions in Azure Functions to disable specific functions rather than using this setting.

Further more details about how to disable functions, you could refer to this doc: How to disable functions in Azure Functions.

George Chen
  • 13,703
  • 2
  • 11
  • 26