Conversation
38695b0 to
642878d
Compare
| for _, actionSet := range input.WorkflowInput.InitialActions { | ||
| for _, action := range actionSet.Actions { | ||
| if nexusOp := action.GetNexusOperation(); nexusOp != nil && nexusOp.Endpoint == "" { | ||
| nexusOp.Endpoint = nexusEndpoint |
There was a problem hiding this comment.
Each test has its own worker, task queue and Nexus endpoint for isolation.
| return input.Input, nil | ||
| }) | ||
|
|
||
| var WaitForCancelOperation = temporalnexus.NewWorkflowRunOperation("wait-for-cancel", WaitForCancelWorkflow, func(ctx context.Context, _ nexus.NoValue, opts nexus.StartOperationOptions) (client.StartWorkflowOptions, error) { |
There was a problem hiding this comment.
main change: removed this
| if _, err := state.handleActionSet(ctx, actionSet); err != nil { | ||
| return "", err | ||
| } | ||
| } |
There was a problem hiding this comment.
main change: now handles workflow actions
05a3beb to
5556b8f
Compare
5556b8f to
5e75c3e
Compare
| NexusOperationScheduled {"operation":"echo-sync"} | ||
| ... | ||
| WorkflowExecutionCompleted`), | ||
| expectedUnsupportedErrs: nexusUnsupportedSDKs, |
There was a problem hiding this comment.
^ a couple of basic tests to ensure Nexus support works in kitchensink
| return client.ExecuteOperation(ctx, nexusOp.Operation, nexusOp.Input, nexusOptions) | ||
| input := &kitchensink.HandlerWorkflowInput{ | ||
| Input: nexusOp.Input, | ||
| BeforeActions: nexusOp.BeforeActions, |
There was a problem hiding this comment.
What if the handler isn't starting a workflow? In the near future we will have handlers that can do things like send updates or signals.
There was a problem hiding this comment.
Good point; the HandlerWorkflowInput name is too restrictive; I renamed it to NexusHandlerInput now.
Then there's the fact that it's typed as ActionSet. That's fairly open; e.g. it already includes a SendSignal variant (which requires a WorkflowId). I think we'll need to make some adjustments to the kitchensink model once we have that capability. I'm hesitant to make those now before we have/know more. I've added an error there now to make sure it doesn't fail silently until then.
WDYT?
What was changed
Streamlined Nexus kitchensink and add tests.
Why?
Makes it more flexible; also precursor for fuzzing support to various workflow actions inside the operation handler.
Checklist
Closes
How was this tested: