Websocket Logs are backfilled
nakhbari opened this issue · 5 comments
The websocket should send all the logs up until that point on a new connection. This includes the scenario where the build is complete, we should send all the logs.
Ha, yeah I forgot to implement this in the new JSON controller. The way we implemented it in the non-JSON controller is not by using a socket connection, but just the regular API
More info here
ci/app/features/build/build_controller.rb
Lines 85 to 100 in 111cdc0
When it comes to fetching the previous output, this is blocked by the distributed worker work, as we'll need to know how it's being stored
Yeah i think i'm gonna copy the current implementation for now.
I think for the worker it would make sense to always use the websocket and just backfill the logs that have been missed on a new connection. With the last line being an EOT we will close the websocket.