Skip to content

Add support for Stand Alone Nexus Operations#639

Open
Quinn-With-Two-Ns wants to merge 3 commits intotemporalio:mainfrom
Quinn-With-Two-Ns:NEXUS-291
Open

Add support for Stand Alone Nexus Operations#639
Quinn-With-Two-Ns wants to merge 3 commits intotemporalio:mainfrom
Quinn-With-Two-Ns:NEXUS-291

Conversation

@Quinn-With-Two-Ns
Copy link
Copy Markdown
Contributor

@Quinn-With-Two-Ns Quinn-With-Two-Ns commented Apr 8, 2026

NOTE TO REVIEWERS: This PR is pending the actual release of the API and Server and will not be merged until those are complete.

Summary

  • Adds stand-alone Nexus operation support, allowing Nexus operations to be started, managed, and queried directly from the client
    (outside of workflows)
  • Updates sdk-core submodule to stand-alone-nexus-operations branch and regenerates proto bindings (8 new RPCs)
  • Introduces NexusClient / NexusClient with both string-based and expression-based operation invocation, mirroring the existing
    NexusWorkflowClient pattern

API Surface

On ITemporalClient:

  • CreateNexusClient(service, options) / CreateNexusClient(options) — factory methods
  • GetNexusOperationHandle(operationId, runId?) — handle for existing operations
  • ListNexusOperationsAsync(query) / CountNexusOperationsAsync(query) — visibility queries

On NexusClient:

  • StartNexusOperationAsync / ExecuteNexusOperationAsync — start or start+await operations

On NexusOperationHandle:

  • GetResultAsync — polls PollNexusOperationExecution until completion
  • DescribeAsync / CancelAsync / TerminateAsync

All operations flow through the ClientOutboundInterceptor chain, consistent with stand-alone activities.

Test plan

  • Existing Nexus worker tests pass (30/30 verified)
  • Build succeeds with 0 errors across all target frameworks
  • Integration tests for start, get result, describe, cancel, terminate, list, count
  • Verify expression-based invocation with NexusClient
  • Verify NexusOperationAlreadyStartedException on ID conflict

Note

Medium Risk
Medium risk due to regenerated protobuf bindings and new enums/messages that expand public API surface; consumers may see compile-time warnings (new [Obsolete] fields) and behavior changes when serializing/deserializing new fields.

Overview
Adds new protobuf API surface to support standalone Nexus operations and worker compute configuration.

This regenerates protocol bindings to introduce Temporalio.Api.Compute.V1 (ComputeConfig, ComputeProvider, ComputeScaler), extends deployment/version protos to carry compute_config plus last_modifier_identity, and adds Nexus-related enums and error details (e.g., NexusOperationExecutionAlreadyStartedFailure). It also extends common protos with a new Link variant for nexus_operation and introduces a server-derived Principal message.

Separately, marks several command namespace fields as [Obsolete] due to cross-namespace deprecation, adds new event/worker-deployment status enum values, and updates OpenTelemetry TracingInterceptor to use the fully-qualified StartNexusOperationInput type.

Reviewed by Cursor Bugbot for commit 80d2428. Bugbot is set up for automated code reviews on this repo. Configure here.

Quinn-With-Two-Ns and others added 2 commits April 8, 2026 14:36
…regenerate protos

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@Quinn-With-Two-Ns Quinn-With-Two-Ns requested a review from a team as a code owner April 8, 2026 22:32
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 5f5e019e68

ℹ️ 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".

Comment thread src/Temporalio/Client/TemporalClient.NexusOperation.cs Outdated
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.

1 participant