fix(1023): enable setting DAPR_GRPC_MAX_INBOUND_MESSAGE_SIZE_BYTES through environment variable#1024
Conversation
…rough environment variable Signed-off-by: Casper Nielsen <casper@diagrid.io>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1024 +/- ##
==========================================
- Coverage 86.63% 81.55% -5.08%
==========================================
Files 84 138 +54
Lines 4473 13491 +9018
==========================================
+ Hits 3875 11003 +7128
- Misses 598 2488 +1890 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
| elif settings.DAPR_GRPC_MAX_INBOUND_MESSAGE_SIZE_BYTES: | ||
| options.append( | ||
| ( | ||
| 'grpc.max_receive_message_length', |
There was a problem hiding this comment.
Should we set a value to max_send_message_length in this case?
There was a problem hiding this comment.
The outbound is supposed to be set to unlimited by default so we'll be able to pass any input size through the outbound channel. If users want to restrict the outbound they can still do so explicitly through the constructor. This conforms to the other SDKs
…workflow channels Workflow activity payloads over gRPC's 4 MiB default raised RESOURCE_EXHAUSTED because the durabletask channel ignored the message size limit. dapr#1024 plumbed DAPR_GRPC_MAX_INBOUND_MESSAGE_SIZE_BYTES through the Dapr API channel only; the workflow worker and clients still fell back to the gRPC default. Add a get_grpc_channel_options helper that resolves the limit from an explicit max_grpc_message_length kwarg, then the env var, then None, and thread it through WorkflowRuntime, DaprWorkflowClient, and the async DaprWorkflowClient. Unlike dapr#1024, set both send and receive limits symmetrically since workflow payloads cross the channel in both directions. Reuses the existing setting; no new env var. Signed-off-by: Martez Killens <5050479+tezizzm@users.noreply.github.com>
|
@holopin-bot @CasperGN sdk-badge Thank you! Here's a digital badge as a small token of appreciation. |
|
Congratulations @CasperGN, the maintainer of this repository has issued you a badge! Here it is: https://holopin.io/claim/cmqbf8fv00009je0a5oedap7i This badge can only be claimed by you, so make sure that your GitHub account is linked to your Holopin account. You can manage those preferences here: https://holopin.io/account. |
Description
Allow setting the max message size for GRPC packages through environment variable
Issue reference
We strive to have all PR being opened based on an issue, where the problem or feature have been discussed prior to implementation.
Please reference the issue this PR will close: #1023
Checklist
Please make sure you've completed the relevant tasks for this PR, out of the following list: