PrefectHQ
prefect
BlogDocsChangelog

Make runner cancellation observing critical to runner health

#20219
Comparing
joshstagner/engpar-26-make-runner-cancellation-observing-critical-to-runner-health
(
f8b271c
) with
main
(
4e5d510
)
CodSpeed Performance Gauge
0%
Untouched
2
Ignored
6

Benchmarks

Passed

bench_task_decorator
benches/bench_tasks.py
CodSpeed Performance Gauge
0%
602.5 µs601.9 µs
bench_import_prefect_flow
benches/bench_import.py
CodSpeed Performance Gauge
0%
1.4 s1.4 s

Ignored

bench_flow_call[options1]
benches/bench_flows.py
Ignored
CodSpeed Performance Gauge
0%
107.8 ms107.4 ms
bench_flow_call[options0]
benches/bench_flows.py
Ignored
CodSpeed Performance Gauge
+1%
166.9 ms166 ms
bench_flow_decorator
benches/bench_flows.py
Ignored
CodSpeed Performance Gauge
-1%
5.6 ms5.6 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
-6%
32.1 ms34.3 ms
bench_task_submit
benches/bench_tasks.py
Ignored
CodSpeed Performance Gauge
-28%
9.7 ms13.5 ms

Commits

Click on a commit to change the comparison range
Base
main
4e5d510
+0.07%
Make runner cancellation observing critical to runner health When both websocket and polling mechanisms for detecting cancellation events fail, the runner now: 1. Logs errors using the flow run logger (visible to customers) 2. Marks all in-flight flow runs as crashed 3. Raises RuntimeError to trigger runner shutdown This prevents flow runs from running indefinitely when the runner cannot respond to cancellation requests. Also changes websocket failure log level from debug to warning for better visibility when falling back to polling. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
f8b271c
11 hours ago
by joshuastagner
© 2026 CodSpeed Technology
Home Terms Privacy Docs