From 5ec271e73104431b3ead219a0874fb88d84b3188 Mon Sep 17 00:00:00 2001 From: Vladyslav Simonenko Date: Tue, 25 Nov 2025 11:09:49 -0800 Subject: [PATCH 1/4] Change Payload to contain references to externally stored objects --- temporal/api/common/v1/message.proto | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/temporal/api/common/v1/message.proto b/temporal/api/common/v1/message.proto index 838f5fefc..861c64315 100644 --- a/temporal/api/common/v1/message.proto +++ b/temporal/api/common/v1/message.proto @@ -32,6 +32,15 @@ message Payloads { message Payload { map metadata = 1; bytes data = 2; + // References to data stored externally rather than embedded in the payload. + // A Payload can reference zero or more external objects. + repeated ExternalPayload external_payloads = 3; +} + +// Metadata describing an externally stored object that can be referenced by Payload +message ExternalPayload { + // Size in bytes of the externally stored object + int64 size_bytes = 1; } // A user-defined set of *indexed* fields that are used/exposed when listing/searching workflows. From 4932a58355b05adce7713cc3abee234abb40489b Mon Sep 17 00:00:00 2001 From: Vladyslav Simonenko Date: Tue, 25 Nov 2025 12:25:11 -0800 Subject: [PATCH 2/4] Commit openapi spec --- openapi/openapiv2.json | 11 +++++++++++ openapi/openapiv3.yaml | 7 +++++++ temporal/api/common/v1/message.proto | 13 +++++++------ 3 files changed, 25 insertions(+), 6 deletions(-) diff --git a/openapi/openapiv2.json b/openapi/openapiv2.json index 1638edc27..5386f9836 100644 --- a/openapi/openapiv2.json +++ b/openapi/openapiv2.json @@ -11487,6 +11487,17 @@ } } }, + "v1ExternalPayload": { + "type": "object", + "properties": { + "sizeBytes": { + "type": "string", + "format": "int64", + "title": "Size in bytes of the externally stored object" + } + }, + "title": "Metadata describing an externally stored object that can be referenced by Payload" + }, "v1ExternalWorkflowExecutionCancelRequestedEventAttributes": { "type": "object", "properties": { diff --git a/openapi/openapiv3.yaml b/openapi/openapiv3.yaml index 9f3b310ef..a1e3d442c 100644 --- a/openapi/openapiv3.yaml +++ b/openapi/openapiv3.yaml @@ -8349,6 +8349,13 @@ components: $ref: '#/components/schemas/StartWorkflowExecutionResponse' updateWorkflow: $ref: '#/components/schemas/UpdateWorkflowExecutionResponse' + ExternalPayload: + type: object + properties: + sizeBytes: + type: string + description: Size in bytes of the externally stored object + description: Metadata describing an externally stored object that can be referenced by Payload ExternalWorkflowExecutionCancelRequestedEventAttributes: type: object properties: diff --git a/temporal/api/common/v1/message.proto b/temporal/api/common/v1/message.proto index 861c64315..b77c413cd 100644 --- a/temporal/api/common/v1/message.proto +++ b/temporal/api/common/v1/message.proto @@ -34,15 +34,16 @@ message Payload { bytes data = 2; // References to data stored externally rather than embedded in the payload. // A Payload can reference zero or more external objects. - repeated ExternalPayload external_payloads = 3; -} + repeated ExternalReference external_references = 3; -// Metadata describing an externally stored object that can be referenced by Payload -message ExternalPayload { - // Size in bytes of the externally stored object - int64 size_bytes = 1; + // Describes an externally stored object referenced by this Payload. + message ExternalReference { + // Size in bytes of the externally stored object + int64 size_bytes = 1; + } } + // A user-defined set of *indexed* fields that are used/exposed when listing/searching workflows. // The payload is not serialized in a user-defined way. message SearchAttributes { From 99cb3466c96d76a4f6a7843d973cdf29a5142b1d Mon Sep 17 00:00:00 2001 From: Vladyslav Simonenko Date: Tue, 25 Nov 2025 14:47:15 -0800 Subject: [PATCH 3/4] Change to external references --- openapi/openapiv2.json | 22 +++++++++++----------- openapi/openapiv3.yaml | 14 +++++++------- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/openapi/openapiv2.json b/openapi/openapiv2.json index 5386f9836..18094777b 100644 --- a/openapi/openapiv2.json +++ b/openapi/openapiv2.json @@ -7648,6 +7648,17 @@ } } }, + "PayloadExternalReference": { + "type": "object", + "properties": { + "sizeBytes": { + "type": "string", + "format": "int64", + "title": "Size in bytes of the externally stored object" + } + }, + "description": "Describes an externally stored object referenced by this Payload." + }, "PendingActivityInfoPauseInfo": { "type": "object", "properties": { @@ -11487,17 +11498,6 @@ } } }, - "v1ExternalPayload": { - "type": "object", - "properties": { - "sizeBytes": { - "type": "string", - "format": "int64", - "title": "Size in bytes of the externally stored object" - } - }, - "title": "Metadata describing an externally stored object that can be referenced by Payload" - }, "v1ExternalWorkflowExecutionCancelRequestedEventAttributes": { "type": "object", "properties": { diff --git a/openapi/openapiv3.yaml b/openapi/openapiv3.yaml index a1e3d442c..d3b470546 100644 --- a/openapi/openapiv3.yaml +++ b/openapi/openapiv3.yaml @@ -8349,13 +8349,6 @@ components: $ref: '#/components/schemas/StartWorkflowExecutionResponse' updateWorkflow: $ref: '#/components/schemas/UpdateWorkflowExecutionResponse' - ExternalPayload: - type: object - properties: - sizeBytes: - type: string - description: Size in bytes of the externally stored object - description: Metadata describing an externally stored object that can be referenced by Payload ExternalWorkflowExecutionCancelRequestedEventAttributes: type: object properties: @@ -9830,6 +9823,13 @@ components: Represents some binary (byte array) data (ex: activity input parameters or workflow result) with metadata which describes this binary data (format, encoding, encryption, etc). Serialization of the data may be user-defined. + Payload_ExternalReference: + type: object + properties: + sizeBytes: + type: string + description: Size in bytes of the externally stored object + description: Describes an externally stored object referenced by this Payload. Payloads: type: object properties: From 6aa16a0fed98d1bfecd6535e2be81df34a6c06a9 Mon Sep 17 00:00:00 2001 From: Vladyslav Simonenko Date: Wed, 3 Dec 2025 10:48:54 -0800 Subject: [PATCH 4/4] Renamed to ExternalPayloadDetails --- openapi/openapiv2.json | 6 +++--- openapi/openapiv3.yaml | 6 +++--- temporal/api/common/v1/message.proto | 12 +++++------- 3 files changed, 11 insertions(+), 13 deletions(-) diff --git a/openapi/openapiv2.json b/openapi/openapiv2.json index 18094777b..8b083a4e9 100644 --- a/openapi/openapiv2.json +++ b/openapi/openapiv2.json @@ -7648,16 +7648,16 @@ } } }, - "PayloadExternalReference": { + "PayloadExternalPayloadDetails": { "type": "object", "properties": { "sizeBytes": { "type": "string", "format": "int64", - "title": "Size in bytes of the externally stored object" + "title": "Size in bytes of the externally stored payload" } }, - "description": "Describes an externally stored object referenced by this Payload." + "description": "Describes an externally stored object referenced by this payload." }, "PendingActivityInfoPauseInfo": { "type": "object", diff --git a/openapi/openapiv3.yaml b/openapi/openapiv3.yaml index d3b470546..f1374bfc5 100644 --- a/openapi/openapiv3.yaml +++ b/openapi/openapiv3.yaml @@ -9823,13 +9823,13 @@ components: Represents some binary (byte array) data (ex: activity input parameters or workflow result) with metadata which describes this binary data (format, encoding, encryption, etc). Serialization of the data may be user-defined. - Payload_ExternalReference: + Payload_ExternalPayloadDetails: type: object properties: sizeBytes: type: string - description: Size in bytes of the externally stored object - description: Describes an externally stored object referenced by this Payload. + description: Size in bytes of the externally stored payload + description: Describes an externally stored object referenced by this payload. Payloads: type: object properties: diff --git a/temporal/api/common/v1/message.proto b/temporal/api/common/v1/message.proto index b77c413cd..03b640a2f 100644 --- a/temporal/api/common/v1/message.proto +++ b/temporal/api/common/v1/message.proto @@ -32,18 +32,16 @@ message Payloads { message Payload { map metadata = 1; bytes data = 2; - // References to data stored externally rather than embedded in the payload. - // A Payload can reference zero or more external objects. - repeated ExternalReference external_references = 3; + // Details about externally stored payloads associated with this payload. + repeated ExternalPayloadDetails external_payloads = 3; - // Describes an externally stored object referenced by this Payload. - message ExternalReference { - // Size in bytes of the externally stored object + // Describes an externally stored object referenced by this payload. + message ExternalPayloadDetails { + // Size in bytes of the externally stored payload int64 size_bytes = 1; } } - // A user-defined set of *indexed* fields that are used/exposed when listing/searching workflows. // The payload is not serialized in a user-defined way. message SearchAttributes {