Skip to content

Backport poller b544f95 - #1256

Merged
yuandrew merged 3 commits into
temporalio:backport/poller-shutdown/b544f95from
yuandrew:backport-poller-b544f95
May 14, 2026
Merged

yuandrew merged 3 commits into
temporalio:backport/poller-shutdown/b544f95from
yuandrew:backport-poller-b544f95

Conversation

@yuandrew

@yuandrew yuandrew commented May 12, 2026

Copy link
Copy Markdown
Contributor

What was changed

Back port #1224 (commit 64cb6ed) onto commit b544f95 to fix poller shutdown for sdk-python 1.26.0

Why?

Back port poller shutdown fix to affected SDKs

Checklist

  1. How was this tested: CI
  2. Any docs updates needed? No

Note

Medium Risk
Changes worker shutdown sequencing and poll stream termination semantics, which can affect how in-flight polls and shutdown are coordinated across SDKs. Risk is moderate because it touches core worker lifecycle and long-poll handling, but is covered by added unit/integration tests.

Overview
Fixes a graceful shutdown deadlock by moving the ShutdownWorker RPC to be spawned during Worker::initiate_shutdown (and awaiting its completion during Worker::shutdown) so the server can promptly flush in-flight long polls.

Updates poller streams to treat an empty poll response received after shutdown is initiated as a termination signal (instead of a timeout to retry), and refactors capability flags into a shared NamespaceCapabilities struct exposed via get_namespace_capabilities().

Adjusts gRPC test helpers/callback-based service to include grpc-status: 0 trailers, bumps integration CLI override to v1.6.3-serverless, and adds targeted unit/integration tests covering the new shutdown/poll termination behavior (including enabling frontend.enableCancelWorkerPollsOnShutdown).

Reviewed by Cursor Bugbot for commit 27d6b70. Bugbot is set up for automated code reviews on this repo. Configure here.

@yuandrew
yuandrew requested a review from a team as a code owner May 12, 2026 15:43
@yuandrew
yuandrew merged commit c9807ed into temporalio:backport/poller-shutdown/b544f95 May 14, 2026
36 of 38 checks passed
@yuandrew
yuandrew deleted the backport-poller-b544f95 branch May 14, 2026 19:00
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.

3 participants