[DO NOT MERGE] Generate nexus service definitions#245
[DO NOT MERGE] Generate nexus service definitions#245
Conversation
|
|
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 |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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 |
Makefile
Outdated
| @cd $(NEXUS_RPC_GEN_SRC)/src && pnpm run build | ||
| @cd $(NEXUS_RPC_GEN_SRC)/src/packages/nexus-rpc-gen && npm link |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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: |
There was a problem hiding this comment.
I would mark this as a PHONY target
What changed?
Adds Nexus service definition generation for
WorkflowService(workflowservice/v1/workflowservicenexus/service_nexus.pb.go) driven bynexus-rpc-genreading thegithub.com/temporalio/api:nexus/temporal-proto-models-nexusrpc.yamlfiles which definesSignalWithStartWorkflowExecution.Add a
nexus-genMakefile target for generation and wiring into thegrpctarget.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