Skip to content

Conversation

@simvlad
Copy link
Contributor

@simvlad simvlad commented Nov 25, 2025

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.

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.

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.

No breaking changes

This change is additive, and so won't break the server

@simvlad simvlad requested review from a team as code owners November 25, 2025 19:27
}

// Metadata describing an externally stored object that can be referenced by Payload
message ExternalPayload {
Copy link
Member

@cretz cretz Nov 25, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This isn't really an external payload, rather it's information about one. I think we should consider adding ExternalInfo (or ExternalPayload if we must) as a sub-message of Payload, the only place it's used, instead of top-level common as if commonly used in many places. But if it must remain top-level, I think it should be clear this proto message is not a form of Payload as its name implies.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I changed to ExternalReference and made it a sub-message of Payload

message Payload {
map<string,bytes> metadata = 1;
bytes data = 2;
// References to data stored externally rather than embedded in the payload.
Copy link
Member

@cretz cretz Nov 25, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure it is currently accurate to say these are references, it's just some info about them

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The plural external_infos is quite awkward, so I decided against it. I also considered ExternalDescriptor, but I like it slightly less than ExternalReference. Any other suggestions, which would also work for plural?

@simvlad simvlad force-pushed the simvlad/external-payloads branch from 4030023 to fe9e752 Compare November 25, 2025 22:47
Copy link
Member

@cretz cretz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great to me. I originally was afraid of marking approved until we had done more code on server and SDK side to prove out what we want here, but I think this change is small enough that whatever we're doing with it on the server may not be necessary up front.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants