fix: allow replacing worker client on default runtime - #1707
Open
Sakshamm-Goyal wants to merge 2 commits into
Open
fix: allow replacing worker client on default runtime#1707Sakshamm-Goyal wants to merge 2 commits into
Sakshamm-Goyal wants to merge 2 commits into
Conversation
tconley1428
reviewed
Jul 31, 2026
Contributor
Author
|
Addressed the runtime-selection concern in 8c313d8. The setter now compares only an explicitly configured runtime; it no longer creates The regression now creates the worker with a non-default runtime and replaces its client with one that has no runtime argument, which failed under the previous check. Source compilation and focused Mypy passed. I attempted the targeted pytest path, but this worktree's SDK Core submodule is absent, so its bridge extension cannot be built locally; fresh CI is queued for the full pinned-environment test. |
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.
Fixes #657.
A replacement client with no explicit runtime uses
Runtime.default(), but the worker compared the configured runtime value directly and treatedNoneas a different runtime. Resolve the replacement client runtime with the same defaulting rule used during worker construction before comparing identities.Regression coverage connects a second client without supplying
runtimeand verifies it can replace a worker client. The explicit different-runtime rejection remains covered.Validated with:
pytest tests/worker/test_workflow.py::test_workflow_replace_worker_client_default_runtime tests/worker/test_workflow.py::test_workflow_replace_worker_client_diff_runtimes_fail -qruff format --check temporalio/worker/_worker.py tests/worker/test_workflow.pygit diff --check