Feature #2751

Python SDK behaves appropriately when API server advertises a Keep proxy instead of individual Keep storage servers

Added by Tom Clegg over 7 years ago. Updated over 7 years ago.

Status:
Resolved
Priority:
Normal
Assigned To:
Category:
-
Start date:
05/15/2014
Due date:
% Done:

100%

Estimated time:
(Total: 8.00 h)
Story points:
2.0

Description

  • Don't panic just because only one Keep server (proxy) is available.
  • Pay attention to X-Data-Replication header in server response.
  • Ensure https works.

Subtasks

Task #2858: Review 2751-python-sdk-keep-proxy-supportResolvedPeter Amstutz

Task #2778: Python SDK understands that keep server is a proxy, transmits desired replication levelResolvedPeter Amstutz

Task #2794: Write testsResolvedPeter Amstutz


Related issues

Related to Arvados - Story #2752: arv-put can quickly resume an interrupted transfer.Resolved05/26/2014

Associated revisions

Revision c0c0d769
Added by Peter Amstutz over 7 years ago

Merge branch 'master' into 2751-python-sdk-keep-proxy-support refs #2751

Revision fd7ac9bf
Added by Peter Amstutz over 7 years ago

Merge branch '2751-python-sdk-keep-proxy-support' closes #2751

Revision 4d50cea3
Added by Peter Amstutz over 7 years ago

Merge branch 'master' of git.curoverse.com:arvados refs #2751

History

#1 Updated by Tom Clegg over 7 years ago

  • Description updated (diff)

#2 Updated by Brett Smith over 7 years ago

  • Assigned To set to Brett Smith

#3 Updated by Brett Smith over 7 years ago

  • Assigned To deleted (Brett Smith)

#4 Updated by Peter Amstutz over 7 years ago

  • Assigned To set to Peter Amstutz

#5 Updated by Brett Smith over 7 years ago

Reviewing c0c0d76. The code is very clean, so thank you for an easy review. I only have a couple of small points.

shuffled_service_roots has an except: clause. Can you catch a specific exception here? except: catches things like KeyboardInterrupt and SystemExit, which is not what you intend here. If you can't name the exception, at least say except Exception: to avoid that issue.

In KeepTestCase.setUpClass, would it help improve test isolation to clear the arvados module variables from setUp instead? Since you're re-doing that in specific test methods, it looks like it could simplify things a bit too. Relatedly, is it worth refactoring all the setup and teardown methods in test_keep_client to a common superclass, so you don't have to repeat it between the test cases?

#6 Updated by Peter Amstutz over 7 years ago

  1. Changed "except:" to "except Exception:". Thanks for that.
  2. Refactored test_keep_client a little bit to make it clearer what is going on (and ideally a little more robust, as I realized the tests were order sensitive). It's hard to refactor very much, since tests inherently contain a lot of code that sets up an environment that's very specific to the test.

#7 Updated by Brett Smith over 7 years ago

Peter Amstutz wrote:

  1. Refactored test_keep_client a little bit to make it clearer what is going on (and ideally a little more robust, as I realized the tests were order sensitive). It's hard to refactor very much, since tests inherently contain a lot of code that sets up an environment that's very specific to the test.

That is helpful, thanks. This looks good to merge to me.

#8 Updated by Anonymous over 7 years ago

  • Status changed from New to Resolved
  • % Done changed from 67 to 100

Applied in changeset arvados|commit:fd7ac9bf21002cc8a3cdb9a5e16c588ff734dfab.

Also available in: Atom PDF