Skip to content

Backport poller b544f95#1256

Open
yuandrew wants to merge 2 commits into
temporalio:backport/poller-shutdown/b544f95from
yuandrew:backport-poller-b544f95
Open

Backport poller b544f95#1256
yuandrew wants to merge 2 commits into
temporalio:backport/poller-shutdown/b544f95from
yuandrew:backport-poller-b544f95

Conversation

@yuandrew
Copy link
Copy Markdown
Contributor

@yuandrew yuandrew commented May 12, 2026

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
Touches core worker shutdown/polling concurrency and RPC timing; mistakes could cause hangs or premature poll termination, though changes are targeted and covered by new unit/integration tests.

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

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

Adds targeted unit/core tests and new shared integration tests that start active timer+activity workflows and assert shutdown completes quickly without workflow task failures; also bumps the integration-test CLI override to v1.6.3-serverless and enables frontend.enableCancelWorkerPollsOnShutdown in dev server args.

Reviewed by Cursor Bugbot for commit 0155b5a. 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
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.

2 participants