Skip to content

Allow adding new/ changing parameters to open workflow and not completed activity  #664

Open
@longquanzheng

Description

@longquanzheng

We want to allow that if customer is sure the code is backward-compatible.
Right now it is only allow to remove but not to add new parameters.
For workflow, it will fail the workflow right away, which is a bad behavior:

 12  WorkflowExecutionFailed   (Reason:cadenceInternal:Generic,
                                Details:[unable to decode
                                the workflow function input bytes
                                with error: unable to decode argument:
                                1, *string, with json error: EOF,
                                function name: main.Workflow],
                                DecisionTaskCompletedEventId:11)

For activity, it is also fail the activity:

2019-03-14T16:57:58.355-0700	DEBUG	internal/internal_event_handlers.go:381	ExecuteActivity	{"Domain": "samples-domain", "TaskList": "helloWorldGroup", "WorkerID": "45976@longer-C02V60N3HTDG@helloWorldGroup", "WorkflowType": "main.Workflow", "WorkflowID": "helloworld_6b7da3ca-a2a5-4156-8432-4493a130d05d", "RunID": "485659ef-52a9-4ed7-87d4-2a2edd8c7ce4", "ActivityID": "1", "ActivityType": "main.helloworldActivity"}
2019-03-14T16:58:41.150-0700	ERROR	helloworld/helloworld_workflow.go:48	Activity failed.	{"Domain": "samples-domain", "TaskList": "helloWorldGroup", "WorkerID": "45976@longer-C02V60N3HTDG@helloWorldGroup", "WorkflowType": "main.Workflow", "WorkflowID": "helloworld_6b7da3ca-a2a5-4156-8432-4493a130d05d", "RunID": "485659ef-52a9-4ed7-87d4-2a2edd8c7ce4", "error": "unable to decode the activity function input bytes with error: unable to decode argument: 1, *string, with json error: EOF for function name: main.helloworldActivity"}
main.Workflow
	/Users/longer/gocode/src/github.com/samarabbas/cadence-samples/cmd/samples/recipes/helloworld/helloworld_workflow.go:48
reflect.Value.call
	/usr/local/Cellar/go/1.12/libexec/src/reflect/value.go:447
reflect.Value.Call
	/usr/local/Cellar/go/1.12/libexec/src/reflect/value.go:308
github.com/samarabbas/cadence-samples/vendor/go.uber.org/cadence/internal.(*workflowExecutor).Execute
	/Users/longer/gocode/src/github.com/samarabbas/cadence-samples/vendor/go.uber.org/cadence/internal/internal_worker.go:789
github.com/samarabbas/cadence-samples/vendor/go.uber.org/cadence/internal.(*syncWorkflowDefinition).Execute.func1
	/Users/longer/gocode/src/github.com/samarabbas/cadence-samples/vendor/go.uber.org/cadence/internal/internal_workflow.go:406
github.com/samarabbas/cadence-samples/vendor/go.uber.org/cadence/internal.(*dispatcherImpl).newNamedCoroutine.func1
	/Users/longer/gocode/src/github.com/samarabbas/cadence-samples/vendor/go.uber.org/cadence/internal/internal_workflow.go:796

Metadata

Metadata

Assignees

No one assigned

    Labels

    customercustomer requested

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions