cyclops-ui/cyclops

Duplicated pod logs on streaming the logs due to multiple open SSE connections

Closed this issue · 0 comments

Describe the bug
In PR #568, we added a state logsSignalController for the AbortController, which was used to abort an open SSE connection when the PodModal was closed. However, we had to remove it since the state was unused, but this led to only passing the controller to the SSE connection without ever aborting it, resulting in open SSE connections even after the PodModal was closed

To Reproduce
Steps to reproduce the behavior:

  1. Go to /modules/<module-name>
  2. Click on View Logs in the Actions menu of the Resources
  3. View Logs for some time
  4. Close the Modal and open it again, you will see duplicated logs

Expected behavior
The logs should not be duplicated and the SSE connection should close upon closure of PodModal

Screenshots
https://github.com/user-attachments/assets/eeafffc6-dcd0-4433-803f-4dbeedeb6f47

Desktop (please complete the following information):

  • OS: Windows
  • Browser brave

Additional context
Commit Reference: 9d47701