Skip to content

Commit 0477814

Browse files
authored
Extend Payload to include references to externally stored objects (#671)
_**READ BEFORE MERGING:** All PRs require approval by both Server AND SDK teams before merging! This is why the number of required approvals is "2" and not "1"--two reviewers from the same team is NOT sufficient. If your PR is not approved by someone in BOTH teams, it may be summarily reverted._ <!-- Describe what has changed in this PR --> Extend Payload to include references to externally stored data. Currently the only information we would store is the size of the externally stored object, but it will be extended in the future once more features are added. <!-- Tell your future self why have you made these changes --> Payloads are limited in size, and as such require external references to pass large amounts of data. This PR extends Payload protobuf to include information (currently only size) about externally stored objects associated with the Payload. One Payload will be able to reference multiple externally stored objects in the future. <!-- Are there any breaking changes on binary or code level? --> No breaking changes <!-- If this breaks the Server, please provide the Server PR to merge right after this PR was merged. --> This change is additive, and so won't break the server
1 parent de2a88a commit 0477814

File tree

3 files changed

+26
-0
lines changed

3 files changed

+26
-0
lines changed

openapi/openapiv2.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7648,6 +7648,17 @@
76487648
}
76497649
}
76507650
},
7651+
"PayloadExternalPayloadDetails": {
7652+
"type": "object",
7653+
"properties": {
7654+
"sizeBytes": {
7655+
"type": "string",
7656+
"format": "int64",
7657+
"title": "Size in bytes of the externally stored payload"
7658+
}
7659+
},
7660+
"description": "Describes an externally stored object referenced by this payload."
7661+
},
76517662
"PendingActivityInfoPauseInfo": {
76527663
"type": "object",
76537664
"properties": {

openapi/openapiv3.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9823,6 +9823,13 @@ components:
98239823
Represents some binary (byte array) data (ex: activity input parameters or workflow result) with
98249824
metadata which describes this binary data (format, encoding, encryption, etc). Serialization
98259825
of the data may be user-defined.
9826+
Payload_ExternalPayloadDetails:
9827+
type: object
9828+
properties:
9829+
sizeBytes:
9830+
type: string
9831+
description: Size in bytes of the externally stored payload
9832+
description: Describes an externally stored object referenced by this payload.
98269833
Payloads:
98279834
type: object
98289835
properties:

temporal/api/common/v1/message.proto

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,14 @@ message Payloads {
3232
message Payload {
3333
map<string,bytes> metadata = 1;
3434
bytes data = 2;
35+
// Details about externally stored payloads associated with this payload.
36+
repeated ExternalPayloadDetails external_payloads = 3;
37+
38+
// Describes an externally stored object referenced by this payload.
39+
message ExternalPayloadDetails {
40+
// Size in bytes of the externally stored payload
41+
int64 size_bytes = 1;
42+
}
3543
}
3644

3745
// A user-defined set of *indexed* fields that are used/exposed when listing/searching workflows.

0 commit comments

Comments
 (0)