Conversation
bb3368d to
3e50a59
Compare
Introduce a Nexus RPC compute providers for invoke and worker-set compute providers. As the Nexus-based compute providers are called directly from the workflow, adding a new code path to the Workflow to do that - and fallback to activity when another compute provider is used. Also backfilling the so far missing field for the Nexus endpoint - which already existed in the frontend API. Add a cmd/nexus-subprocess-example binary demonstrating a subprocess-backed Nexus invoke service, along with Makefile targets and .gitignore entries for the generated files and new binary.
There was a problem hiding this comment.
I would call out in a comment that this is temporary until we add generate language friendly types with nexgen.
| fatalf("--out-file is required") | ||
| } | ||
| if flag.NArg() != 1 { | ||
| fatalf("expected one .nexusrpc.yaml input file") |
There was a problem hiding this comment.
You shouldn't need a nexusrpc.yaml for proto based definitions.
There was a problem hiding this comment.
This should all be handled by nexgen.
There was a problem hiding this comment.
You should be able to avoid copying this definition into your repo. I think you should define all of your protos in the api repo.
There was a problem hiding this comment.
I was wondering about that - given it's a user facing API that seems fitting. I'll see to move them over there
| //go:generate npx --yes nexus-rpc-gen@0.1.0-alpha.4 --lang go --package nexus --out-file nexus_invoke_nexusrpc_gen.go nexus_invoke.nexusrpc.yaml | ||
| //go:generate npx --yes nexus-rpc-gen@0.1.0-alpha.4 --lang go --package nexus --out-file nexus_worker_set_nexusrpc_gen.go nexus_worker_set.nexusrpc.yaml |
There was a problem hiding this comment.
nexus-rpc-gen is deprecated. We should sync up on this.
|
|
||
| var newNexusWorkerSetWorkflowClientFn = workflow.NewNexusClient | ||
|
|
||
| var executeNexusWorkerSetValidateConfigOperationFn = func( |
There was a problem hiding this comment.
There's a plan to generate client methods in nexgen too, which will save you from creating these wrappers.
Introduce a Nexus RPC compute providers for invoke and worker-set compute providers.
As the Nexus-based compute providers are called directly from the workflow, adding a new code path to the Workflow to do that - and fallback to activity when another compute provider is used. Also backfilling the so far missing field for the Nexus endpoint - which already existed in the frontend API.
Add a cmd/nexus-subprocess-example binary demonstrating a subprocess-backed Nexus invoke service, along with Makefile targets and .gitignore entries for the generated files and new binary.