Peter Amstutz [Thu, 30 Apr 2015 17:55:36 +0000 (13:55 -0400)]
5562: Add support for "Expect: 100-Continue" flow for PUT.
This tells cURL to wait for a "go ahead" from the Keep server (in the form of a
HTTP/1.1 "100 Continue" response) instead of sending the request body
immediately. This allows the server to reject the request if the request is
invalid or the server is read-only, without waiting for the client to send the
entire block.
Uses pycurl.UPLOAD to enable the 'PUT' and 'Expect: 100-continue" behavior.
Use INFILESIZE to sent Content-Length and use READFUNCTION to actually spool
the data.
Peter Amstutz [Thu, 30 Apr 2015 15:18:24 +0000 (11:18 -0400)]
ArvadosFileReader object always tries to return the exact amount of data asked for.
This is to avoid breaking stuff like gzip that assumes it always gets the exact
amount of data unless EOF. (From the Python file docs for read(): Note that
this method may call the underlying C function fread() more than once in an
effort to acquire as close to size bytes as possible.) closes #5856
Renamed RemoteApiServerError to APIServerError and NewRemoteApiServerError to newAPIServerError.
Reworked error messages to feature error details more prominently.
These changes were requested by code review at
https://github.com/curoverse/arvados/pull/17/files
Rewrote ArvadosApiError as RemoteApiServerError:
* Name change to indicate that it's a remote error, not a local one.
* Rewrote Error() method to explicitly state that the error is remote and list all fields.
* Added server address field and use it in error response.
* Error details are now kept as a string slice rather than as a delimited string.
5826: revert the previous update that checked if readable only for pdh or uuid;
instead check as long as a collection datatype is presented with a non-empty string.
Brett Smith [Tue, 21 Apr 2015 20:48:42 +0000 (16:48 -0400)]
5490: Require exact matches in API server's default job reuse filters.
The previous default filters would reuse jobs that used any Docker
image with the matching name, and/or Arvados SDK version since the
named commit. User feedback indicates this is surprising, and they
would prefer to have behavior more like the handling around
script_version: only reuse jobs that have the latest version of a
symbolic name, or the exact specified hash.
Brett Smith [Tue, 21 Apr 2015 15:23:19 +0000 (11:23 -0400)]
5490: Test API server handling of git hash-like branch names.
If you have a branch that looks like a commit hash, different git subcommands do different things. After extended discussion on IRC, we've decided we'd like the rules to be:
* If a 40-character hex string references a commit, resolve it to that
commit.
* In other cases of ambiguity, prefer branch names over short commit
hashes.
Fortunately, this corresponds to the behavior of `git rev-list` and
our existing implementation. This commit codifies our desired
behavior with tests.
This is an affordance to help users find logs after they're removed
from the API server's logs table. The display is not very great.
We're punting improvements until Workbench generally has better
capabilities to display large logs.
The layout change necessitated updates to the anonymous access tests.
While I was in there, I strengthened the assertions by putting
assertions that check a particular element has loaded before asserting
the nonexistence of other elements. This revealed the JavaScript
issue mentioned in the new comment: the old version of the test was
doing a single `assert_no_text` after clicking a job's log tab, which
only confirmed that we navigated away. We already test that the log
tab exists and is not disabled in this case, so I consider that
sufficient for now.
Brett Smith [Thu, 23 Apr 2015 21:52:27 +0000 (17:52 -0400)]
run_test_server doesn't assume ARVADOS_API_TOKEN is set.
This makes it slightly more feasible to run this script (and by
extension tests for individual components like Workbench) outside
run-tests.sh. No issue #.
5780: Display message in chooser popup if one is provided. Use this to show a message in sharing popup
explaining to user that only those users or groups that the user is allowed to access are displayed.