Skip to content

Simplify and Test Nexus in kitchensink#298

Open
stephanos wants to merge 3 commits intomainfrom
stephanos/omes-nexus-simple
Open

Simplify and Test Nexus in kitchensink#298
stephanos wants to merge 3 commits intomainfrom
stephanos/omes-nexus-simple

Conversation

@stephanos
Copy link
Collaborator

@stephanos stephanos commented Mar 11, 2026

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

  1. Closes

  2. How was this tested:

  1. Any docs updates needed?

@stephanos stephanos requested review from a team as code owners March 11, 2026 00:55
@stephanos stephanos marked this pull request as draft March 11, 2026 00:55
@stephanos stephanos force-pushed the stephanos/omes-nexus-simple branch 2 times, most recently from 38695b0 to 642878d Compare March 11, 2026 01:07
for _, actionSet := range input.WorkflowInput.InitialActions {
for _, action := range actionSet.Actions {
if nexusOp := action.GetNexusOperation(); nexusOp != nil && nexusOp.Endpoint == "" {
nexusOp.Endpoint = nexusEndpoint
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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) {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

main change: removed this

if _, err := state.handleActionSet(ctx, actionSet); err != nil {
return "", err
}
}
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

main change: now handles workflow actions

@stephanos stephanos force-pushed the stephanos/omes-nexus-simple branch 8 times, most recently from 05a3beb to 5556b8f Compare March 11, 2026 14:33
@stephanos stephanos force-pushed the stephanos/omes-nexus-simple branch from 5556b8f to 5e75c3e Compare March 11, 2026 16:24
@stephanos stephanos marked this pull request as ready for review March 11, 2026 16:29
NexusOperationScheduled {"operation":"echo-sync"}
...
WorkflowExecutionCompleted`),
expectedUnsupportedErrs: nexusUnsupportedSDKs,
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

^ a couple of basic tests to ensure Nexus support works in kitchensink

@stephanos stephanos changed the title Simplify Nexus in kitchensink Simplify and Test Nexus in kitchensink Mar 11, 2026
return client.ExecuteOperation(ctx, nexusOp.Operation, nexusOp.Input, nexusOptions)
input := &kitchensink.HandlerWorkflowInput{
Input: nexusOp.Input,
BeforeActions: nexusOp.BeforeActions,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Collaborator Author

@stephanos stephanos Mar 12, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants