Repository navigation
fix(workflow): send falsy event data in raise_workflow_event - #1376
Open
Indian-boult wants to merge 1 commit into
Open
Indian-boult wants to merge 1 commit into
Indian-boult wants to merge 1 commit into
Conversation
raise_orchestration_event_with_result built the request input with
"if data else None" in the sync and async durabletask clients, so an
event raised with False, 0, "", [] or {} reached the workflow as None.
Both clients now set the input whenever data is not None, the same
check schedule_new_orchestration_with_result uses.
Fixes dapr#1375
Signed-off-by: Indian-boult <neeraj.khatri.work@gmail.com>
CasperGN
reviewed
Nov 20, 2026
CasperGN
left a comment
Contributor
There was a problem hiding this comment.
Thanks @Indian-boult for your interest in Dapr and for tracking this one down 🙌 Switching to data is not None in both the sync and async clients lines up with how schedule_new_orchestration_with_result already handles input. The parametrized tests covering False, 0, '', [] and {}, plus the None case, pin the behaviour down nicely 🧪
A few more notes:
- nit:
terminate_orchestrationhas the same truthiness check on its output, atclient.py#L598andaio/client.py#L382, so terminating withoutput=Falseor0drops the output in the same way. What do you think about switching those tois not Nonetoo, either here or in a follow-up? - So far DCO is the only check reported on this head. I'm happy to approve once the unit tests run green.
Drafted with AI assistance and reviewed by me.
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
raise_orchestration_event_with_resultin the sync and async durabletask clients built the event input withif data else None. An event raised withFalse,0,'',[]or{}was sent with no input, and the workflow receivedNone. Both clients now set the input wheneverdatais notNone, the same checkschedule_new_orchestration_with_resultuses in the same files.New tests in
tests/ext/workflow/durabletask/test_client.pyandtest_client_async.pysend each falsy value and check the request carries it, and check thatdata=Nonestill sends no input. The falsy cases fail on main and pass with this change. ruff and mypy are clean, and the unit tests pass apart fromtest_binarystore*.pycases that also fail now and then on a clean main.Issue reference
Please reference the issue this PR will close: #1375
Checklist