-
Notifications
You must be signed in to change notification settings - Fork 3.3k
feat(retry): add retry feature #2740
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Introduce docling.utils.http_client with a retry-configured Session and helper so remote calls share the same backoff settings. Refactor image download, API image requests, and HTML backend remote fetches to use the helper, enabling consistent retries for both sync and streaming paths without changing call sites’ behavior. Signed-off-by: akai <[email protected]>
Update docling.utils.http_client to type status_forcelist as Collection[int] in the retry builder/session helper so it matches the requests.Retry signature. Signed-off-by: akai <[email protected]>
|
✅ DCO Check Passed Thanks @wantbook-book, all your commits are properly signed off. 🎉 |
Merge ProtectionsYour pull request matches the following merge protections and will not be merged until they are valid. 🟢 Enforce conventional commitWonderful, this rule succeeded.Make sure that we follow https://www.conventionalcommits.org/en/v1.0.0/
|
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
|
@wantbook-book Many thanks for the effort, this looks definitely useful. However, some tests are failing. Could you please review those? To run locally: |
|
I ran Do you have any suggestions for how to fix this? |
Issue resolved by this Pull Request:
Resolves #2465
Introduced a reusable retry-enabled HTTP helper (
docling.utils.http_client) and refactored all existing remoterequestscalls to use it. This makes download helpers, HTML backend image fetches, and OpenAI-compatible image requests more resilient to transient errors and rate limiting without duplicating retry configuration.Checklist: