Closed hallvictoria closed 5 months ago
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 85.46%. Comparing base (
7de7724
) to head (dff0911
). Report is 3 commits behind head on dev.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Attention: Patch coverage is 75.00000%
with 2 lines
in your changes are missing coverage. Please review.
Project coverage is 85.12%. Comparing base (
330783f
) to head (40c105b
). Report is 5 commits behind head on dev.:exclamation: Current head 40c105b differs from pull request most recent head ca87969. Consider uploading reports for the commit ca87969 to get more accurate results
Files | Patch % | Lines |
---|---|---|
azure_functions_worker/bindings/generic.py | 66.66% | 2 Missing :warning: |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Description
Currently, when a function is triggered, the worker expects a request body with the trigger. However, in the case of generic binding types like the Dapr Cron binding trigger, no data is sent with the trigger request. This causes the worker to crash with an exception
AttributeError: 'NoneType' object has no attribute 'type'
. This fix enables triggers to execute successfully even if the trigger calls the app without any request body.As per 1391, implicit output is enabled for generic types. Therefore, function apps with generic bindings that are also returning None will face an error
TypeError: unable to encode outgoing TypedData: unsupported type "<class 'azure_functions_worker.bindings.generic.GenericBinding'>" for Python type "NoneType"
. This changes the worker to allow this scenario.Fixes https://github.com/Azure/azure-functions-python-worker/issues/1316 Fixes https://github.com/Azure/azure-functions-python-worker/issues/1479
PR information
Quality of Code and Contribution Guidelines