Closed cgillum closed 1 year ago
/cc @DeepanshuA
/assign
I'd like to expand on this bug with the following information: If a workflow definition does not include an input, i.e.
def example_workflow(ctx: wf.DaprWorkflowContext):
if not ctx.is_replaying:
print('Workflow')
yield ctx.call_activity(example_activity, input="something")
versus
def example_workflow(ctx: wf.DaprWorkflowContext, wf_input: int):
if not ctx.is_replaying:
print(f'Workflow input: {wf_input}.')
yield ctx.call_activity(example_activity, input=wf_input)
It can lead to a FAILED workflow
This has got 2 different issues enlisted:
@berndverst this issue is not fixed. It still requires the change here: https://github.com/microsoft/durabletask-python/pull/13.
Can this issue be reactivated until the Python SDK has been updated with the corresponding Durable Task SDK fix?
Expected Behavior
When calling an activity from a workflow and passing an input of
0
, it should remain a0
in the activity code.Actual Behavior
The
0
value seems to be translated intoNone
at runtime. This is likely a serialization bug either in the workflow SDK or in the underlying Durable Task Python SDK.Steps to Reproduce the Problem
Observe the output from the following code to see the problem:
The output will look something like this:
Note that the activity input value should be
0
, notNone
. It seems that workflow inputs are handled correctly.Release Note
RELEASE NOTE: FIX [Workflow] Handling of zero values in activity inputs