Repository navigation
Stop the deps CLI fixture racing another worker for the requirements tree - #11063
Merged
Merged
Conversation
…tree
Repo tests (CPU, studio) failed on an unrelated PR with
shutil.Error: [Errno 2] No such file or directory:
studio/backend/requirements/.extras-filtered-_30x7ggm.txt
install_python_stack._filter_requirements writes .{stem}-filtered-XXXX.txt
BESIDE its source, deliberately, so relative -r and -c includes resolve. Its
source is the real requirements directory, which this fixture copies into every
fake venv it builds. Under xdist that is two workers on one directory: the name
was there when copytree listed the tree and gone when it read it.
Skip those by name. They are generated scratch, never a shipped requirement, so
a tree meant to mirror the real one should not carry them either.
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. |
Member
Author
|
@codex review |
Member
Author
|
@codex security review |
|
Codex Review: Didn't find any major issues. Keep it up! 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". |
shaojun
pushed a commit
to shaojun/unsloth
that referenced
this pull request
Sep 29, 2026
…tree (unslothai#11063) `Repo tests (CPU, studio)` failed on unslothai#11054, which touches three frontend files and cannot reach an installer test: ``` shutil.Error: [('.../studio/backend/requirements/.extras-filtered-_30x7ggm.txt', ..., "[Errno 2] No such file or directory")] FAILED tests/studio/install/test_studio_deps_cli.py::test_malformed_core_metadata_is_a_foreign_conflict ``` `install_python_stack._filter_requirements` writes its filtered copy beside the source on purpose, so relative -r and -c includes resolve, and its source is the real requirements tree this fixture copies into every fake venv. Under xdist that is two workers on one directory: the name was there when copytree listed the tree and gone when it read it. The fixture skips `.*-filtered-*.txt`. Ignored names are never scheduled for copying, so there is no window to lose, and a tree meant to mirror the shipped requirements no longer picks up another process's scratch either. Two tests, both failing without the ignore: the generated file is not copied, and the file vanishing between the listing and the read no longer fails the copy. The second was vacuous as first written, since copytree binds copy2 as a default argument and patching shutil.copy2 does not reach it; it passes copy_function explicitly now. No product file changes.
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.
Repo tests (CPU, studio)failed on #11054, which touches three frontend files and cannot reach an installer test:Why
install_python_stack._filter_requirementswrites its filtered copy beside the source, on purpose:req.parentisstudio/backend/requirements, the real tree.test_studio_deps_cli.pycopies that same real tree into every fake venv it builds. Under xdist the two run in different workers against one directory, so the generated file was listed bycopytreeand deleted by the other worker before it was read.Nothing about the PR under test, and nothing about the product: the beside-the-source write is documented and
test_diffusers_pin.pyalready depends on it. What is wrong is copying another process's scratch.The fix
The fixture skips
.*-filtered-*.txt. Ignored names are never scheduled for copying, so there is no window to lose, and a tree meant to mirror the shipped requirements no longer picks up a temp file either.Tests
Two, both failing without the ignore:
The second was vacuous when I first wrote it.
copytreebindscopy2as a default argument at definition, so patchingshutil.copy2does not reach it and the test passed without exercising anything. It passescopy_functionexplicitly now, and the mutation run confirms both fail with the ignore removed.