Trevin Chow
719cdef2fb
fix(http): contain DNS retry-budget widening to DNS path only
...
PR #382 introduced an `effective_retries` widening on the first gaierror,
but the widening leaked: every non-DNS error path (HTTPError, non-DNS
URLError, OSError) was gated on `effective_retries - 1` and so inherited
the expanded bound. A caller passing `retries=2` who hit DNS-then-non-DNS
got 3 attempts instead of 2 — contrary to the PR description and the
fail-fast intent of small retry budgets.
Fix:
- Gate every non-DNS sleep/retry decision on the caller's original
`retries`, not the widened `effective_retries`.
- Add an explicit `break` in each non-DNS branch when the original
budget is exhausted, so the (possibly widened) outer loop bound
can't pull us into an extra attempt.
Adds two regression tests covering the DNS-then-non-DNS-URLError and
DNS-then-OSError sequences flagged in Greptile review on PR #382 .
2026-05-16 21:13:17 -07:00
..
2026-04-22 14:31:39 -07:00
2026-01-23 12:37:31 -08:00
2026-04-08 10:52:23 -07:00
2026-04-23 20:15:02 -04:00
2026-04-23 20:15:02 -04:00
2026-04-23 20:15:02 -04:00
2026-04-23 20:15:02 -04:00
2026-04-23 20:15:02 -04:00
2026-04-23 20:15:02 -04:00
2026-04-24 11:52:48 -04:00
2026-04-24 11:52:48 -04:00
2026-04-23 20:15:02 -04:00
2026-04-23 20:15:02 -04:00
2026-04-24 11:52:48 -04:00
2026-04-24 11:52:48 -04:00
2026-04-24 11:52:48 -04:00
2026-04-24 11:52:48 -04:00
2026-04-24 11:52:48 -04:00
2026-04-24 11:52:48 -04:00
2026-04-23 20:15:02 -04:00
2026-04-23 20:15:02 -04:00
2026-04-23 20:15:02 -04:00
2026-05-09 19:05:41 -07:00
2026-04-23 20:15:02 -04:00
2026-04-23 20:15:02 -04:00
2026-05-16 09:01:28 -04:00
2026-04-24 11:52:48 -04:00
2026-05-16 19:25:05 -07:00
2026-04-25 14:17:47 -07:00
2026-04-23 20:15:02 -04:00
2026-04-24 11:52:48 -04:00
2026-04-23 20:15:02 -04:00
2026-04-23 20:15:02 -04:00
2026-04-23 20:15:02 -04:00
2026-05-16 19:37:16 -07:00
2026-05-16 19:32:06 -07:00
2026-05-16 21:13:17 -07:00
2026-04-23 20:15:02 -04:00
2026-04-23 20:15:02 -04:00
2026-04-23 20:15:02 -04:00
2026-04-23 20:15:02 -04:00
2026-05-16 19:30:27 -07:00
2026-04-24 11:52:48 -04:00
2026-04-23 20:15:02 -04:00
2026-05-16 18:17:33 -07:00
2026-04-24 11:52:48 -04:00
2026-04-23 20:15:02 -04:00
2026-04-23 20:15:02 -04:00
2026-04-23 20:15:02 -04:00
2026-04-08 10:52:23 -07:00
2026-04-23 20:15:02 -04:00
2026-04-23 20:15:02 -04:00
2026-04-23 20:15:02 -04:00
2026-04-23 20:15:02 -04:00
2026-04-23 20:15:02 -04:00
2026-04-23 20:15:02 -04:00
2026-04-23 20:15:02 -04:00
2026-04-23 20:15:02 -04:00
2026-04-23 20:15:02 -04:00
2026-04-24 11:52:48 -04:00
2026-04-23 20:15:02 -04:00
2026-04-23 20:15:02 -04:00
2026-04-23 20:15:02 -04:00
2026-04-23 20:15:02 -04:00
2026-04-24 11:52:48 -04:00
2026-04-24 11:52:48 -04:00
2026-04-23 20:15:02 -04:00
2026-05-16 18:48:29 -07:00
2026-04-23 20:15:02 -04:00
2026-04-23 20:15:02 -04:00
2026-05-16 18:17:33 -07:00
2026-05-15 22:34:52 -07:00
2026-04-23 20:15:02 -04:00
2026-04-23 20:15:02 -04:00
2026-04-25 14:17:47 -07:00
2026-05-15 08:07:43 -07:00
2026-04-23 20:15:02 -04:00
2026-04-23 20:15:02 -04:00
2026-04-23 20:15:02 -04:00
2026-05-16 18:17:33 -07:00
2026-04-24 11:52:48 -04:00
2026-04-23 20:15:02 -04:00
2026-05-15 08:07:43 -07:00
2026-04-23 20:15:02 -04:00
2026-04-23 20:15:02 -04:00
2026-04-26 14:16:14 -07:00
2026-04-23 20:15:02 -04:00
2026-04-25 14:17:47 -07:00