Skip to content

Add worker_poll_complete_on_shutdown namespace capability#719

Merged
rkannan82 merged 1 commit intomasterfrom
kannan/poll_cancel_shutdown-capability/api
Feb 13, 2026
Merged

Add worker_poll_complete_on_shutdown namespace capability#719
rkannan82 merged 1 commit intomasterfrom
kannan/poll_cancel_shutdown-capability/api

Conversation

@rkannan82
Copy link
Contributor

@rkannan82 rkannan82 commented Feb 13, 2026

What Changed

Adds a new namespace capability worker_poll_complete_on_shutdown to indicate whether the server supports server-side completion of outstanding worker polls on shutdown.

Why

When this capability is enabled, the server will complete polls for workers that:

  1. Send WorkerInstanceKey in their poll requests
  2. Call ShutdownWorker with the same WorkerInstanceKey

SDKs can check this capability via DescribeNamespace to decide whether to rely on server-side poll completion or handle it client-side.

How

  • Added bool worker_poll_complete_on_shutdown = 8 to NamespaceInfo.Capabilities message in namespace/v1/message.proto

Related PRs

@rkannan82 rkannan82 requested review from a team, cretz and yuandrew February 13, 2026 19:20
@rkannan82 rkannan82 force-pushed the kannan/poll_cancel_shutdown-capability/api branch from 846873a to 1e33e4b Compare February 13, 2026 19:29
rkannan82 added a commit to temporalio/temporal that referenced this pull request Feb 13, 2026
Exposes the EnableCancelWorkerPollsOnShutdown dynamic config as a
namespace capability. This allows SDKs to check whether the server
supports server-side poll completion on shutdown before relying on it.

Depends on: temporalio/api#719 (proto changes)
@rkannan82 rkannan82 changed the title Add worker_poll_cancellation_on_shutdown namespace capability Add worker_poll_complete_on_shutdown namespace capability Feb 13, 2026
@rkannan82 rkannan82 force-pushed the kannan/poll_cancel_shutdown-capability/api branch from 1e33e4b to efc4fc9 Compare February 13, 2026 19:33
@rkannan82 rkannan82 enabled auto-merge (squash) February 13, 2026 19:38
This capability indicates whether the server supports server-side
completion of outstanding worker polls on shutdown. When enabled,
the server will complete polls for workers that send WorkerInstanceKey
in their poll requests and call ShutdownWorker with the same key.
@rkannan82 rkannan82 force-pushed the kannan/poll_cancel_shutdown-capability/api branch from efc4fc9 to 49b65e4 Compare February 13, 2026 19:40
@rkannan82 rkannan82 merged commit b66af7a into master Feb 13, 2026
4 checks passed
@rkannan82 rkannan82 deleted the kannan/poll_cancel_shutdown-capability/api branch February 13, 2026 19:42
rkannan82 added a commit to temporalio/temporal that referenced this pull request Feb 13, 2026
Exposes the EnableCancelWorkerPollsOnShutdown dynamic config as a
namespace capability. This allows SDKs to check whether the server
supports server-side poll completion on shutdown before relying on it.

Depends on: temporalio/api#719 (proto changes)
rkannan82 added a commit to temporalio/temporal that referenced this pull request Feb 13, 2026
Exposes the EnableCancelWorkerPollsOnShutdown dynamic config as a
namespace capability. This allows SDKs to check whether the server
supports server-side poll completion on shutdown before relying on it.

Depends on: temporalio/api#719 (proto changes)
rkannan82 added a commit to temporalio/temporal that referenced this pull request Feb 13, 2026
Exposes the EnableCancelWorkerPollsOnShutdown dynamic config as a
namespace capability. This allows SDKs to check whether the server
supports server-side poll completion on shutdown before relying on it.

Depends on: temporalio/api#719 (proto changes)
rkannan82 added a commit to temporalio/temporal that referenced this pull request Feb 13, 2026
Exposes the EnableCancelWorkerPollsOnShutdown dynamic config as a
namespace capability. This allows SDKs to check whether the server
supports server-side poll completion on shutdown before relying on it.

Depends on: temporalio/api#719 (proto changes)
rkannan82 added a commit to temporalio/temporal that referenced this pull request Feb 13, 2026
## What Changed
Exposes the `EnableCancelWorkerPollsOnShutdown` dynamic config as a
namespace capability in `DescribeNamespace` response.

## Why
SDKs need to know whether the server supports server-side poll
completion on shutdown before relying on it. This capability allows SDKs
to check via `DescribeNamespace` and decide:
- If `true`: Send `WorkerInstanceKey` in polls and rely on server to
complete polls on shutdown
- If `false`: Handle poll completion client-side (existing behavior)

## How
- `service/frontend/namespace_handler.go`: Added
`WorkerPollCompleteOnShutdown` to capabilities
- `service/frontend/namespace_handler_test.go`: Added test coverage for
the new capability

## Dependencies
- Bumped `go.temporal.io/api` to `v1.62.2-0.20260213194545-c89ebac64f01`
to include new proto field from temporalio/api#719
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