Add Standalone Nexus operation sample#158
Conversation
| blocking process that runs until it receives a SIGINT (Ctrl + C) command. | ||
|
|
||
| ```bash | ||
| dotnet run worker |
There was a problem hiding this comment.
I ran this just to check it out, and I get this output:
[16:46:07] info: Program[0]
Running worker on task queue nexus-standalone-operations
[16:46:16] warn: Temporalio.Nexus:SayHello[0]
Invalid Nexus link: temporal:///namespaces/default/nexus-operations/nexus-standalone-hello-op/019eb914-5105-793f-9adc-455289d201bb/details
System.ArgumentException: Invalid path
at Temporalio.Nexus.ProtoLinkExtensions.ToWorkflowEvent(NexusLink link)
at Temporalio.Nexus.NexusWorkflowStartHelper.<>c__DisplayClass1_0.b__0(NexusLink link)
^C[16:46:33] info: Program[0]
Though I am running dotnet 10 (the main branch upgraded to version 10), not sure I am running the same server, etc, so mostly just figured I'd call it out for a double check.
|
|
||
| ### Steps to run this sample | ||
|
|
||
| 1. Run the [Temporal dev server build that supports standalone Nexus operations](https://github.com/temporalio/cli/releases/tag/v1.7.1-standalone-nexus-operations). (If you are going to run locally, you will want to start it in another terminal; this command is blocking and runs until it receives a SIGINT (Ctrl + C) command.) |
There was a problem hiding this comment.
Should this be 1.7.2? That is what lines 10 and 29 have. And if you search 1.7.1 in the changed files, there are two other places specifying 1.7.1 in this PR.
|
|
||
| > [!NOTE] | ||
| > Standalone Nexus operations require a server version that supports this feature. Use the dev | ||
| > server build at https://github.com/temporalio/cli/releases/tag/v1.7.2 |
There was a problem hiding this comment.
I thought this was just version 1.7.2 at first - spotless added a line break, which breaks the web link.
| var nexusClient = client.CreateNexusClient<IHelloService>(IHelloService.EndpointName); | ||
|
|
||
| // Execute the sync Echo operation. | ||
| var echoHandle = await nexusClient.StartNexusOperationAsync( |
There was a problem hiding this comment.
Feels like this should be called out in comments or something. I looked and none of the readme files have documentation in them so that's consistent, but just reading this code it is not necessarily obvious how this is different from anything else.
So mostly just thinking a longer comment above the Start and Execute commands spelling it out a little more might be useful.
There was a problem hiding this comment.
This was already fixed in #153, so it should "disappear" when you merge/rebase.
| // The endpoint must be pre-created on the server (see README). | ||
| var nexusClient = client.CreateNexusClient<IHelloService>(IHelloService.EndpointName); | ||
|
|
||
| // Execute the sync Echo operation. |
There was a problem hiding this comment.
Should these comments say they "Start the ..." to differentiate between the semantics of start and execute?
What was changed
Add Standalone Nexus operation sample
Why?
Checklist
Closes
How was this tested: