Bug #6754

[Workbench] Report HTTP error instead of sending 0-byte file when error fetching from keep

Added by Peter Amstutz almost 3 years ago. Updated about 1 year ago.

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


Estimated time:
Story points:



Workbench shows files from collections by piping from arv-get. If arv-get can't download the file for any reason, Workbench returns a 200 OK status, with a 0-byte response.


  • Add an attribute to CollectionsController's FileStreamer class, and corresponding test stub classes, that captures the exit status of arv-get ($?). Before arv-get is run, this attribute is nil.
  • Near the end of CollectionsController#show_file, capture the FileStreamer created by file_enumerator. Hook up its each strings to response.stream as we do now. In the ensure block, if we haven't written any bytes to response.stream and the arv-get exit attribute does not have status 0, set response.status = 500.


#1 Updated by Peter Amstutz almost 3 years ago

  • Category set to Workbench

#2 Updated by Tom Clegg almost 3 years ago

Workbench imagines itself to be in "sending data to client, impossible to change headers" mode even when it fails to get the very first data byte from Keep. The more general version of this problem is a bit harder, but if the first block fails, it should be easy enough to 5xx.

See show_file around source:apps/workbench/app/controllers/collections_controller.rb#L153

At least if the file size is handed to us in params[:size]: if the file size is non-zero but no bytes are sent, send an HTTP 5xx error.

#3 Updated by Brett Smith almost 3 years ago

  • Target version changed from Bug Triage to Arvados Future Sprints

#4 Updated by Brett Smith almost 3 years ago

  • Description updated (diff)

Updating description based on Tom's note.

#5 Updated by Brett Smith almost 3 years ago

  • Story points set to 1.0

#6 Updated by Brett Smith over 2 years ago

  • Target version changed from Arvados Future Sprints to Deferred

I consider this basically obsolete now that keepdl is imminent.

#7 Updated by Peter Amstutz about 1 year ago

  • Status changed from New to Rejected

Workbench download is deprecated and scheduled for removal, superseded by keep-web.

Also available in: Atom PDF