Closed BillmanH closed 7 months ago
Thanks for reporting .Will check and update.Thanks
Hi @BillmanH, could you please provide a screenshot of your app code and the full error logs that show up? Thanks
I am also seeing this issue with Durable Functions orchestrator. Verbose logging doesn't return any additional information outside of what was originally reported.
Func CLI Version: 4.0.5455
@hallvictoria , sure. Here you go:
Not really any logs to call out.
@hallvictoria , This is the Azure Functions CLI tools. It's what you run to generate the starter code for your function. When working properly you can generate all of the files by executing the command line above. So, per your request, there is no "app code" because this is the command that would generate it. The issue wouldn't be with my application (which I haven't made yet). The issue is with the CLI core tools.
Cheers
I'm wondering if the core tools supports the event hub template. It says that it does.
Running the command:
func templates list
Returns:
Python Templates:
Azure Blob Storage trigger
Azure Cosmos DB trigger
Durable Functions activity
Durable Functions entity
Durable Functions HTTP starter
Durable Functions orchestrator
Azure Event Grid trigger
**Azure Event Hub trigger**
HTTP trigger
Kafka output
Kafka trigger
Azure Queue Storage trigger
RabbitMQ trigger
Azure Service Bus Queue trigger
Azure Service Bus Topic trigger
SQL Input Binding
SQL Output Binding
Timer trigger
However, this could just be a static list somewhere, not a list of template folders. Object reference not set to an instance of an object
could mean that it's looking for the EventHub template, but it doesn't exist in the tool. This would be bad. Hopefully MSFT can confirm. It could also mean that MSFT has removed support for the Python Event Hub Trigger, but didn't update this static list. I'm speculating here.
If so, that would explain why the timer trigger runs fine, but the EH trigger doesn't. The folder is missing in the CLI tools set.
@hallvictoria , can you confirm that this trigger is supported?
Hi @BillmanH, yes, the Event Hub trigger is supported, and the template name is Azure Event Hub trigger
. Please try running func new --template "Azure Event Hub trigger" --name myFunction
and let me know if the same issue occurs.
Thanks
Same issue.
Just to help you out I'm reproing @pyrabbit 's issue as well.
As you can see, there are more than one of the listed functions that do not work. I'm not going to go through them one by one, but you can see that some work and some don't.
By comparison, the HTTP function (the one used in the demo and tutorials) does work.
Thanks for your patience. One last thing -- does func new --template "EventHub trigger" --name myFunction
work for you?
It did,
Can you confirm for the Durable function as well? Is there some way to know the proper text string that generates the function? Or can you update the list so that a user can know what the expected text field will be? There may be other cases where the list in func templates list
differs from the string expected by the --template
argument.
Templates for Durable functions aren't supported at this moment. I agree, the list provided from func templates list
is outdated and confusing. We'll look into a fix that will make this clearer and easier to use.
Linking relevant Core Tools issues Unsupported templates: Azure/azure-functions-core-tools#3529 Inconsistent naming: Azure/azure-functions-python-worker#1427
As there are other issues opened, I can close this one. Thanks @hallvictoria for the fix and the workaround. I'm unblocked.
Investigative information
Please provide the following:
Timestamp: 11.11.2023
Function App name: Azure Event Hub trigger
new VSC, Conda updated, fresh downloads all around.
Core Tools version: 4.0.5455
Repro steps
func init az-functions
func new --template "Azure Event Hub" --name myFunction
To verify that everything else is configured correctly:
func new --template "Timer trigger" --name myFunction
The
func
tools is able to create the HTTP function but not the EventHub function. Making it impossible to work with Azure EventHub Triggers.Expected behavior
Function is created.
Actual behavior
Object reference not set to an instance of an object.
No function is createdKnown workarounds
If you can find an example of the eventhub function, you can copy and paste it manually.