Skip to content

Conversation

@nytian
Copy link
Contributor

@nytian nytian commented Nov 17, 2023

Fix issue #454

When the history event tasks return None, error will be thrown since None could not be passed to json.loads.
Add the condition check for history event returns so that if the return is None, the python SDK will just pass None to durable extension without json deserialization.

@nytian nytian requested a review from davidmrdavid as a code owner November 17, 2023 00:18
@nytian nytian changed the title Fix activity function None return Fix History Event None Return Nov 17, 2023
@nytian nytian requested a review from cgillum November 17, 2023 01:39
@cgillum
Copy link
Member

cgillum commented Nov 17, 2023

Can we add a test case that verifies the fix?

Copy link
Collaborator

@davidmrdavid davidmrdavid left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The change looks good to me, but let's add a test as Chris noticed :) . Thank you for the quick prototype here.

@nytian
Copy link
Contributor Author

nytian commented Nov 17, 2023

Added unit test that an orchestrator schedules an activity function which can return None. Let me know if the naming or any changes is unclear. Thanks for the reviews again! @cgillum @davidmrdavid

@nytian nytian requested a review from davidmrdavid November 17, 2023 21:08
@nytian nytian merged commit b30d0a6 into dev Nov 27, 2023
@nytian nytian deleted the nytian/fix-activity-return branch January 29, 2024 04:21
greenie-msft pushed a commit to greenie-msft/azure-functions-durable-python that referenced this pull request Sep 25, 2025
* check activity return not none

* avoid long line

* add check for subo and event

* fix indent

* update by review

* add unit test for call activity with none return

* update test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants