-
Notifications
You must be signed in to change notification settings - Fork 78
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
Fetching workflow update result via temporal workflow update execute or temporal workflow update result with -o json yields output that is incorrect in two ways:
- If there is the update failed with an error, no error JSON is produced.
- If the update succeeds, the JSON does not include full result payload details when using the
--no-json-shorthand-payloadsoption (it is effectively silently ignored).
Minimal Reproduction
Failed update
Start this workflow
@workflow.defn
class WorkflowWithUpdate:
@workflow.run
async def run(self) -> None:
await asyncio.Future()
@workflow.update
async def update(self) -> str:
raise ApplicationError("error in update")temporal workflow start --type WorkflowWithUpdate --task-queue demoNow try to fetch an update result. The CLI outputs an error message but no JSON error info. It should output detailed structured error chain info including stack traces:
$ temporal workflow -o json update execute --workflow-id 195d41da-784e-406e-a376-53f18a99b1f4 --name update
Error: unable to update workflow: error in updateSuccessful update
Start this workflow
@workflow.defn
class WorkflowWithResult:
@workflow.run
async def run(self) -> str:
return "workflow-result"Then fetch the update result. The CLI outputs a JSON document describing the result, but --no-json-shorthand-payloads does not yield full payload details:
$ temporal workflow -o json update execute --workflow-id e97a2ee6-e2c8-49b4-849b-603a084e9cfb --name update
{
"name": "update",
"updateId": "71d71116-338a-4688-b502-a3fa678819e0",
"result": "update-result"
}
$ temporal --no-json-shorthand-payloads workflow -o json update execute --workflow-id e97a2ee6-e2c8-49b4-849b-603a084e9cfb --name update
{
"name": "update",
"updateId": "e8a22eb1-4422-426c-a1e5-025504d6ff97",
"result": "update-result"
}This is inconsistent with the behavior for a standalone activity (or workflow, etc) result:
standalone activity
$ temporal activity execute -o json -a activity-1 --start-to-close-timeout 1s --type greet --task-queue demo --input '"World"'
{
"activityId": "activity-1",
"runId": "019c95ab-fcaa-7ce1-bbf3-f847a8ee4080",
"status": "COMPLETED",
"result": "Hello, World!"
}
$ temporal activity execute --no-json-shorthand-payloads -o json -a activity-1 --start-to-close-timeout 1s --type greet --task-queue demo --input '"World"'
{
"activityId": "activity-1",
"runId": "019c95ac-2bd9-79fd-be40-65e42be13717",
"status": "COMPLETED",
"result": {
"payloads": [
{
"metadata": {
"encoding": "anNvbi9wbGFpbg=="
},
"data": "IkhlbGxvLCBXb3JsZCEi"
}
]
}
}workflow
$ temporal workflow result -o json --workflow-id 2ba765c4-3e1b-4854-b31d-ddcfd37b2598
{
"workflowId": "2ba765c4-3e1b-4854-b31d-ddcfd37b2598",
"runId": "019c959e-0ca9-77c7-8e66-d843ced91424",
"namespace": "dan-sa-demo.a2dd6",
"status": "COMPLETED",
"closeEvent": {
"eventId": "5",
"eventTime": "2026-02-25T16:24:49.131790142Z",
"eventType": "EVENT_TYPE_WORKFLOW_EXECUTION_COMPLETED",
"version": "100265",
"taskId": "266083684",
"workflowExecutionCompletedEventAttributes": {
"result": [
"workflow-result"
],
"workflowTaskCompletedEventId": "4"
}
},
"result": "workflow-result"
}
$ temporal workflow result --no-json-shorthand-payloads -o json --workflow-id 2ba765c4-3e1b-4854-b31d-ddcfd37b2598
{
"workflowId": "2ba765c4-3e1b-4854-b31d-ddcfd37b2598",
"runId": "019c959e-0ca9-77c7-8e66-d843ced91424",
"namespace": "dan-sa-demo.a2dd6",
"status": "COMPLETED",
"closeEvent": {
"eventId": "5",
"eventTime": "2026-02-25T16:24:49.131790142Z",
"eventType": "EVENT_TYPE_WORKFLOW_EXECUTION_COMPLETED",
"version": "100265",
"taskId": "266083684",
"workflowExecutionCompletedEventAttributes": {
"result": {
"payloads": [
{
"metadata": {
"encoding": "anNvbi9wbGFpbg=="
},
"data": "IndvcmtmbG93LXJlc3VsdCI="
}
]
},
"workflowTaskCompletedEventId": "4"
}
},
"result": {
"metadata": {
"encoding": "anNvbi9wbGFpbg=="
},
"data": "IndvcmtmbG93LXJlc3VsdCI="
}
}Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working