Brett Smith [Tue, 22 Jul 2014 20:12:59 +0000 (16:12 -0400)]
2044: Improve reporting when project sharing fails.
Our select modal knows how to render an errors key in the JSON
response. This commit adjusts the project controller to conform to
this convention. Refs #2044, #3200.
Brett Smith [Mon, 21 Jul 2014 20:57:07 +0000 (16:57 -0400)]
2044: Make project sharing tests more forgiving of Ajax timing.
Apparently waiting our default 5 seconds is not always sufficient to
get an Ajax response that requires a roundtrip to the API server.
Wait longer in these cases. Not the most elegant solution, but I
don't see a better option. Refs #2044.
Brett Smith [Fri, 18 Jul 2014 20:13:11 +0000 (16:13 -0400)]
2044: API server lets group managers see group permission links.
This implementation hooks into find_object_by_uuid because that was
the simplest thing that could work and unblock larger development on
this story. Longer-term, we would like to solve this problem more
generally. See the comments added to the links controller test for
more explanation about that.
Brett Smith [Mon, 21 Jul 2014 15:33:30 +0000 (11:33 -0400)]
3303: Add logfile support to arv-mount.
The primary thrust of this commit is to teach arv-mount to log to a
file. This can help make it easier to track down exceptions that
happen while the process is daemonized.
To support better logging information, it also sends exception
tracebacks directly to the log. This required reorganizing the code
to daemonize earlier.
Tim Pierce [Thu, 17 Jul 2014 18:41:12 +0000 (14:41 -0400)]
3072: anonymous group can_read empty collection
empty_collection is owned by the system user, like all other
collections. When it is created, a permission link is also created
giving the anonymous group permission to read it.
Added test fixtures for the empty collection and its associated
permission link.
Workbench renders links to the empty collection as "Empty Collection".
The unit test and integration tests focus just on the empty
collection (other collection ownership/readability issues will be
addressed elsewhere).
Brett Smith [Fri, 18 Jul 2014 15:06:02 +0000 (11:06 -0400)]
3252: Include README in Python source manifest.
The real issue with our Python package builds is that this file isn't
being included, which causes setup.py to fail when it's run from a
source tarfile. It *is* being included on my box, but that seems to
be because of extra information from git, or lingering information in
my .egg-info directory. This change should make sure README is
included when a clean sdist is prepared.
Brett Smith [Thu, 17 Jul 2014 20:41:29 +0000 (16:41 -0400)]
3252: Make Python tests runnable from setup.py.
This does a couple of things for us:
* It makes the tests more discoverable and easier to run, which makes
for cleaner documentation. The new command to run tests is
`python setup.py test` (the old command still works too).
* Because the test dependencies are expressed in setup.py, we can get
rid of duplication from keeping around requirements.txt.
Tim Pierce [Mon, 14 Jul 2014 18:01:28 +0000 (14:01 -0400)]
3072: add an empty collection in db seeds
Added empty collection (owned by the anonymous group) to test fixtures
and to db/seeds.rb.
API integration tests: in permissions_test.rb, test that the active user
can read objects in the anonymous group, even when there are no explicit
permission links on that group or objects in it.
Workbench integration tests: added a test to confirm that a non-admin
user can get the empty collection.
Cleanup code: User.can? now takes either a uuid or an object for the target.
Brett Smith [Tue, 15 Jul 2014 17:02:03 +0000 (13:02 -0400)]
3195: Add job reuse test.
I wrote this while debugging a user-reported issue. Ultimately the
issue ended up being a bug in the database, but no point letting a
good test go to waste.
Brett Smith [Mon, 7 Jul 2014 15:01:30 +0000 (11:01 -0400)]
2044: Non-admins get all users' basic info from index API.
This will support a Workbench feature to let users at the same site
share projects with each other. Adding kind to index requests with
select parameters is necessary to help Workbench understand the
result.
There was extensive discussion on IRC about whether or not e-mail
addresses should be included in this information. We toyed with ideas
like providing an e-mail address checksum, so that you could find
exact but not partial matches. Ultimately I decided that none of
those measures were worth the hassle, because the domain of addresses
at any given site would be small enough that they would easily be
discoverable through brute force.
Brett Smith [Wed, 9 Jul 2014 19:04:21 +0000 (15:04 -0400)]
3113: API server assigns task qsequence from a PostgreSQL sequence.
We always wanted monotonically increasing qsequence values. This
implements that.
Because sequences are specific to PostgreSQL, it can't be expressed in
schema.rb. This commit switches our Rails configuration to dump the
database schema in SQL to capture that.
PostgreSQL supports assigning a column's default value from a
sequence, but this doesn't play well with ActiveRecord. Without more
information, it always tries to assign NULL as the column value,
rather than leaving it unassigned to get the default. We have to get
the value from inside the model.
Tom Clegg [Thu, 10 Jul 2014 17:34:44 +0000 (13:34 -0400)]
3220: Adjust disk corruption behavior: If both corrupt and intact
copies exist, log the corruption when noticed, but return the intact
copy to the client instead of an error.
Be consistent about the version of ruby that is installed by rvm and
used by the various containers. Be consistent about using rvm-exec and
bundle exec in every command that uses ruby.
Add documentation and warning about --realclean option to build.sh