Add optional parameter to force payload offloading - #608
Merged
Deimos28 merged 1 commit intoAug 11, 2026
Conversation
Deimos28
requested review from
dambrosidenis and
paulcacheux
and removed request for
dambrosidenis
August 11, 2026 11:24
paulcacheux
approved these changes
Aug 11, 2026
When sending a gRPC payload to Temporal, if the payload is too large, we offload some of it to Amazon S3: this commit allows you to do this even if the payload is small. This is useful when uploading several things at once (eg registering multiple child workflows), where any single payload is small but their concatenation is too big and no offload happens.
Deimos28
force-pushed
the
charlesedouardcady/wfl-1022-payload-offloading-does-not-handle-cumulative-grpc-size
branch
from
August 11, 2026 11:37
e56f42b to
57c1afe
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
When a workflow schedules many child workflows in parallel (e.g. via
asyncio.gather), each individual payload might stay under the per-payload offloading threshold, so none get offloaded to S3. But the combinedRespondWorkflowTaskCompletedgRPC message can exceed gRPC's 4MB limit →GrpcMessageTooLarge.See WFL-1022 and this Slack thread for more details.
Summary
force_offload: bool = Falsekw-only param toPayloadEncoder.encode_payload_content().force: bool = Falseparam through_handle_offloading(), bypassing themin_size_bytesgate when set.Falsepreserves current behavior.Companion PR
The cumulative-size fix lives in the downstream
workflow_sdkcodec (separate PR), but it needs this upstream param to force-offload payloads that are individually small but cumulatively too large.