Adding websocket heartbeat#333
Conversation
There was a problem hiding this comment.
Pull request overview
Adds a WebSocket heartbeat around Kubernetes exec sessions to reduce premature termination / stalled connections in “kubernetes mode” runners (Issue #228).
Changes:
- Introduces ping/pong heartbeat timers (configurable via env vars) for the exec WebSocket.
- Adds WebSocket lifecycle cleanup (close-with-timeout) on success/failure paths.
- Expands debug logging around
execPodStepand heartbeat behavior.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Hey @madAndroid, can you please address reviews from Copilot? Comments do make sense to me |
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
|
Thanks for taking a look at this @nikola-jokic :) I've had Claude in VSCode review and provide suggested fixes to the review comments. |
|
Most recent review comments addressed, and linting fixed |
|
@madAndroid thanks for working on this. looking forward to getting this fix in our hands. I'd be happy to help with any testing @nikola-jokic is it possible to get this backported to 0.7.x, please? |
Thank you for accepting the pull request! We can now move away from our fork 👌🎉 |
|
@nikola-jokic any chance we can get this backported to 0.7.x and released as 0.7.1? |
* Adding websocket heartbeat * Change error to debug * Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * Commit Claude created fixes * Remove peer entries causing pipeline failures * Fix linting * Push review fixes * Fix linting failures --------- Co-authored-by: Andrew Stangl <andrew.stangl@tesco.com> Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
* Adding websocket heartbeat * Change error to debug * Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * Commit Claude created fixes * Remove peer entries causing pipeline failures * Fix linting * Push review fixes * Fix linting failures --------- Co-authored-by: Andrew Stangl <andrew.stangl@tesco.com> Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
… fix Pulls k8s and k8s-novolume runner-container-hooks from oradwell/runner-container-hooks (v0.7.1-alpha / v0.8.2-alpha) instead of upstream. These community alpha releases backport PR actions/runner-container-hooks#333, which adds a websocket heartbeat to the kubernetes exec call. Without it, workflow steps that produce no output for ~5 minutes (e.g. long sleeps, silent test runs) cause the websocket to close and the step to be reported as exit 0, masking real failures. See actions/runner-container-hooks#228. Upstream has not yet cut a release containing the fix. Revert to the upstream repo once a tagged release ships. Also adds an optional tagSuffix workflow_dispatch input to docker-publish.yml so custom builds can be published as e.g. 2.333.1-hooksfix. will be ignored, and an empty message aborts the commit. # # Date: Thu Jun 4 14:18:40 2026 +0800 # # On branch fix/runner-container-hooks-websocket-heartbeat # Your branch is up to date with 'origin/fix/runner-container-hooks-websocket-heartbeat'. # # Changes to be committed: # modified: .github/workflows/docker-publish.yml # modified: images/Dockerfile #
… fix Pulls k8s and k8s-novolume runner-container-hooks from oradwell/runner-container-hooks (v0.7.1-alpha / v0.8.2-alpha) instead of upstream. These community alpha releases backport PR actions/runner-container-hooks#333, which adds a websocket heartbeat to the kubernetes exec call. Without it, workflow steps that produce no output for ~5 minutes (e.g. long sleeps, silent test runs) cause the websocket to close and the step to be reported as exit 0, masking real failures. See actions/runner-container-hooks#228. Upstream has not yet cut a release containing the fix. Revert to the upstream repo once a tagged release ships. Also adds an optional tagSuffix workflow_dispatch input to docker-publish.yml so custom builds can be published as e.g. 2.333.1-hooksfix.
Uh oh!
There was an error while loading. Please reload this page.