Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error "unable to decode argument" if return nil from child workflow #1016

Open
uskyt opened this issue Aug 10, 2020 · 2 comments
Open

Error "unable to decode argument" if return nil from child workflow #1016

uskyt opened this issue Aug 10, 2020 · 2 comments
Assignees
Labels

Comments

@uskyt
Copy link

uskyt commented Aug 10, 2020

Describe the bug
I am writing a cadence workflow that starts some child workflows like this:

var result interface{}
workflow.ExecuteChildWorkflow(childCtx, MyWorkflowName, arg1, arg2).Get(childCtx, &result)

But this fails if the workflows return nil as result.
I get "unable to decode argument: %d, %v, with json error: %v" from cadence/internal/encoding.go:67.
Specifically unable to decode argument: 0, *interface {}, with json error: EOF

To Reproduce
Can be easily reproduced as described above.

Additional context
The problem is similar to the one solved in this issue: #943

@uskyt uskyt changed the title Getting nil result from child workflow fails with "unable to decode argument" error Error "unable to decode argument" if return nil from child workflow Aug 10, 2020
@vytautas-karpavicius vytautas-karpavicius self-assigned this Aug 10, 2020
@vytautas-karpavicius
Copy link
Contributor

Reproduced. However this only occurs with return type of interface{}. Any other type works fine.

@xn3cr0nx
Copy link

Hello @vytautas-karpavicius, facing this issue while trying to implement a generic child workflow invocation (similar to dsl from samples) and interface type is required to support most of the cases. Taking into account it was fixed for activities, I'm not sure why a fix for this was not taken into account, not clear from your response above. Any chance this can be fixed?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants