Skip to content

Adding websocket heartbeat#333

Merged
nikola-jokic merged 8 commits into
actions:mainfrom
Daemon-Solutions:Add-Websocket-Heartbeat
May 27, 2026
Merged

Adding websocket heartbeat#333
nikola-jokic merged 8 commits into
actions:mainfrom
Daemon-Solutions:Add-Websocket-Heartbeat

Conversation

@madAndroid
Copy link
Copy Markdown
Contributor

@madAndroid madAndroid commented Mar 31, 2026

@madAndroid madAndroid requested review from a team and nikola-jokic as code owners March 31, 2026 08:39
Copilot AI review requested due to automatic review settings April 22, 2026 13:55
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 execPodStep and heartbeat behavior.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread packages/k8s/src/k8s/index.ts Outdated
Comment thread packages/k8s/src/k8s/index.ts Outdated
Comment thread packages/k8s/src/k8s/index.ts Outdated
Comment thread packages/k8s/src/k8s/index.ts
Comment thread packages/k8s/src/k8s/index.ts Outdated
Comment thread packages/k8s/src/k8s/index.ts Outdated
@nikola-jokic
Copy link
Copy Markdown
Collaborator

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>
@madAndroid
Copy link
Copy Markdown
Contributor Author

Thanks for taking a look at this @nikola-jokic :)

I've had Claude in VSCode review and provide suggested fixes to the review comments.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 3 out of 4 changed files in this pull request and generated 1 comment.

Files not reviewed (1)
  • packages/k8s/package-lock.json: Language not supported

Comment thread packages/k8s/src/k8s/heartbeat.ts Outdated
@madAndroid
Copy link
Copy Markdown
Contributor Author

Most recent review comments addressed, and linting fixed

@oradwell
Copy link
Copy Markdown
Contributor

oradwell commented May 22, 2026

@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?

Copy link
Copy Markdown
Collaborator

@nikola-jokic nikola-jokic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is awesome, thank you!

@nikola-jokic nikola-jokic merged commit ee5c48b into actions:main May 27, 2026
5 checks passed
@madAndroid
Copy link
Copy Markdown
Contributor Author

This is awesome, thank you!

Thank you for accepting the pull request! We can now move away from our fork 👌🎉

@oradwell
Copy link
Copy Markdown
Contributor

oradwell commented May 28, 2026

@nikola-jokic any chance we can get this backported to 0.7.x and released as 0.7.1?

oradwell pushed a commit to oradwell/runner-container-hooks that referenced this pull request Jun 2, 2026
* 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>
oradwell pushed a commit to oradwell/runner-container-hooks that referenced this pull request Jun 2, 2026
* 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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants