-
-
Notifications
You must be signed in to change notification settings - Fork 379
[GSK-1199] Implement websocket to get worker status #1179
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[GSK-1199] Implement websocket to get worker status #1179
Conversation
…ker-status # Conflicts: # frontend/src/views/main/project/TestSuite.vue # frontend/src/views/main/project/modals/RunTestSuiteModal.vue
|
@henchaves on my end I don't get notifications when running Giskard in production mode (in docker). Also when testing in dev mode I had to use the UI for a bit before I started receiving ML Worker connected/disconnected messages:
|
@andreybavt, you will only get notifications if you are interacting with a page (component) that imports the ML Worker state |
|
Well, it should be enabled on a global level (except for the login page). It's important to know if a worker gets disconnected even if you're not immediately using it |
|
@andreybavt, I added worker notifications for all components inside Main.vue. Can you try again the use cases you mentioned? I tried it on my side, and it's working now. |
|
@henchaves , sure I'll retest now. Did you try in Docker too? |
|
@andreybavt not yet. Let me try that |
|
@andreybavt, everything should be working now (including using Docker) |
|
@henchaves ok, I'm checking again and then it's good to merge |
|
@henchaves , one other thing I noticed is that the security question isn't solved in this PR. You can connect to this WS endpoint and send/receive STOMP messages from any client without being authenticated |
|
Once the build passes it should be OK to merge |
|
Kudos, SonarCloud Quality Gate passed! |









Description
The idea of this PR is to implement a WebSocket to provide a channel through which the backend can send the ML Worker status without any request from the front.
This improvement will be divided into two phases:
1- Implement WebSocket on back and frontend, send the worker status periodically from Spring app, and update Vue components to use websocket instead of store. (CURRENT PR)
2- Make the backend only send a message to the channel when the worker status change, instead of sending it every N seconds. Also, send the last worker status whenever a new subscriber appears.
Related Issue
GSK-1199 (available on Linear)
Type of Change