Skip to content

Make Zeno to be signalable by HQ via websocket#429

Merged
NGTmeaty merged 4 commits intomainfrom
signal-via-websocket
Aug 26, 2025
Merged

Make Zeno to be signalable by HQ via websocket#429
NGTmeaty merged 4 commits intomainfrom
signal-via-websocket

Conversation

@yzqzss
Copy link
Copy Markdown
Collaborator

@yzqzss yzqzss commented Aug 12, 2025

No description provided.

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Aug 12, 2025

Codecov Report

❌ Patch coverage is 0% with 55 lines in your changes missing coverage. Please review.
✅ Project coverage is 54.28%. Comparing base (c8a6c40) to head (2ac2f9e).

Files with missing lines Patch % Lines
internal/pkg/source/hq/websocket.go 0.00% 55 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #429      +/-   ##
==========================================
- Coverage   54.69%   54.28%   -0.41%     
==========================================
  Files         120      120              
  Lines        7345     7400      +55     
==========================================
  Hits         4017     4017              
- Misses       3004     3059      +55     
  Partials      324      324              
Flag Coverage Δ
e2etests 36.89% <0.00%> (-0.28%) ⬇️
unittests 30.66% <0.00%> (-0.24%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@yzqzss yzqzss added the GSoC label Aug 12, 2025
@CorentinB CorentinB added the enhancement New feature or request label Aug 14, 2025
@CorentinB CorentinB requested a review from Copilot August 18, 2025 08:41
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

This PR adds websocket message handling capabilities to Zeno, allowing it to receive and process signals from HQ. The implementation enables HQ to remotely control Zeno processes by sending signal commands through the websocket connection.

  • Adds a new message listening goroutine that processes incoming websocket messages
  • Implements message dispatching based on message type with initial support for "signal" messages
  • Adds signal handling functionality that allows sending Unix signals to the current process

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment thread internal/pkg/source/hq/websocket.go
Comment thread internal/pkg/source/hq/websocket.go Outdated
Comment thread internal/pkg/source/hq/websocket.go
Comment thread internal/pkg/source/hq/websocket.go Outdated
Comment thread internal/pkg/source/hq/websocket.go
Copy link
Copy Markdown
Collaborator

@NGTmeaty NGTmeaty left a comment

Choose a reason for hiding this comment

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

Some quick comments - and a question - if the HQ implementation does not support websocket are we going to panic or continue trying to connect?

Comment thread internal/pkg/source/hq/websocket.go
Comment thread internal/pkg/source/hq/websocket.go
Comment thread internal/pkg/source/hq/websocket.go Outdated
@yzqzss yzqzss force-pushed the signal-via-websocket branch 3 times, most recently from b441660 to b6376a4 Compare August 19, 2025 13:14
@yzqzss yzqzss force-pushed the signal-via-websocket branch from 6648fbd to 2ac2f9e Compare August 22, 2025 13:26
@yzqzss
Copy link
Copy Markdown
Collaborator Author

yzqzss commented Aug 22, 2025

if the HQ implementation does not support websocket are we going to panic or continue trying to connect?

image

if so, the hq client will fail to initialize.

Copy link
Copy Markdown
Collaborator

@NGTmeaty NGTmeaty left a comment

Choose a reason for hiding this comment

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

Thanks!!

@NGTmeaty NGTmeaty merged commit 495aa18 into main Aug 26, 2025
5 checks passed
@NGTmeaty NGTmeaty deleted the signal-via-websocket branch August 26, 2025 23:35
CorentinB pushed a commit that referenced this pull request Aug 27, 2025
* Make Zeno to be signalable by HQ via websocket

* check the error returned by dispatchMessageByType

* chore: WARN with the additional info

* add readTimeout
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request GSoC

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants