fix: retry transient failures when fetching the docs index source - #121
Merged
Merged
Conversation
A full index build issues one request per manifest entry, and a single transient TLS or overload failure aborted the whole build. The daily Docs workflow and the integration job on main both failed this way on 2026-09-13. Transport errors and 429/5xx responses are now retried with exponential backoff.
|
Concurrent page fetches retried in lockstep with a fixed schedule and ignored a server-requested delay. A Retry-After header now wins, capped at 30 seconds, and the fallback backoff uses full jitter.
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.
Why
The daily Docs workflow (run 34728251207) and the integration job on main (run 34774829942) both failed on 2026-09-13 with an
httpx.ConnectErrorraised during the TLS handshake of one page fetch against appwrite.io. A full index build issues one request per manifest entry (684 today), andfetch_pagehad no retry, so a single transient failure aborted the whole rebuild. The CI rerun passed and the full fetch completes cleanly locally, which confirms the failure is transient.What
get_with_retryindocs_source.py, used by both the manifest fetch and every page fetch.httpx.TransportError(connect, read, protocol errors) and 429/500/502/503/504 responses up to 4 attempts with exponential backoff starting at 0.5s.raise_for_status.Validation
ruff check,black --check,pyrightclean.