Skip to content

Support worker features announcement#502

Merged
YunchuWang merged 7 commits intomainfrom
wangbill/logwok
Nov 17, 2025
Merged

Support worker features announcement#502
YunchuWang merged 7 commits intomainfrom
wangbill/logwok

Conversation

@YunchuWang
Copy link
Copy Markdown
Member

@YunchuWang YunchuWang commented Nov 13, 2025

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:

  • Added new capability flags to the WorkerCapability enum in orchestrator_service.proto: SCHEDULED_TASKS and LARGE_PAYLOADS, with detailed comments describing their purpose.
  • Updated the protocol version reference in versions.txt to reflect the new capabilities.

gRPC worker configuration improvements:

  • Introduced a Capabilities collection to GrpcDurableTaskWorkerOptions, allowing dynamic registration of supported capabilities, and defaulting to HistoryStreaming.
  • Modified the processor to send the full set of configured capabilities to the backend during worker registration, instead of only HistoryStreaming.

Extension support for new capabilities:

  • Updated the Azure Blob Payloads extension to register the LargePayloads capability when enabled.
  • Updated the Scheduled Tasks extension to register the ScheduledTasks capability when enabled.

Dependency and import updates:

  • Added missing project references and protocol imports in Scheduled Tasks and Azure Blob Payloads extensions to support capability registration. [1] [2] [3] [4]

Copy link
Copy Markdown
Contributor

Copilot AI left a 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 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 SayHello gRPC method with request/response messages for workers to announce enabled features to the backend
  • Implemented AnnounceWorkerFeaturesAsync with 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.

@YunchuWang YunchuWang force-pushed the wangbill/logwok branch 2 times, most recently from 91d97fd to d3fd31b Compare November 13, 2025 02:01
Copilot AI review requested due to automatic review settings November 14, 2025 16:37
Copy link
Copy Markdown
Contributor

Copilot AI left a 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.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

…s.cs

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings November 14, 2025 22:17
Copy link
Copy Markdown
Contributor

Copilot AI commented Nov 14, 2025

@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.

Copy link
Copy Markdown
Contributor

Copilot AI commented Nov 14, 2025

@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.

Copy link
Copy Markdown
Contributor

Copilot AI left a 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.

Copy link
Copy Markdown
Contributor

Copilot AI left a 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 3 comments.

Copilot AI review requested due to automatic review settings November 17, 2025 21:17
Copy link
Copy Markdown
Contributor

Copilot AI left a 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 9 out of 9 changed files in this pull request and generated 2 comments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants