Commit graph

1 commit

Author SHA1 Message Date
Nicolas De Loof
ea2284d712 fix(pre_start): capture a hook's output by opening its log stream once started
A pre_start hook's output never reached anyone. The follow log stream was
opened on the runner while it was still in "created" state, before
ContainerStart; the engine ends such a stream at once, empty. So a foreground
up never showed the hook's output, and the error of a failing hook carried no
tail, though both are built from that stream.

The stream is now opened once the hook is started. The runner is retained
after it exits (AutoRemove is off), so a fast-exiting hook cannot make the
stream hit a 404, which is what opening it first was meant to prevent. Once the
hook has exited, the stream gets a short, bounded delay to deliver what the
daemon buffered before it is cut, instead of being cut right away.

The unit tests that pinned the old call order now pin the new one, and a
scenario locks that a failing hook reports what it printed.

Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2026-10-16 15:11:33 +02:00