Skip to content

[DO NOT MERGE] Generate nexus service definitions#245

Open
spkane31 wants to merge 10 commits intomasterfrom
spk/sys-nexus-endpoint
Open

[DO NOT MERGE] Generate nexus service definitions#245
spkane31 wants to merge 10 commits intomasterfrom
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: insert here

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

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@spkane31 spkane31 requested a review from bergundy April 10, 2026 22:05
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.

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.

.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?

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.

@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.

@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

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.

3 participants