Skip to content

Add nexus handler callbacks for SANO - #1926

Merged
tconley1428 merged 6 commits into
mainfrom
amazzeo/nexus-handler-callbacks-client
Oct 29, 2026
Merged

tconley1428 merged 6 commits into
mainfrom
amazzeo/nexus-handler-callbacks-client

Conversation

@VegetarianOrc

@VegetarianOrc VegetarianOrc commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

What was changed

  • NexusClient.start_operation and NexusClient.execute_operation accept a new completion_callbacks argument.
  • The new function temporalio.nexus.create_completion_callback creates a CompletionCallback. It accepts a service name and an operation name, or an on-complete operation from a service definition or a handler method. It checks that the operation takes OnCompleteRequest as input and returns OnCompleteResponse.
  • Type checkers check that each callback accepts the output type of the operation. A handler that receives RawValue accepts the output of any operation.
  • The payload visitor visits the OnCompleteRequest and OnCompleteResponse messages of the notification service.
  • The CI workflow installs NexGen 0.2.7. The tests use the v1.9.2-nexus-handler-callbacks dev server.

Why

A caller of a standalone Nexus operation can now get the outcome of the operation in a Nexus handler. When the operation finishes, the server calls an on-complete operation on a worker for the task queue of the callback. The call contains the result or the failure, and the source context that the caller supplies.

Checklist

  1. How was this tested:
  • New tests deliver success, failure, cancellation and termination outcomes to on-complete handlers on a worker.
  • New type tests check the overloads of create_completion_callback.
  1. Any docs updates?

Yes, new docs will be added in support of the Nexus handler callbacks feature.

@VegetarianOrc
VegetarianOrc added this pull request to stack #1927 October 5, 2026 18:02
@VegetarianOrc
VegetarianOrc force-pushed the amazzeo/nexus-handler-callbacks-client branch from 7a3b590 to 48b8986 Compare October 5, 2026 18:12
@VegetarianOrc
VegetarianOrc force-pushed the amazzeo/nexus-handler-callbacks-client branch from 48b8986 to 6d9c87d Compare October 5, 2026 18:43
@VegetarianOrc
VegetarianOrc force-pushed the amazzeo/nexus-handler-callbacks-client branch 3 times, most recently from 57f1c74 to 57a3126 Compare October 13, 2026 22:10
Base automatically changed from amazzeo/nexus-handler-callbacks to main October 13, 2026 23:51
@VegetarianOrc
VegetarianOrc force-pushed the amazzeo/nexus-handler-callbacks-client branch from 57a3126 to 88b1d6a Compare October 13, 2026 23:51
@VegetarianOrc
VegetarianOrc force-pushed the amazzeo/nexus-handler-callbacks-client branch from 88b1d6a to b58c7c4 Compare October 28, 2026 21:55
@VegetarianOrc
VegetarianOrc marked this pull request as ready for review October 29, 2026 16:42
@VegetarianOrc
VegetarianOrc requested a review from a team as a code owner October 29, 2026 16:42
@tconley1428

Copy link
Copy Markdown
Contributor

Just have to remove the changelog modification.

@VegetarianOrc
VegetarianOrc force-pushed the amazzeo/nexus-handler-callbacks-client branch from 02c702c to 5efa9f6 Compare October 29, 2026 17:09
@tconley1428
tconley1428 merged commit e744623 into main Oct 29, 2026
20 checks passed
@tconley1428
tconley1428 deleted the amazzeo/nexus-handler-callbacks-client branch October 29, 2026 18:23
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