Repository navigation
[CI] Reduce flaky tests (jedi cache, read-after-write, fewer reruns) - #5058
Merged
Merged
Conversation
…write, reruns 8 -> 3 Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Wauplin
commented
Oct 1, 2026
Wauplin
left a comment
Collaborator
Author
There was a problem hiding this comment.
✔️ (will merge if CI gets green)
|
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update. |
Contributor
|
This PR has been shipped as part of the v2.2.0 release. |
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
This PR fixes the flaky tests seen in CI over the last ~12h (2026-10-01):
test_utils_strict_dataclass.py::test_autocompletion_*failed withEOFError: Ran out of input. parso writes its pickle cache in~/.cache/jedinon-atomically, so one xdist worker could read a half-written file from another worker. Each test now gets its own cache directory intmp_path.time.sleep(1)after writes, only in the tests that actually failed:test_list_and_delete_lfs_files: the listing was stale after upload and after delete.test_access_requests_normal_usage: the accepted list was empty aftergrantand not updated aftercancel.test_copy_files_bucket_to_different_bucket_folder: "File not found in Xet storage" right after the upload.Not addressed here: the Windows + hf_xet commit 400 "LFS pointer pointed to a file that does not exist". It hasn't happened since 12:16 UTC and is most likely server-side.
🤖 Generated with Claude Code
Note
Low Risk
Test and CI workflow changes only; no production library behavior changes.
Overview
Reduces CI flake by tightening pytest reruns from 8 to 3 on Ubuntu and Windows, since recent runs rarely needed more than one retry.
Jedi/parso cache races under
pytest-xdistare addressed with anisolated_jedi_cachefixture that pointsjedi.settings.cache_directoryat per-testtmp_path, applied to thetest_autocompletion_*tests intest_utils_strict_dataclass.py.Hub staging read-after-write lag is worked around with
time.sleep(1)after writes in the tests that failed in CI: bucket copy afterbatch_bucket_files, LFS list/delete intest_list_and_delete_lfs_files, and grant/cancel/reject/accept steps intest_access_requests_normal_usage.Reviewed by Cursor Bugbot for commit ca7cf63. Bugbot is set up for automated code reviews on this repo. Configure here.