Add partial purge timeout support in gRPC proto mapping#3398
Add partial purge timeout support in gRPC proto mapping#3398YunchuWang wants to merge 3 commits intodevfrom
Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates the host-side gRPC/proto mapping to support partial purge semantics by forwarding a purge timeout from the worker to DTFx and returning completion status back across gRPC. It also introduces new GitHub Actions workflows and agent instruction documents (which are not described in the PR summary and materially expand the PR scope).
Changes:
- Add
timeouttoPurgeInstanceFilterproto and map it to DTFxPurgeInstanceFilter.Timeout. - Forward
PurgeResult.IsCompleteinto the gRPC purge response (isComplete). - Add scheduled GitHub Actions workflows plus Copilot/agent instruction documents for automated verification and daily review.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 9 comments.
Show a summary per file
| File | Description |
|---|---|
src/WebJobs.Extensions.DurableTask/ProtobufUtils.cs |
Maps proto timeout into DTFx purge filter; attempts to map purge completion into proto response. |
src/WebJobs.Extensions.DurableTask/Grpc/Protos/orchestrator_service.proto |
Adds google.protobuf.Duration timeout = 4 to PurgeInstanceFilter. |
.github/workflows/pr-verification.yaml |
Adds a scheduled PR verification agent workflow (Azurtite + Copilot CLI + label/comment automation). |
.github/workflows/daily-code-review.yaml |
Adds a scheduled daily code review agent workflow (build/test + Copilot CLI + PR/issue automation). |
.github/copilot-instructions.md |
Adds general AI assistant architectural guidance for the repo. |
.github/agents/pr-verification.agent.md |
Adds detailed instructions for the PR verification agent behavior. |
.github/agents/issue-triage.agent.md |
Adds detailed instructions for an issue triage agent behavior. |
.github/agents/daily-code-review.agent.md |
Adds detailed instructions for a daily code review agent behavior. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
e3a319e to
748c68a
Compare
There was a problem hiding this comment.
Pull request overview
Updates the gRPC ↔ DTFx mapping layer in WebJobs.Extensions.DurableTask to better support partial purge scenarios by propagating additional purge result metadata back to gRPC callers.
Changes:
- Propagates
PurgeResult.IsCompleteinto the gRPCPurgeInstancesResponse.isCompletefield. - Minor formatting/whitespace adjustments in
ProtobufUtilsevent mapping blocks.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
- Add timeout field (4) to PurgeInstanceFilter proto message - Map proto timeout to DTFx PurgeInstanceFilter.Timeout - Forward PurgeResult.IsComplete to proto response (bug fix) - Zero breaking changes
748c68a to
b674f9c
Compare
- Tests for CreatePurgeInstancesResponse: IsComplete true/false/null mapping - Tests for ToPurgeInstanceFilter: basic fields, status filter, empty status list - Timeout mapping test deferred until DTFx Core dependency includes PurgeInstanceFilter.Timeout
There was a problem hiding this comment.
Pull request overview
This PR extends the gRPC↔DTFx purge mapping to support partial purges by flowing a new timeout field from PurgeInstanceFilter into DurableTask.Core.PurgeInstanceFilter.Timeout, and by returning PurgeResult.IsComplete back to the gRPC response so callers can loop until completion.
Changes:
- Add
google.protobuf.Duration timeoutto thePurgeInstanceFilterproto message. - Map proto
timeout→ DTFxPurgeInstanceFilter.TimeoutinProtobufUtils.ToPurgeInstanceFilter. - Populate
PurgeInstancesResponse.isCompletefromPurgeResult.IsComplete, and add unit tests forisCompletemapping + basic purge-filter mapping.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
src/WebJobs.Extensions.DurableTask/Grpc/Protos/orchestrator_service.proto |
Adds the new timeout field to the purge filter message. |
src/WebJobs.Extensions.DurableTask/ProtobufUtils.cs |
Implements request/response mapping for purge timeout and isComplete. |
test/FunctionsV2/ProtobufUtilsTests.cs |
Adds tests for isComplete propagation and basic purge filter conversions. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Summary
Map the new
timeoutproto field inPurgeInstanceFilterto DTFx'sPurgeInstanceFilter.Timeout, and forwardPurgeResult.IsCompleteback to the proto response. This enables the isolated worker SDK's partial purge feature to work end-to-end through the gRPC boundary.Motivation
The isolated worker SDK communicates with the Functions host via gRPC. When purging large numbers of instances, the gRPC call times out before the host-side purge completes, causing:
OperationCanceledExceptionon the host sideRpcException(StatusCode.Internal)on the worker sideWith this change, the SDK can pass a
timeoutthrough the proto, and the host maps it to DTFx'sPurgeInstanceFilter.Timeout. The purge stops within the timeout, returns accurate counts, and setsisComplete = falseso the caller knows to loop.Changes
google.protobuf.Duration timeout = 4toPurgeInstanceFiltermessageProtobufUtils.ToPurgeInstanceFilter: Map prototimeout→ DTFxPurgeInstanceFilter.TimeoutProtobufUtils.CreatePurgeInstancesResponse: Map DTFxPurgeResult.IsComplete→ protoisComplete(bug fix — was previously not being set despite field existing in proto)Breaking Changes
None. Additive proto field + bug fix for existing but unpopulated response field.
Dependencies
Benchmark Results (500K instances, EP1, isolated worker)
Replaces #3397 (which had unrelated agent changes).