Conversation
jmaeagle99
approved these changes
May 14, 2026
yuandrew
merged commit May 14, 2026
c9807ed
into
temporalio:backport/poller-shutdown/b544f95
36 of 38 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
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
ShutdownWorkerRPC to be spawned duringWorker::initiate_shutdown(and awaiting its completion duringWorker::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
NamespaceCapabilitiesstruct exposed viaget_namespace_capabilities().Adjusts gRPC test helpers/callback-based service to include
grpc-status: 0trailers, bumps integration CLI override tov1.6.3-serverless, and adds targeted unit/integration tests covering the new shutdown/poll termination behavior (including enablingfrontend.enableCancelWorkerPollsOnShutdown).Reviewed by Cursor Bugbot for commit 27d6b70. Bugbot is set up for automated code reviews on this repo. Configure here.