Repository navigation
Allow replacing a worker's client when both use the default runtime - #1953
Open
wuchris-ch wants to merge 1 commit into
Open
wuchris-ch wants to merge 1 commit into
wuchris-ch wants to merge 1 commit into
Conversation
wuchris-ch
force-pushed
the
fix/worker-client-default-runtime
branch
from
October 10, 2026 04:20
3409509 to
e1900cd
Compare
This branch has not been deployed
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.
The bug: If you swap a worker's client (
worker.client = new_client) and neither client was given aruntime, it fails with "New client is not on the same runtime as the existing client". But both clients are acutally on the same default runtime.Why: A client with no
runtimefalls back toRuntime.default(). The check compared against the client's configured runtime, which isNone, so it never matched.The fix:
Still rejected (the case from the #1707 review): a worker on a custom runtime plus a new client with no
runtime. That client is on the default runtime, so it's a real mismatch.Tests:
test_workflow_replace_worker_client_implicit_default_runtime: fails onmainwith the error above, passes with this change.test_workflow_replace_worker_client_implicit_default_runtime_mismatch_fail: the custom runtime case.poe build-develop,poe lintandpoe test(1446 passed, 9 skipped). The new tests also pass with--workflow-environment time-skipping.changelog/fixed/relay-racing-raccoon.md(changelog-tool checkpasses).