Repository navigation
Allowlist the huggingface-hub backoff loop that reddened every PR - #8130
Closed
danielhanchen wants to merge 1 commit into
Closed
danielhanchen wants to merge 1 commit into
danielhanchen wants to merge 1 commit into
Conversation
huggingface-hub 1.27 refactored http_backoff into a shared _http_backoff generator, which moved the retry loop and changed the code inside it. The baseline hashes the matched code, so a changed loop body correctly reopens the finding for review rather than staying suppressed, and scan-packages went CRITICAL on the hf-stack, studio and extras legs of every pull request. Reviewed against the 1.27.0 sdist: huggingface_hub/utils/_http.py L461 is the retry loop of _http_backoff. It is bounded, not a beacon: nb_tries increments each pass and once nb_tries > max_retries the helper calls hf_raise_for_status and the loop ends. The two sibling _http.py entries already in this file cover the same construct at its previous locations. Generated with scan_packages.py's own evidence hash, and inserted beside its siblings so the diff is the eight added lines and nothing else.
This was referenced Aug 8, 2026
Member
Author
|
main is red in three independent places right now, and each of these three PRs fixes exactly one of them, so every one of them still shows the other two as failures. Merging all three in any order turns main green; merging any one alone will not.
None of the three touches the others' files, so there are no conflicts between them. |
Member
Author
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.
pip scan-packagesis failing on every open pull request, on thehf-stack,studioandextraslegs:huggingface-hub 1.27 refactored
http_backoffandhttp_stream_backoffonto a shared_http_backoffgenerator. That moved the retry loop and changed the code inside it, and since the baseline hashes the matched code rather than its line number, a changed body correctly reopens the finding instead of staying silently suppressed. The two_http.pyentries already in the baseline cover the same construct at its earlier locations.Reviewed against the 1.27.0 sdist. The loop is bounded, not a beacon:
The entry was generated with
scan_packages.py's own evidence hash and inserted beside its siblings, so the diff is eight added lines and no reordering of the other 222 entries.This does not fix the three
Repo tests (CPU)failures currently on main; #8115 covers those.