Skip to content

Commit dff162c

Browse files
thodson-usgsclaude
andauthored
test(waterdata): retry every transient error in the flaky-rerun filter (#325)
The suite already retries transient HTTP failures (flaky's `only_rerun`), but the patterns missed two kinds, so a transient upstream 502 failed CI instead of retrying: - a direct 5xx is raised as `ServiceUnavailable`, and - a chunked request wraps a transient 429/5xx as `QuotaExhausted` / `ServiceInterrupted`. Add patterns for both. Verified they retry these transient errors but not deterministic ones (e.g. a 404 or an assertion failure). Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
1 parent afcbf62 commit dff162c

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

tests/waterdata_test.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,14 @@
5353
reruns=2,
5454
reruns_delay=5,
5555
only_rerun=[
56-
r"(?:RateLimited|RuntimeError):\s*(?:429|5\d\d):", # _raise_for_non_200 output
56+
# Transient HTTP errors (429 / 5xx) on the direct path: RateLimited /
57+
# ServiceUnavailable carry a "<status>: ..." message (the RuntimeError
58+
# shape is kept for any legacy call site).
59+
r"(?:RateLimited|ServiceUnavailable|RuntimeError):\s*(?:429|5\d\d):",
60+
# The chunked fan-out wraps a transient sub-request as a ChunkInterrupted
61+
# subclass (QuotaExhausted for 429, ServiceInterrupted for 5xx), whose
62+
# message has no leading status token.
63+
r"(?:QuotaExhausted|ServiceInterrupted):",
5764
r"Connect(ion)?Error", # requests' ConnectionError + httpx' ConnectError
5865
r"ReadTimeout|ConnectTimeout|Timeout",
5966
],

0 commit comments

Comments
 (0)