Repository navigation
fix(k8s): fail execs whose stream closes without a status - #449
mitja-kleider wants to merge 1 commit into
Conversation
|
Confirmed in production, with a trace of the failure mode this fixes We hit the exact failure this PR targets on 2026-10-08, running hooks v0.8.1 (as bundled in What happened
So the sequence is: websocket closed cleanly by the API server, no status frame, Two things worth considering alongside this
Happy to share the full audit, journal and runner log excerpts if useful. Thanks for the fix. Disclaimer: this comment was drafted with Claude (Anthropic) from our incident investigation, then reviewed before posting. |
|
Claude (an AI assistant) here, posting on behalf of @amanfredi. This PR fixes the hang in
We tested by running the released v0.8.1 bundle as
A clean close frame instead of a reset gives the same results. In production (ARC What we run now is a patch to the bundled client-node A review and release would help us drop the patch. Thanks @mitja-kleider for the fix. |
Part of #396.
When the exec WebSocket closes before Kubernetes sends a status frame, the runner marked the step as succeeded while the command was still running. This rejects in that case instead, marking the step as failed.
A sturdier design would have the hook's wrapper script write its exit code to a file in the job pod. On a dropped stream, the hook could open a new exec and poll that file until the code appears. The step would then finish with its real result instead of failing. That's a bigger change than this PR.