Skip to content

Add optional parameter to force payload offloading - #608

Merged
Deimos28 merged 1 commit into
mainfrom
charlesedouardcady/wfl-1022-payload-offloading-does-not-handle-cumulative-grpc-size
Aug 11, 2026
Merged

Add optional parameter to force payload offloading#608
Deimos28 merged 1 commit into
mainfrom
charlesedouardcady/wfl-1022-payload-offloading-does-not-handle-cumulative-grpc-size

Conversation

@Deimos28

@Deimos28 Deimos28 commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

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 combined RespondWorkflowTaskCompleted gRPC message can exceed gRPC's 4MB limit → GrpcMessageTooLarge.

See WFL-1022 and this Slack thread for more details.

Summary

  • Adds force_offload: bool = False kw-only param to PayloadEncoder.encode_payload_content().
  • Plumbs a force: bool = False param through _handle_offloading(), bypassing the min_size_bytes gate when set.
  • Fully backward-compatible: default False preserves current behavior.

Companion PR

The cumulative-size fix lives in the downstream workflow_sdk codec (separate PR), but it needs this upstream param to force-offload payloads that are individually small but cumulatively too large.

@Deimos28
Deimos28 requested review from dambrosidenis and paulcacheux and removed request for dambrosidenis August 11, 2026 11:24
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
Deimos28 force-pushed the charlesedouardcady/wfl-1022-payload-offloading-does-not-handle-cumulative-grpc-size branch from e56f42b to 57c1afe Compare August 11, 2026 11:37
@Deimos28
Deimos28 merged commit 22608d4 into main Aug 11, 2026
11 checks passed
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.

2 participants