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.
This PR adds a
StreamInstanceHistory
API to both theBackendService
andTaskHubSidecarService
services in theprotos
directory. The purpose of these APIs is to allow a worker to get the history of an orchestration as a series of one-way messages to avoid exceeding gRPC message size limits.With this change, the backend service can now return orchestrator work items that exclude the history if the history is known to be too large. When it does this, it should set the
requiresHistoryStreaming
field to true so that the worker can distinguish between no history and omitted history. Workers opt into this behavior change by setting a newGetWorkItemsRequest.supportsHistoryStreaming
field.This PR also introduces a new
numEventsProcessed
field toCompleteOrchestrationWorkItemRequest
. This is a new optional field that tells the backend service how many new events in the received work item were actually processed. This is needed in cases where a worker is only able to process a subset of the events in the work item. The backend service can use this information to only delete a subset of the "inbox" messages that were sent to the worker. The expectation is that the backend will re-send the unprocessed events in subsequent work items.