Skip to content

registry: pull large blobs from mirrors that don't support byte ranges - #67

Merged
cobanov merged 3 commits into
ollaya-dev:mainfrom
Outstanding2291:main
Oct 9, 2026
Merged

cobanov merged 3 commits into
ollaya-dev:mainfrom
Outstanding2291:main

Conversation

@Outstanding2291

Copy link
Copy Markdown
Contributor

Some Hugging Face mirrors (Jfrog Artifactory's /resolve/ in particular) answer
a range request with the whole body as 200 instead of 206 Partial
Content. The puller treated any non-206 as fatal "corrupt data", so a
model whose weights blob exceeds the single-stream threshold (32 MiB)
could never be pulled from such a mirror — which is the default for any
large model hosted there.

Two changes:

  • A mirror that ignores Range now falls back to a single stream instead
    of failing. Ranges are only a download strategy; the blob is streamed
    once and verified by digest as before. A new Error::NoRanges signal
    replaces the misleading Corrupt error so the fallback is explicit.
  • A 408 Request Timeout on that single stream is now retried with
    backoff (it was treated as terminal, since is_retryable only retried
    connect/body/timeout/5xx). A mirror or proxy that abandons the
    transfer transiently no longer kills the pull outright.

Covers both the range path (fetch_ranges) and the single-stream path
(fetch_whole): both gate retries on Error::is_retryable.

Regression tests: pulling a blob from a server that ignores Range, and
one that answers a single 408 before serving the blob.

@cobanov
cobanov merged commit b2ef760 into ollaya-dev:main Oct 9, 2026
7 checks passed
@cobanov

cobanov commented Oct 9, 2026

Copy link
Copy Markdown
Member

Merged, thanks @Outstanding2291. A small follow-up on main (38ae7bb) corrects the 408 test's comment: with a 40 MiB blob it retries the range request, whose 200 then falls back to a single stream.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants