Skip to content

Commit 67af3a2

Browse files
Add support for Standalone Nexus Operations (#1046)
## NOTE: REQUIRES OSS SERVER VERSION v1.32.0 ## What changed? Add support for stand alone nexus operations to the CLI. ## Checklist <!-- Your PR should satisfy all these requirements. However, feel free to remove items that don't apply to the PR. Consider giving this checklist to an AI agent before opening your PR. --> **Stability** - [ ] Breaking changes are marked with 💥 in the PR title and release notes - [ ] Changes to JSON output (`-o json` / `-o jsonl`) are treated as breaking changes **Design** - [x] This feature does not depend on Cloud-only APIs or behavior (it works against an OSS server) - [x] New commands follow `temporal <noun> <verb>` structure (e.g. `temporal workflow start`) - [x] New flags are named after the API concept, not the implementation mechanism (good: `--search-attribute`, bad: `--index-field`) - [x] New flags don't duplicate an existing flag that serves the same purpose - [ ] New flags do not have short aliases without strong justification - [x] Experimental features are marked with `(Experimental)` in `commands.yaml` **Help text** (see style guide at the top of `commands.yaml`) - [x] All flags shown in help text and examples are implemented and functional - [x] Summaries use sentence case and have no trailing period - [x] Long descriptions end with a period and include at least one example invocation - [ ] Examples use long flags (`--namespace`, not `-n`), one flag per line - [x] Placeholder values use `YourXxx` form (`YourWorkflowId`, `YourNamespace`) **Behavior** - [x] Results go to stdout; errors and warnings go to stderr - [x] Error messages are lowercase with no trailing punctuation **Tests** - [x] Added functional test(s) (`SharedServerSuite`) - [x] Added unit test(s) (`func TestXxx`) where applicable ## Manual tests <!-- Edit the code samples below to provide setup and happy-path and error-path testing instructions. --> **Setup** ``` temporal operator nexus endpoint create --name my-endpoint --target-namespace default --target-task-queue my-tq ``` **Happy path** ``` $ temporal nexus operation start --endpoint my-endpoint --service my-service --operation my-op --operation-id my-op-1 --input '"hello"' Started Nexus Operation: Endpoint my-endpoint Service my-service Operation my-op OperationId my-op-1 RunId 7e7c8b2a-...-... Namespace default ``` **Error case** ``` $ temporal nexus operation start --service my-service --operation my-op --operation-id my-op-2 Error: required flag(s) "endpoint" not set ``` **Composition** — start an operation, then fetch its result, then list/describe: ``` $ temporal nexus operation start --endpoint my-endpoint --service my-service --operation my-op --operation-id my-op-3 --input '"world"' $ temporal nexus operation result --operation-id my-op-3 Results: Status COMPLETED Result "got: world" $ temporal nexus operation describe --operation-id my-op-3 OperationId my-op-3 RunId 7e7c8b2a-...-... Endpoint my-endpoint Service my-service Operation my-op Status Succeeded ... ```
1 parent e20ca61 commit 67af3a2

7 files changed

Lines changed: 1811 additions & 3 deletions

File tree

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ require (
1818
github.com/temporalio/cli/cliext v0.0.0
1919
github.com/temporalio/ui-server/v2 v2.49.1
2020
go.temporal.io/api v1.62.13
21-
go.temporal.io/sdk v1.41.1
21+
go.temporal.io/sdk v1.44.1
2222
go.temporal.io/sdk/contrib/envconfig v1.0.0
2323
go.temporal.io/server v1.32.0-157.0
2424
golang.org/x/exp v0.0.0-20260410095643-746e56fc9e2f

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -473,8 +473,8 @@ go.temporal.io/api v1.62.13 h1:xMa8Nt5oAMX+LvlCJA44wjTCc1H09i2rG9poB1/xvH4=
473473
go.temporal.io/api v1.62.13/go.mod h1:0k75tRljEuELWGeXjEZZO7zYqBln4+1FrG6+IMOMy7Q=
474474
go.temporal.io/auto-scaled-workers v0.0.0-20260407181057-edd947d743d2 h1:1hKeH3GyR6YD6LKMHGCZ76t6h1Sgha0hXVQBxWi3dlQ=
475475
go.temporal.io/auto-scaled-workers v0.0.0-20260407181057-edd947d743d2/go.mod h1:T8dnzVPeO+gaUTj9eDgm/lT2lZH4+JXNvrGaQGyVi50=
476-
go.temporal.io/sdk v1.41.1 h1:yOpvsHyDD1lNuwlGBv/SUodCPhjv9nDeC9lLHW/fJUA=
477-
go.temporal.io/sdk v1.41.1/go.mod h1:/InXQT5guZ6AizYzpmzr5avQ/GMgq1ZObcKlKE2AhTc=
476+
go.temporal.io/sdk v1.44.1 h1:Mt2OZLZpqkzDIdg9YyQzO0Rb/HqCDnnqHlIAGAJ5gqM=
477+
go.temporal.io/sdk v1.44.1/go.mod h1:vkApR12F9/Y8OR+hkxe7WyXQFuCX6clhzqnAk6rzDAM=
478478
go.temporal.io/sdk/contrib/envconfig v1.0.0 h1:1Q/swVgB4EW/p3k7rI9/4hpU4/DC57FSRbU90+UisXw=
479479
go.temporal.io/sdk/contrib/envconfig v1.0.0/go.mod h1:Pj4N1lwUEvxap6quBm8GrVMSUMJhSZkVtxjt3AYnPPg=
480480
go.temporal.io/server v1.32.0-157.0 h1:nzFqNwx+5lXsT0/DSiFyR5vHMnDcT3PVAvmRDqCUn38=

internal/temporalcli/commands.gen.go

Lines changed: 321 additions & 0 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)