Azure / azure-functions-python-library

Azure Functions Python SDK
MIT License
147 stars 61 forks source link

add source to blob_trigger #196

Closed YunchuWang closed 2 months ago

YunchuWang commented 7 months ago

Fixes #197

Context and Problem: Issue #197 highlighted a discrepancy in the Azure Functions documentation and the actual behavior of the BlobTrigger binding. According to the documentation, the BlobTrigger binding supports a source argument that allows setting the source of the triggering event to EventGrid for lower latency. However, in practice, the BlobTrigger binding does not currently accept this argument, and the default method for detecting changes in a blob container is through the standard polling mechanism (LogsAndContainerScan).

Objective: This Pull Request aims to align the functionality of the BlobTrigger with the documented features by introducing the EventGrid source option. This will enable users to leverage Event Grid-based triggers for blob storage, providing a more efficient and lower-latency mechanism for blob event handling.

codecov[bot] commented 7 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 93.11%. Comparing base (31f3d42) to head (ef5323b).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## dev #196 +/- ## ========================================== + Coverage 93.10% 93.11% +0.01% ========================================== Files 56 56 Lines 3247 3253 +6 Branches 666 666 ========================================== + Hits 3023 3029 +6 Misses 137 137 Partials 87 87 ``` | [Flag](https://app.codecov.io/gh/Azure/azure-functions-python-library/pull/196/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Azure) | Coverage Δ | | |---|---|---| | [unittests](https://app.codecov.io/gh/Azure/azure-functions-python-library/pull/196/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Azure) | `93.08% <100.00%> (+0.01%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Azure#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov-commenter commented 3 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 93.11%. Comparing base (b85eb7a) to head (ef5323b). Report is 5 commits behind head on dev.

:exclamation: Current head ef5323b differs from pull request most recent head 2a26758. Consider uploading reports for the commit 2a26758 to get more accurate results

Additional details and impacted files ```diff @@ Coverage Diff @@ ## dev #196 +/- ## ========================================== + Coverage 93.10% 93.11% +0.01% ========================================== Files 56 56 Lines 3247 3253 +6 Branches 666 666 ========================================== + Hits 3023 3029 +6 Misses 137 137 Partials 87 87 ``` | [Flag](https://app.codecov.io/gh/Azure/azure-functions-python-library/pull/196/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Azure) | Coverage Δ | | |---|---|---| | [unittests](https://app.codecov.io/gh/Azure/azure-functions-python-library/pull/196/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Azure) | `93.08% <100.00%> (+0.01%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Azure#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.