Conversation
There was a problem hiding this comment.
Pull Request Overview
This pull request introduces a feature announcement mechanism for gRPC workers to communicate their supported capabilities to the backend at connection time. This enables dynamic feature negotiation and supports extensibility for features like externalized payloads and scheduled tasks.
Key changes:
- Added
SayHellogRPC method with request/response messages for workers to announce enabled features to the backend - Implemented
AnnounceWorkerFeaturesAsyncwith backward-compatible error handling for backends that don't support the new method - Extended Azure Blob Payloads and Scheduled Tasks extensions to register their features in the worker configuration
Reviewed Changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
src/Worker/Grpc/WorkerFeatures.cs |
Defines constants for feature names (HistoryStreaming, ExternalizedPayloads, ScheduledTasks) used in feature announcement |
src/Worker/Grpc/Logs.cs |
Adds logging messages for announcing worker features and handling announcement failures |
src/Worker/Grpc/GrpcDurableTaskWorkerOptions.cs |
Introduces EnabledFeatures HashSet collection for tracking features registered by extensions |
src/Worker/Grpc/GrpcDurableTaskWorker.Processor.cs |
Implements AnnounceWorkerFeaturesAsync method that calls SayHello with enabled features, includes error handling for backward compatibility |
src/ScheduledTasks/ScheduledTasks.csproj |
Adds project reference to Worker.Grpc to access WorkerFeatures constants |
src/ScheduledTasks/Extension/DurableTaskWorkerBuilderExtensions.cs |
Registers ScheduledTasks feature with worker configuration using PostConfigure |
src/Grpc/orchestrator_service.proto |
Extends protocol with SayHello RPC method and associated SayHelloRequest/SayHelloResponse messages |
src/Extensions/AzureBlobPayloads/DependencyInjection/DurableTaskWorkerBuilderExtensions.AzureBlobPayloads.cs |
Registers ExternalizedPayloads feature with worker configuration |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
91d97fd to
d3fd31b
Compare
d3fd31b to
29738bb
Compare
There was a problem hiding this comment.
Pull Request Overview
Copilot reviewed 7 out of 7 changed files in this pull request and generated 4 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
src/ScheduledTasks/Extension/DurableTaskWorkerBuilderExtensions.cs
Outdated
Show resolved
Hide resolved
...zureBlobPayloads/DependencyInjection/DurableTaskWorkerBuilderExtensions.AzureBlobPayloads.cs
Show resolved
Hide resolved
…s.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
@YunchuWang I've opened a new pull request, #504, to work on those changes. Once the pull request is ready, I'll request review from you. |
|
@YunchuWang I've opened a new pull request, #505, to work on those changes. Once the pull request is ready, I'll request review from you. |
This pull request introduces support for worker capability negotiation in the gRPC worker, allowing features such as scheduled tasks and large payload externalization to be announced and used. The changes update both the protocol and the worker configuration to enable these capabilities, ensuring that the backend is informed of the worker's supported features.
Worker capability negotiation and protocol updates:
WorkerCapabilityenum inorchestrator_service.proto:SCHEDULED_TASKSandLARGE_PAYLOADS, with detailed comments describing their purpose.versions.txtto reflect the new capabilities.gRPC worker configuration improvements:
Capabilitiescollection toGrpcDurableTaskWorkerOptions, allowing dynamic registration of supported capabilities, and defaulting toHistoryStreaming.HistoryStreaming.Extension support for new capabilities:
LargePayloadscapability when enabled.ScheduledTaskscapability when enabled.Dependency and import updates: