Skip to content

Generate nexus service definitions#245

Merged
spkane31 merged 19 commits into
masterfrom
spk/sys-nexus-endpoint
May 12, 2026
Merged

Generate nexus service definitions#245
spkane31 merged 19 commits into
masterfrom
spk/sys-nexus-endpoint

Conversation

@spkane31
Copy link
Copy Markdown
Contributor

@spkane31 spkane31 commented Apr 6, 2026

What changed?
Adds Nexus service definition generation for WorkflowService (workflowservice/v1/workflowservicenexus/service_nexus.pb.go) driven by nexus-rpc-gen reading the github.com/temporalio/api:nexus/temporal-proto-models-nexusrpc.yaml files which defines SignalWithStartWorkflowExecution.

Add a nexus-gen Makefile target for generation and wiring into the grpc target.

Why?
Temporal needs to expose WorkflowService RPCs as Nexus operations (those marked as exposed).

How did you test it?
Server PR: temporalio/temporal#9833

Potential risks

@spkane31 spkane31 requested review from a team as code owners April 6, 2026 21:44
@spkane31 spkane31 requested a review from lina-temporal April 7, 2026 16:19
@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Apr 9, 2026

CLA assistant check
All committers have signed the CLA.

@spkane31 spkane31 requested a review from bergundy April 10, 2026 22:05
Comment thread Makefile Outdated

##### Compile proto files for go #####
grpc: http-api-docs go-grpc copy-helpers
NEXUS_RPC_GEN_SRC ?= $(HOME)/git/github.com/nexus-rpc/nexus-rpc-gen
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Fix this before merging please.

Comment thread Makefile Outdated
grpc: http-api-docs go-grpc copy-helpers
NEXUS_RPC_GEN_SRC ?= $(HOME)/git/github.com/nexus-rpc/nexus-rpc-gen
NEXUS_SCHEMA_ROOT := $(PROTO_ROOT)/nexus
NEXUS_OUT := workflowservice/v1/workflowservicenexus
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

We are going to have more nexus services going into the same schema. You'll have to find a better solution to generate all of them.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Also note that both the server and the Go SDK are going to use the generated files here. You'll want to come up with a directory structure that supports both outputs.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The server files are generated to workflowservice/v1/workflowservicenexus/service_nexus.pb.go and the go sdk JSON is in workflowservice/v1/workflowservicenexus/json/service_nexus.go, following @tconley1428 's PR to add the sdk files

Comment thread .gitignore Outdated
.idea
.gobincache
.go-helpers-installed
.go-nexus-installed
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Is this used?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Not anymore, removing

Comment thread Makefile Outdated
Comment on lines +128 to +129
@cd $(NEXUS_RPC_GEN_SRC)/src && pnpm run build
@cd $(NEXUS_RPC_GEN_SRC)/src/packages/nexus-rpc-gen && npm link
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Eventually we'll want to install it via our CDN. Add a TODO please.
For now it's okay if we clone the repo since the generator is still WIP.

Comment thread Makefile
@go install google.golang.org/protobuf/cmd/protoc-gen-go@latest
grpc-install: nexus-rpc-gen-install
@printf $(COLOR) "Install/update grpc plugins..."
@go install google.golang.org/protobuf/cmd/protoc-gen-go@latest
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks for removing the whitespace. The print was okay though. It's not all GRPC plugins. You can maybe change it to protoc plugins.

Comment thread Makefile
@go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest
@go install github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-grpc-gateway@latest

nexus-rpc-gen-install:
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I would mark this as a PHONY target

Comment thread cmd/protoc-gen-nexus-rpc-yaml/testdata/test/v1/service.pb.go Outdated
@spkane31 spkane31 requested a review from bergundy April 16, 2026 19:38
spkane31 and others added 7 commits April 27, 2026 14:01
Bumps proto/api submodule to f5b514e (master HEAD) to pick up the
merged temporalio/api PR #736 (system nexus endpoint "exposed" op)
and regenerates the Go bindings.

Also fixes a non-constant format string in cmd/protogen/main.go that
Go 1.25's stricter vet flagged, which broke the Update Proto CI job.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Resolves rawDesc conflict in workflowservice/v1/service.pb.go by
regenerating from the merged submodule (proto/api at f5b514e).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@spkane31 spkane31 changed the title [DO NOT MERGE] Generate nexus service definitions Generate nexus service definitions May 12, 2026
@spkane31 spkane31 merged commit 0fe0dd5 into master May 12, 2026
4 checks passed
@spkane31 spkane31 deleted the spk/sys-nexus-endpoint branch May 12, 2026 22:25
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.

4 participants