Skip to content

feat: expose configurable gRPC max receive message size#136

Merged
bobh66 merged 2 commits intocrossplane-contrib:mainfrom
gravufo:feat/max-recv-message-size
Apr 30, 2026
Merged

feat: expose configurable gRPC max receive message size#136
bobh66 merged 2 commits intocrossplane-contrib:mainfrom
gravufo:feat/max-recv-message-size

Conversation

@gravufo
Copy link
Copy Markdown
Contributor

@gravufo gravufo commented Apr 30, 2026

Description

Adds a --max-recv-message-size CLI flag (value in MB, default 4) that is wired through to function.MaxRecvMessageSize from the function SDK. This lets operators raise the gRPC server's max receive size when the function emits enough desired resources to exceed the default 4 MB cap.

When the deletion-ordering option is used on a sizeable pipeline, function-sequencer can produce a large desired-state payload. Crossplane then fails XR reconciliation with:

rpc error: code = ResourceExhausted desc = grpc: received message larger than max (10927406 vs. 4194304)

This matches the same flag added in function-template-go#91 and aligns with the discussions in function-auto-ready#47, crossplane#6392, and function-sdk-go#194.

Behavior

  • New flag: --max-recv-message-size (int, MB, default 4) — preserves existing behavior when unset.
  • The value is multiplied by 1024 * 1024 and passed to function.MaxRecvMessageSize.

Testing

  • go build ./...
  • go test ./...
  • go vet ./...
  • golangci-lint run ./...

Fixes #135

@gravufo gravufo requested review from bobh66 and turkenh as code owners April 30, 2026 22:25
Adds a --max-recv-message-size CLI flag (in MB, default 4) so users
can raise the gRPC server limit when the function emits enough desired
resources to exceed the default 4 MB cap, which otherwise causes XR
reconciliation to fail with ResourceExhausted.

Fixes crossplane-contrib#135

Signed-off-by: Christian Artin <gravufo@gmail.com>
@gravufo gravufo force-pushed the feat/max-recv-message-size branch from d3a6746 to b599fb6 Compare April 30, 2026 22:29
Copy link
Copy Markdown
Collaborator

@bobh66 bobh66 left a comment

Choose a reason for hiding this comment

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

LGTM - thanks @gravufo !

@bobh66 bobh66 merged commit baf805e into crossplane-contrib:main Apr 30, 2026
6 checks passed
@gravufo gravufo deleted the feat/max-recv-message-size branch April 30, 2026 23:41
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.

Expose gRPC MaxRecvMessageSize

2 participants