-
Notifications
You must be signed in to change notification settings - Fork 52
Partial orchestration workitem completion support (Merge after next dts dp release) #514
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds support for partial (chunked) orchestration work item completions to handle scenarios where orchestration responses exceed gRPC message size limits. The implementation automatically splits large responses into multiple chunks that are sent sequentially to the backend.
Key changes:
- Added
isPartialfield to theOrchestratorResponseprotobuf message to indicate chunked completions - Introduced
MaxCompleteOrchestrationWorkItemSizePerChunkconfiguration option (default 3.9MB) inGrpcDurableTaskWorkerOptions - Implemented automatic chunking logic in
CompleteOrchestratorTaskWithChunkingAsyncthat splits responses when they exceed the size threshold
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| src/Grpc/orchestrator_service.proto | Added isPartial field (field 8) to OrchestratorResponse message to support chunked completions |
| src/Grpc/versions.txt | Updated timestamp to reflect protobuf file update |
| src/Worker/Grpc/GrpcDurableTaskWorkerOptions.cs | Added MaxCompleteOrchestrationWorkItemSizePerChunk property with default value of 4089446 bytes (3.9MB) |
| src/Worker/Grpc/GrpcDurableTaskWorker.Processor.cs | Added CompleteOrchestratorTaskWithChunkingAsync method to handle automatic response chunking and modified orchestrator completion to use this new chunking method |
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.
Co-authored-by: Copilot <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 8 out of 8 changed files in this pull request and generated 4 comments.
samples/ScheduleWebApp/Orchestrations/CacheClearingOrchestratorV2.cs
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 7 out of 7 changed files in this pull request and generated 8 comments.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 7 out of 7 changed files in this pull request and generated 4 comments.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 7 out of 7 changed files in this pull request and generated 7 comments.
Co-authored-by: Copilot <[email protected]>
…abletask-dotnet into wangbill/autochunk
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 7 out of 7 changed files in this pull request and generated no new comments.
This pull request introduces support for chunked (partial) orchestrator responses in the gRPC worker protocol, enabling orchestration responses that exceed a configurable size limit to be split into multiple parts. This ensures large orchestrator responses can be handled efficiently and reliably without exceeding message size limits. The changes include protocol updates, worker-side chunking logic, server-side chunk accumulation, and configuration options.
Chunked Orchestrator Response Support
isPartialfield to theOrchestratorResponsemessage inorchestrator_service.prototo indicate chunked responses, and updated the protocol version reference. [1] [2]GrpcDurableTaskWorker.Processor.csto automatically split oversized orchestrator responses into multiple chunks, sending each chunk withisPartial=trueexcept for the last. This includes validation to prevent any single action from exceeding the maximum chunk size. [1] [2]MaxCompleteOrchestrationWorkItemSizePerChunk(default 3.9MB) toGrpcDurableTaskWorkerOptionsto control chunk size.Server-Side Chunk Handling
TaskHubGrpcServer.csto accumulate partial orchestrator response chunks per instance, assembling them into a complete response once all chunks are received, and then completing the orchestration work item. Handles both chunked and non-chunked responses. [1] [2] [3]Other Updates and Minor Improvements
CacheClearingOrchestratorV2demonstrating orchestration logic.These changes collectively improve the robustness of orchestrator communication in scenarios with large payloads and add flexibility for future scaling.