Repository navigation
Tests: stop a GPU-selection route test leaking a CHAT owner into the upsampler tests - #14169
Merged
Merged
Conversation
Member
Author
|
@codex review |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex Review: Didn't find any major issues. Another round soon, please! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
This was referenced Oct 19, 2026
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.
Summary
(Python 3.13, a-k)failed three of #14137's new FLUX.3 prompt upsampler tests on #14151's run (basedef3451e), on two different xdist workers:On their own the tests pass on main (93 passed, serially and with
-n 4). They fail only after another test has run in the same process. #14151 does not touch either file, so any PR whose worker draws this order will hit it.Cause
FluxPromptUpsampler.generatestarts the sidecar only while_image_model_owns_gpu(), which readsgpu_arbiter.current_owner()(image model or nobody). That arbiter is process-wide, and the upsampler tests never pinned it.I ran each
tests/test_[a-k]*file that touches the arbiter in front oftest_flux3_prompt_upsampler.pyin one process. Onlytest_gpu_selection.pyreproduces the failures, and it gives the same three IDs. Tracinggpu_arbiter._owneraround each test points at one test:TestRouteErrors::test_inference_route_returns_400_for_invalid_gpu_ids(None -> 'chat'). It drives the real/loadroute, which claims the GPU for CHAT throughacquire_for_requestbefore the stubbed backend refusesgpu_ids = [99]. Nothing puts the arbiter back afterwards.So the tests are what is wrong here: one leaks global state, the other depends on it.
A failed chat load leaving CHAT claimed with nothing loaded is a separate product question, which this PR does not change. I could not find a failure path in
routes/inference.pythat callsrelease_chat_gpu_claim(). It may be worth a look on its own.Change
Test only:
test_gpu_selection.py:TestRouteErrors.setUpsaves the arbiter's module state (_owner,_owner_epoch,_owner_account,_prior_account) and restores it withaddCleanup. The route tests therefore leave the arbiter as they found it.test_flux3_prompt_upsampler.py: the autouse_cleanfixture pinsgpu_arbiter._ownertoNone, the fresh-start state those tests assume. The tests about a different owner already set it themselves and still do.Testing
tests/test_gpu_selection.py tests/test_flux3_prompt_upsampler.pyin one process, in that order:TestRouteErrorsrestoretest_gpu_selection.py,test_flux3_prompt_upsampler.pyandtest_gpu_arbiter.pytogether with-n 4give 218 passed.