Bug #4770

[Workbench] after file upload, the files tab should refresh immediately (overriding the 15 second throttle)

Added by Ward Vandewege over 4 years ago. Updated about 3 years ago.

Status:
New
Priority:
Normal
Assigned To:
-
Category:
Workbench
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:
Story points:
0.5

History

#1 Updated by Brett Smith over 4 years ago

I haven't quite figured out how it works yet, but new files do appear in the Files tab. It doesn't reload the whole tab; instead it's a little more targeted (Websockets?). But they definitely appear after a few moments, even if you previously loaded the Files tab before uploading.

#2 Updated by Tom Clegg over 4 years ago

  • Category set to Workbench

My first guess is this is a timing issue:

  1. Hit Files tab. Files tab loads at t=0
  2. Hit Upload tab. Upload tab loads at t=2
  3. Choose a file and upload it. Upload finishes at t=8
  4. Hit Files tab. Files tab was already loaded <15s ago, so refresh is deferred

After this sort of sequence, you have to wait <= 15 seconds before the Files tab gets refreshed.

If your Files tab isn't updated and
  • you have to wait more than { 15 seconds - time since you saw the Files tab }, or
  • you never looked at the Files tab at all between loading the page and finishing your upload

...then there's a bug to track down. (Or perhaps this is a #4706 symptom.)

Either way, I think it would be appropriate for the "upload finished" event to override the usual 15-second minimum refresh delay so you don't have to look at mysteriously old content even for a few seconds.

#3 Updated by Tom Clegg over 4 years ago

How it works:
  • At the end of the upload process, there's a collections.update API call
  • The update causes a Log
  • Postgres notifies websocket server threads about the Log
  • Websocket server sends Log to browser
  • event_log.js sends event to Files tab because it has .arv-log-event-listener[data-object-uuid={collection-uuid}]
  • tab_panes.js either reloads the tab, or sets a timer to reload the tab (depending on time since last load)

#4 Updated by Tom Clegg over 4 years ago

Brett pointed out that the bug could have been produced by a race condition:

  1. Initiate tab refresh
  2. Workbench prepares current tab content
  3. Collection gets modified, websocket event arrives. Refresh is underway so the event is ignored.
  4. Tab content arrives via AJAX
  5. Tab "loaded" time is set to now, no update request is pending, tab content stays stale.

We should make sure this sort of sequence is handled correctly.

#5 Updated by Tom Clegg over 4 years ago

  • Target version changed from Bug Triage to Arvados Future Sprints

#6 Updated by Tom Clegg over 4 years ago

  • Subject changed from [Workbench] after file upload from workbench, going back to the files tab does not automatically refresh the file list to show the newly uploaded files to [Workbench] after file upload, the files tab should refresh immediately (overriding the 15 second throttle)

#7 Updated by Tom Clegg over 4 years ago

  • Target version changed from Arvados Future Sprints to 2015-01-28 Sprint

#8 Updated by Radhika Chippada over 4 years ago

  • Assigned To set to Radhika Chippada

#9 Updated by Tom Clegg over 4 years ago

  • Target version changed from 2015-01-28 Sprint to Arvados Future Sprints

#10 Updated by Radhika Chippada about 3 years ago

  • Assigned To deleted (Radhika Chippada)

Also available in: Atom PDF