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

[FeatureRequest] Add EventGrid source option for blob_trigger

Open jonathan-conder-sm opened this issue 2 years ago • 3 comments

This is already documented here:

  • source: Sets the source of the triggering event. Use EventGrid for an Event Grid-based blob trigger, which provides much lower latency. The default is LogsAndContainerScan, which uses the standard polling mechanism to detect changes in the container.

But blob_trigger has no such argument and BlobTrigger ignores the kwargs.

jonathan-conder-sm avatar Oct 18 '23 01:10 jonathan-conder-sm

a pr is out for https://github.com/Azure/azure-functions-python-library/issues/197.

YunchuWang avatar Dec 12 '23 23:12 YunchuWang

@jonathan-conder-sm thanks for reporting, i am able to use kwargs to specify source as EventGrid and my app is triggered properly by EventGrid blob events. image

image

image

Please ensure you follow every step defined in https://learn.microsoft.com/en-us/azure/azure-functions/functions-event-grid-blob-trigger?tabs=isolated-process%2Cnodejs-v4&pivots=programming-language-python to get it set up.

we would add native source support for it. thanks for bring that up

YunchuWang avatar Dec 13 '23 22:12 YunchuWang

@YunchuWang I don't think your example is working correctly. In the invocation details (your 2nd screenshot on the right) it is mentioned, that the blob trigger is still using LogsAndContainerScan instead of EventGrid. Incidentally, I am also trying to set this up right now and am unable to. Using your code I cannot create the Event subscription because the webhook returns a 404. Presumably, because it does not actually register an EventGrid blob trigger, as the kwarg is ignored.

Even if I am wrong about this, and EventGrid Blob Triggers are supported after all, I would highly appreciate it, if the documentation you linked could be updated with a working example for the python v2 programming model.

xanecs avatar Feb 26 '24 06:02 xanecs