Brett Smith [Thu, 27 Nov 2014 02:35:07 +0000 (21:35 -0500)]
4291: Workbench Collection sharing buttons are actual buttons.
This prevents users from trying to open them in new windows/tabs and
getting a 404 response.
I had to rework the pipeline instance comparison JavaScript because it
was disabling the collection share button on page load. All that was
really necessary was making sure the event only fires when there
actually is a form#compare, but I did some other cleanup in the
process of learning that.
Brett Smith [Mon, 1 Dec 2014 16:07:07 +0000 (11:07 -0500)]
4676: Collection sharing popup is always JavaScript.
This fixes an issue where the response would sometimes be sent with
Content-Type: text/html. We thought it might be a race condition with
AJAX, but the browser was sending a correct Accept: header.
Brett Smith [Tue, 25 Nov 2014 22:57:47 +0000 (17:57 -0500)]
4291: Clean up HTTP methods in Workbench URL generators.
According to the docs at
<http://api.rubyonrails.org/files/actionview/lib/action_view/helpers/url_helper_rb.html>:
* `button_to` and `form_for` take :method as a symbol.
* `link_to` takes :method as a symbol, and only supports :delete,
:post, :patch, and :put. Any link that should be done with GET
should not have a method specified.
* Note that `form_tag` *does* take a string, so not every method
should be symbolized.
Brett Smith [Wed, 3 Dec 2014 15:12:40 +0000 (10:12 -0500)]
4705: Fix FUSE exception logging.
logger.exception() doesn't take the exception as an argument, it takes
a message like all the other logger methods. It gets the exception
information from sys.exc_info().
Brett Smith [Tue, 2 Dec 2014 15:23:21 +0000 (10:23 -0500)]
4591: Websockets server fetches fewer logs at a time.
Most of the out of memory errors we're seeing happen in the PostgreSQL
driver, which runs out of space to store results. Because Log records
are relatively large (holding two other records as JSON text),
fetching fewer in a batch should noticeably improve memory use. I
don't expect this to end the crashing, though—it seems like the
Websockets server grows large for a variety of reasons. Hopefully
this change will help make some of the others clearer.
Brett Smith [Tue, 2 Dec 2014 14:59:55 +0000 (09:59 -0500)]
4591: Avoid capturing critical exceptions in Websockets server.
Based on the current logs, the troubles we're currently hitting in
Websockets happen in push_events, where all the database work
happens. These exceptions wrap PostgreSQL driver errors; they inherit
from StandardError, so they're being caught by the rescue block.
This commit re-raises those exceptions, which will cause the server to
crash (and presumably be restarted by a supervisor like runit).
We do sometimes see NoMemoryError, but the block to catch is in
ineffective because it usually manifests earlier in on_connect, when
the connection is first made. In this case, Ruby's default exception
handling provides the behavior we want, so just remove the block.
In keeping with the theme of improved exception handling, I tightened
up the bad request detection.
Tim Pierce [Tue, 2 Dec 2014 20:32:52 +0000 (15:32 -0500)]
4621: collate_output pipes to python
Rewrote collate_output as create_output_collection, writing its output
data to a Python subprocess that invokes
arvados.api().collections().create(). Writing very large collection
manifests in-process makes Arvados.pm consume inordinate amounts of
memory.
Brett Smith [Tue, 25 Nov 2014 20:24:08 +0000 (15:24 -0500)]
4501: FUSE exposes by_id subdirectory when run with --by-id.
This makes it possible for people to develop code against their own
normal Keep mount, and then have it work as expected in Crunch (which
uses --by-id for backward compatibility).
I considered adding a second inode for by_id that pointed to the same
underlying MagicDirectory instance. Unfortunately, the current
implementation would make it difficult to avoid exposing infinitely
recursing by_id subdirectories, and that seemed like a bigger problem
than the relatively small overhead of having two MagicDirectory
instances. (The Keep client will use comparatively more RAM, and it
will use the same block cache for both directories, which should keep
it relatively under control.)
Brett Smith [Tue, 25 Nov 2014 17:03:32 +0000 (12:03 -0500)]
4501: Restore FUSE FuseTagsUpdateTest.
This test hasn't been running in a while because it defined
runRealTest rather than runTest. The old code predates Collection
UUIDs, so it had to be updated to deal with those.