Skip to content
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

Race condition not showing all events from the websocket #2340

Open
Tracked by #2331
jorgeepc opened this issue Apr 11, 2023 · 1 comment
Open
Tracked by #2331

Race condition not showing all events from the websocket #2340

jorgeepc opened this issue Apr 11, 2023 · 1 comment
Labels
backend bug Something isn't working frontend

Comments

@jorgeepc
Copy link
Contributor

jorgeepc commented Apr 11, 2023

Describe the bug
We have a race condition where the web app could not receive some event logs from the web socket. It could happen because after we run a test, we need to subscribe to the /event resource using the web socket, therefore there is a time between sending the web socket subscription and the server registering it where some event logs could have already happened.

To Reproduce (not easy to reproduce)
Steps to reproduce the behavior:

  1. Create a test with a failed trace
  2. You should see the test run page
  3. Go to the trace tab
  4. Sometimes some events from trace stage are missing

Expected behavior
We should receive all the event logs from the server. There was already a PR to introduce a temporary buffer in the subscription manager (it was causing some issues around tests/transactions so probably it needs to be revisited).

Screenshots
Our current approach is to get the initial logs from the rest /events endpoint, you can see in the screenshot that it returns the events that are already in the DB:
Screenshot 2023-04-11 at 10 41 13

At the same time we subscribe to the web socket updates, however we start getting the events after the subscription is registered by the server:
Screenshot 2023-04-11 at 10 42 43

@jorgeepc jorgeepc changed the title Race condition not showing all events from the websocket [Error Handling] - Race condition not showing all events from the websocket Apr 11, 2023
@jorgeepc jorgeepc added bug Something isn't working frontend backend labels Apr 11, 2023
@xoscar xoscar self-assigned this Apr 17, 2023
@xoscar
Copy link
Collaborator

xoscar commented Apr 17, 2023

We'll keep an eye on this and if it becomes too big we can decide how to solve it

@xoscar xoscar changed the title [Error Handling] - Race condition not showing all events from the websocket Race condition not showing all events from the websocket Apr 17, 2023
@xoscar xoscar removed their assignment May 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend bug Something isn't working frontend
Projects
None yet
Development

No branches or pull requests

2 participants