PrefectHQ
prefect
BlogDocsChangelog

Add httpx.ConnectError to client retry exceptions

#20276
Comparing
joshstagner/oss-6656-retry-on-connect-error
(
9f663c1
) with
main
(
585767f
)
CodSpeed Performance Gauge
0%
Untouched
2
Ignored
6

Benchmarks

Passed

bench_import_prefect_flow
benches/bench_import.py
CodSpeed Performance Gauge
0%
1.4 s1.4 s
bench_task_decorator
benches/bench_tasks.py
CodSpeed Performance Gauge
-1%
550 µs553.4 µs

Ignored

bench_flow_call[options0]
benches/bench_flows.py
Ignored
CodSpeed Performance Gauge
+2%
109 ms106.7 ms
bench_flow_call[options1]
benches/bench_flows.py
Ignored
CodSpeed Performance Gauge
0%
107.5 ms107.6 ms
bench_flow_decorator
benches/bench_flows.py
Ignored
CodSpeed Performance Gauge
+4%
5.2 ms5 ms
bench_import_prefect
benches/bench_import.py
Ignored
CodSpeed Performance Gauge
0%
1.1 s1.1 s
bench_task_submit
benches/bench_tasks.py
Ignored
CodSpeed Performance Gauge
×15
90.6 ms6.2 ms
bench_task_call
benches/bench_tasks.py
Ignored
CodSpeed Performance Gauge
-14%
19.6 ms22.7 ms

Commits

Click on a commit to change the comparison range
Base
main
585767f
-0.32%
Add httpx.ConnectError to client retry exceptions When the Prefect server becomes unavailable after initial connection (e.g., during restart), API calls now retry with exponential backoff instead of failing immediately. This prevents flow runs from getting stuck in Pending state when the server goes down, as the worker can now successfully mark them as crashed once the server recovers. Key behavior: - ConnectError is NOT retried on first request (fail fast for wrong URL) - ConnectError IS retried after a successful connection has been made Closes #18324 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
9f663c1
12 hours ago
by joshuastagner
© 2026 CodSpeed Technology
Home Terms Privacy Docs