azure-functions-python-worker icon indicating copy to clipboard operation
azure-functions-python-worker copied to clipboard

Naming for templates is different for python V1 and V2 functions

Open hallvictoria opened this issue 1 year ago • 0 comments

For multiple templates, the template names are different between V1 and V2 apps. For example, for V1 apps, running func new --template "Azure Event Hub Trigger" --name myFunction works successfully. However, for V2, running the same command throws this error: Screenshot 2023-11-21 163803

For V2 apps, the EventHub Trigger is supported and can be created by calling func new --template "EventHub trigger" --name myFunction instead. Screenshot 2023-11-21 163934

Can the template names be consistent with both V1 and V2 apps so that func new --template "Azure Event Hub Trigger" --name myFunction works for V2 functions as well?

Steps to reproduce:

  1. Install Core Tools v4.0.5455
  2. Run func init az-functions
  3. Run func new --template "Azure Event Hub trigger" --name myFunction -- this does not work and throws the Object reference not set to an instance of an object. error
  4. Run func new --template "EventHub trigger" --name myFunction -- this works.

Expected Behaviour: The EventHub trigger is created when the template name is "Azure Event Hub trigger"

Actual Behaviour: Object reference not set to an instance of an object error is returned.

hallvictoria avatar Nov 21 '23 22:11 hallvictoria