-
Notifications
You must be signed in to change notification settings - Fork 107
Closed
Labels
engineeringEngineering improvement. Has no user impact.Engineering improvement. Has no user impact.event-grid
Milestone
Description
In the process of updating the documentation for the Event Grid output binding (see this PR), I discovered that the output binding does not work correctly with Python functions. It does work correctly for .NET and Node.js. (Note I have opened a separate issue to log that this doesn't work for Java either.)
- I used this function.json and this function code.
- When I ran the function, I got this error:
Result: Failure
Exception: FunctionLoadError: cannot load the MyFunction function: Python return annotation "EventGridEvent" does not match binding type "eventGrid"
Stack: File "/azure-functions-host/workers/python/3.7/LINUX/X64/azure_functions_worker/dispatcher.py", line 245, in _handle__function_load_request
function_id, func, func_request.metadata)
File "/azure-functions-host/workers/python/3.7/LINUX/X64/azure_functions_worker/functions.py", line 241, in add_function
f'Python return annotation "{return_pytype.__name__}" '
- I wonder if the issue is that the binding extension bundle does not include a reference to the
eventGrid
output binding (only toeventGridTrigger
) - I have no idea how this works though, and if it's sufficient to simply put a PR adding that one line to theextensions.json
or if something more needs to be done to wire it up.
Hazhzeng
Metadata
Metadata
Assignees
Labels
engineeringEngineering improvement. Has no user impact.Engineering improvement. Has no user impact.event-grid