The clean refresh (#15483) aborted the whole scrape on a transient upstream network blip:
requests.exceptions.ConnectionError: ('Connection aborted.', RemoteDisconnected(...))
at scrape/runner.py:_get → fetch_toc_page
_get() retried HTTP error statuses (429/500/502/503/504) but not connection-level exceptions — so one dropped connection (which the HPE portal does intermittently under the --force re-scrape of 2,300+ pages at concurrency 6) killed the entire weekly run. Not caused by the vision/allowlist work — latent fragility that prior runs got lucky on.
Fix
_get(): wrap the request in try/except requests.exceptions.RequestException and retry with the existing exponential backoff (covers RemoteDisconnected, timeouts, chunked-encoding errors).
scrape_toc_bundle(): a page that still fails after all retries is logged + skipped (its committed .md is kept) instead of aborting the bundle. A broad outage still surfaces as a high failed-count.
Verified
Unit test confirms _get retries a RemoteDisconnected then succeeds; happy-path scrape unaffected.
## Problem
The clean refresh (#15483) **aborted the whole scrape** on a transient upstream network blip:
```
requests.exceptions.ConnectionError: ('Connection aborted.', RemoteDisconnected(...))
at scrape/runner.py:_get → fetch_toc_page
```
`_get()` retried HTTP error *statuses* (429/500/502/503/504) but **not connection-level exceptions** — so one dropped connection (which the HPE portal does intermittently under the `--force` re-scrape of 2,300+ pages at concurrency 6) killed the entire weekly run. Not caused by the vision/allowlist work — latent fragility that prior runs got lucky on.
## Fix
- **`_get()`**: wrap the request in `try/except requests.exceptions.RequestException` and retry with the existing exponential backoff (covers `RemoteDisconnected`, timeouts, chunked-encoding errors).
- **`scrape_toc_bundle()`**: a page that still fails after all retries is logged + skipped (its committed `.md` is kept) instead of aborting the bundle. A broad outage still surfaces as a high failed-count.
## Verified
Unit test confirms `_get` retries a `RemoteDisconnected` then succeeds; happy-path scrape unaffected.
The clean refresh (#15483) aborted the whole scrape on a transient upstream
blip:
requests.exceptions.ConnectionError:
('Connection aborted.', RemoteDisconnected('Remote end closed ...'))
_get() retried HTTP error *statuses* (429/500/502/503/504) but not
connection-level *exceptions*, so a single dropped connection — which the
HPE portal does intermittently under the --force re-scrape of 2300+ pages
at concurrency 6 — killed the entire weekly run. Prior runs just got lucky.
- _get(): wrap the request in try/except requests.exceptions.RequestException
and retry with the existing exponential backoff (covers RemoteDisconnected,
timeouts, chunked-encoding errors).
- scrape_toc_bundle(): a page that still fails after all retries is logged
and skipped (its previously-committed .md is kept) instead of aborting the
bundle. A broad outage still surfaces as a high failed-count in the log.
Verified: unit test confirms _get retries a RemoteDisconnected then succeeds;
happy-path scrape unaffected.
Co-Authored-By: Claude Opus 4.8 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LFowQzJu7k97QLCRDSAeh1
claude
merged commit 8a67366ad6 into main2026-08-06 11:55:10 -04:00
claude
deleted branch fix/scrape-retry-connection-errors2026-08-06 11:55:10 -04:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Problem
The clean refresh (#15483) aborted the whole scrape on a transient upstream network blip:
_get()retried HTTP error statuses (429/500/502/503/504) but not connection-level exceptions — so one dropped connection (which the HPE portal does intermittently under the--forcere-scrape of 2,300+ pages at concurrency 6) killed the entire weekly run. Not caused by the vision/allowlist work — latent fragility that prior runs got lucky on.Fix
_get(): wrap the request intry/except requests.exceptions.RequestExceptionand retry with the existing exponential backoff (coversRemoteDisconnected, timeouts, chunked-encoding errors).scrape_toc_bundle(): a page that still fails after all retries is logged + skipped (its committed.mdis kept) instead of aborting the bundle. A broad outage still surfaces as a high failed-count.Verified
Unit test confirms
_getretries aRemoteDisconnectedthen succeeds; happy-path scrape unaffected.