Add support for Stand Alone Nexus Operations#2280
Add support for Stand Alone Nexus Operations#2280Quinn-With-Two-Ns wants to merge 4 commits intotemporalio:mainfrom
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3fe42e708a
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| // ID - The business identifier of the operation. | ||
| // | ||
| // Mandatory: No default. | ||
| ID string |
There was a problem hiding this comment.
Rename start option field to OperationID for API consistency
ClientStartNexusOperationOptions introduces an ID field while the rest of the new Nexus API uses OperationID (GetNexusOperationHandleOptions, metadata structs, and the integration test callsites). This inconsistency makes normal usage patterns fail at compile time (unknown field OperationID) and effectively breaks the newly added standalone Nexus start API for callers who follow the surrounding API naming. Aligning this field name now avoids shipping an immediately incompatible public surface.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
This is to be consistent with Stand alone activities naming approach
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Reviewed by Cursor Bugbot for commit d296109. Configure here.
| } | ||
| if resp.Result != nil { | ||
| if valuePtr == nil { | ||
| return nil |
There was a problem hiding this comment.
Get skips caching result when valuePtr is nil
Medium Severity
In clientNexusOperationHandleImpl.Get, when valuePtr is nil and the poll returns a successful result, the method returns nil without caching the result in h.result. Subsequent calls to Get with a non-nil valuePtr will re-poll the server unnecessarily. The h.result assignment needs to happen before the valuePtr == nil early return, consistent with how the error path always caches before returning.
Reviewed by Cursor Bugbot for commit d296109. Configure here.
| defer cancel() | ||
|
|
||
| // Create a Nexus endpoint targeting our task queue. | ||
| endpoint := "sdk-go-nexus-standalone-test-ep-" + uuid.NewString() |
There was a problem hiding this comment.
Should the endpoint be deleted at the end of the test? Maybe a deferred deletion?
| ts.NoError(err) | ||
|
|
||
| // Get a handle to the same operation. | ||
| handle2 := ts.client.GetNexusOperationHandle(client.GetNexusOperationHandleOptions{ |
There was a problem hiding this comment.
Consider adding a test where the run ID is not specified.
|
Note this PR is missing support for otel I was planning on addressing that in a separate PR to keep the scope down |


NOTE FOR REVIEWERS: This PR is pending the actual release of the API and Server and will not be merged until those are complete.
Add standalone Nexus operation support
Adds the ability to start, poll, describe, cancel, terminate, list, and count Nexus operations directly from the
client, outside of workflow context. This mirrors the standalone activity pattern and is based on the API we already reviewed the cross SDK design for.
API
Interceptor support
Adds 6 methods to ClientOutboundInterceptor: ExecuteNexusOperation, GetNexusOperationHandle, CancelNexusOperation,
TerminateNexusOperation, DescribeNexusOperation, PollNexusOperationResult. List and Count bypass the interceptor,
consistent with standalone activities.
Testing
Note
Medium Risk
Adds new experimental client APIs and interceptor surface for starting/managing Nexus operations, touching core client plumbing and gRPC calls. Risk is mitigated by being additive/experimental, but it expands public interfaces and integration behavior.
Overview
Adds experimental standalone Nexus operation APIs to
client.Client, includingNewNexusClient,ExecuteOperation, operation handles (Get/Describe/Cancel/Terminate), and visibility helpersListNexusOperations/CountNexusOperations.Extends the client interceptor API with Nexus operation hooks (execute/get-handle/poll/describe/cancel/terminate) and implements the underlying gRPC wiring plus option/metadata types in a new
internal/internal_nexus_client.gowith unit/integration coverage.Updates CI to disable the new standalone Nexus integration suite by default (
DISABLE_STANDALONE_NEXUS_TESTS) and bumpsgo.temporal.io/apiacross modules to a newer pre-release commit needed for the new Nexus RPCs.Reviewed by Cursor Bugbot for commit d296109. Bugbot is set up for automated code reviews on this repo. Configure here.