PrefectHQ
prefect
BlogDocsChangelog

fix(workers): prevent uvloop from setting global event loop policy in healthcheck

#19660Merged
Comparing
fix-healthcheck-uvloop-policy
(
70e2e0f
) with
main
(
0731084
)
CodSpeed Performance Gauge
0%
Untouched
2
Ignored
6

Benchmarks

Passed

bench_task_decorator
benches/bench_tasks.py
CodSpeed Performance Gauge
0%
463.1 µs461.8 µs
bench_import_prefect_flow
benches/bench_import.py
CodSpeed Performance Gauge
0%
1.4 s1.4 s

Ignored

bench_flow_decorator
benches/bench_flows.py
Ignored
CodSpeed Performance Gauge
-3%
5.5 ms5.6 ms
bench_flow_call[options0]
benches/bench_flows.py
Ignored
CodSpeed Performance Gauge
+2%
168.1 ms165.4 ms
bench_flow_call[options1]
benches/bench_flows.py
Ignored
CodSpeed Performance Gauge
0%
107.6 ms107.4 ms
bench_task_submit
benches/bench_tasks.py
Ignored
CodSpeed Performance Gauge
+7%
13.9 ms13 ms
bench_import_prefect
benches/bench_import.py
Ignored
CodSpeed Performance Gauge
0%
1.1 s1.1 s
bench_task_call
benches/bench_tasks.py
Ignored
CodSpeed Performance Gauge
-1%
33.2 ms33.7 ms

Commits

Click on a commit to change the comparison range
Base
main
0731084
+0.1%
fix(workers): prevent uvloop from setting global event loop policy in healthcheck uvicorn ≤0.35.0 with uvloop installed sets a global uvloop.EventLoopPolicy() when starting, which breaks subprocess spawning when a SelectorEventLoop is used (uvloop's policy doesn't implement get_child_watcher()). This adds loop="asyncio" to the healthcheck uvicorn config to prevent this, and updates settings access to use the new get_current_settings() pattern. Fixes #19658 šŸ¤– Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
70e2e0f
10 hours ago
by zzstoatzz
Ā© 2025 CodSpeed Technology
Home Terms Privacy Docs