Skip to content

[GSK-1365] Make websocket reactive to worker status changes#1236

Merged
henchaves merged 11 commits intomainfrom
feature/gsk-1365-make-websocket-reactive-to-worker-status
Jul 17, 2023
Merged

[GSK-1365] Make websocket reactive to worker status changes#1236
henchaves merged 11 commits intomainfrom
feature/gsk-1365-make-websocket-reactive-to-worker-status

Conversation

@henchaves
Copy link
Copy Markdown
Member

Description

This PR aims to migrate the polling system of the ML Worker websocket to only send the current worker status message to the channel if one of the following conditions happens:

  • worker connected
  • worker disconnected
  • new client subscriber to the channel

Related Issue

GSK-1365 (available on Linear)

Type of Change

  • 📚 Examples / docs / tutorials / dependencies update
  • 🔧 Bug fix (non-breaking change which fixes an issue)
  • 🥂 Improvement (non-breaking change which improves an existing feature)
  • 🚀 New feature (non-breaking change which adds functionality)
  • 💥 Breaking change (fix or feature that would cause existing functionality to change)
  • 🔐 Security fix

@linear
Copy link
Copy Markdown

linear Bot commented Jul 6, 2023

GSK-1365 Make websocket reactive to worker status

This is an improvement of GSK-1199.

Currently, the socket is sending the worker status as a polling system. The idea is to only send the status message in two conditions:

1- if status changed from connected to disconnected and vice-versa;

2- if there is a new subscriber to the websocket channel

@henchaves henchaves self-assigned this Jul 6, 2023
@henchaves henchaves requested a review from kevinmessiaen July 12, 2023 08:10
Comment thread backend/src/main/java/ai/giskard/web/socket/WorkerStatusSocketService.java Outdated
@sonarqubecloud
Copy link
Copy Markdown

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

0.0% 0.0% Coverage
0.0% 0.0% Duplication

@henchaves henchaves merged commit 9b89986 into main Jul 17, 2023
@Hartorn Hartorn deleted the feature/gsk-1365-make-websocket-reactive-to-worker-status branch September 13, 2023 11:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants