Repository navigation
Conversation
cacf87c to
c42fb0c
Compare
There was a problem hiding this comment.
🔵 Needs a closer look
The bare-Payload response requires downstream SDK and generator validation, especially TypeScript registry generation and immediate/callback data conversion, beyond what this API-only snapshot and its CI cover.
No open issues 🎉
What changed in this PR
Defines the experimental GetWorkflowExecutionResult system Nexus API for waiting on a workflow run chain’s final result as a single Payload. Server and SDK support remain required before release.
Changes:
- Add the operation contract, server-authored subscription metadata, and cancellation history field.
- Resolve generated language references from each message’s own proto file and allow the bare
Payloadresponse name. - Update generated OpenAPI and Nexus artifacts.
| File | Description |
|---|---|
| temporal/api/workflowservice/v1/service.proto | Declare the experimental result operation. |
| temporal/api/workflowservice/v1/request_response.proto | Define the workflow execution request. |
| temporal/api/history/v1/message.proto | Record subscription cancellations by request ID. |
| temporal/api/common/v1/message.proto | Add subscription metadata and document public-input rejection. |
| openapi/openapiv3.yaml | Reflect new callback and history fields. |
| openapi/openapiv2.json | Reflect new callback and history fields. |
| nexus/workflow-service.wit | Expose the operation with a payload result. |
| nexus/temporal-proto-models-nexusrpc.yaml | Add language references for the operation’s input and output. |
| cmd/protoc-gen-nexus-rpc-yaml/generator.go | Use each message’s defining file for language references. |
| buf.yaml | Exempt the service file from response-name linting. |
Review effort: Balanced
| // Version 1 uses the GetWorkflowExecutionResult single-Payload result format. | ||
| // The server must set a supported, positive version. | ||
| int32 result_format_version = 2; | ||
| // Target execution resolved when the subscription was attached, including its run ID. |
There was a problem hiding this comment.
In the event the workflow executions CANs or is reset, would that result in a stale value?
There was a problem hiding this comment.
Yes. That's intentional, when the caller want to cancel the callback even if the target workflow CAN or reset, it would walk the run chain to find the run that is still open.
What changed?
Source and generator changes:
GetWorkflowExecutionResultsystem Nexus operation. Its request identifies a workflow and optionally a run ID; it returns the final result of the run chain as a singlePayload.Payloadresponse from the standard response-name lint rule.The proto sources and generator code produce these CI-generated artifacts:
openapi/openapiv2.jsonopenapi/openapiv3.yamlnexus/temporal-proto-models-nexusrpc.yamlnexus/workflow-service.witWhy?
This defines the API contract for workflows to wait for another workflow's result, including across a chain of runs. Server implementation is required to provide the operation and enforce the callback metadata rules.
SDK and generator updates are required before release. They must handle raw payload results with the caller's data converter for both immediate and callback results. The TypeScript registry build and result decoder also need verification.
Breaking changes
The protobuf fields are additive. the feature won't work until server & sdk side implementation is complete.
Verification
run ci