Bug #10007

[Workbench] Retrieve all log content directly from API instead of pre-rendering in Rails

Added by Tom Clegg almost 3 years ago. Updated almost 2 years ago.

Assigned To:
Target version:
Start date:
Due date:
% Done:


Estimated time:
Story points:



Currently "get arvados#log entries and format them in a PRE element" is implemented in both Ruby and JS.

Reasons to remove the Ruby version:

1. In #9679 the two implementations started to go out of sync: the JS code knows how to format "container state change" logs, but the Ruby code skips them. The result is that "state change" logs only show up if they arrive while Workbench is listening for them on websocket. Refreshing the "log" page makes them disappear.

2. Doing API requests directly from the browser (instead of using the Workbench Rails server as a proxy) is expected to reduce real & perceived latency from the user's perspective.


The "terminal window" div should have a data attribute indicating the configured number of log records to fetch. When the div is displayed, client-side JS should make an API request to retrieve logs. They should be prepended to the div by sending an event to $('.arv-log-event-handler-append-logs') with eventData.prepend==true.

To avoid missing or duplicating any logs, use the page display time ("now") as a "created_at>=X" filter when subscribing to Websocket events to append, and use the same time as a "created_at<X" filter when retrieving previous logs to prepend. This should produce the correct results regardless of processing/response order, so "subscribe" and "retrieve previous" can be done concurrently.

Related issues

Copied from Arvados - Bug #9679: [Crunch2] Provide feedback when a container is submitted to slurm but does not runResolved07/29/2016

Copied from Arvados - Task #9946: Retrieve old logs with AJAX instead of pre-renderingClosed07/29/2016


#1 Updated by Tom Morris almost 2 years ago

  • Target version set to Arvados Future Sprints

Also available in: Atom PDF