[ARVADOS] updated: 32cecc78ad532393ba0f1b3e80db850dc33bf4b5

git at public.curoverse.com git at public.curoverse.com
Wed Aug 13 15:42:54 EDT 2014


Summary of changes:
 .../app/assets/javascripts/infinite_scroll.js      |   3 +-
 .../app/assets/stylesheets/application.css.scss    |   4 +
 .../app/controllers/application_controller.rb      |  79 +++--
 .../app/controllers/projects_controller.rb         |  82 ++++--
 .../app/controllers/user_agreements_controller.rb  |   1 +
 apps/workbench/app/helpers/application_helper.rb   |   2 +-
 apps/workbench/app/models/user.rb                  |   6 +
 .../app/views/application/_choose.html.erb         |  13 +-
 .../app/views/application/_content.html.erb        |   3 +-
 .../app/views/application/_content_layout.html.erb |  15 +-
 .../views/application/_tab_line_buttons.html.erb   |   0
 apps/workbench/app/views/application/show.html.erb |   1 -
 .../app/views/collections/_show_files.html.erb     |   5 -
 .../app/views/collections/_show_recent.html.erb    |  13 -
 .../workbench/app/views/collections/index.html.erb |  14 +
 apps/workbench/app/views/collections/show.html.erb |   7 +-
 .../app/views/keep_disks/_content_layout.html.erb  |   4 +-
 apps/workbench/app/views/layouts/body.html.erb     |   6 +
 .../views/pipeline_instances/_show_recent.html.erb |   7 -
 .../app/views/pipeline_instances/index.html.erb    |   8 +
 .../pipeline_templates/_show_components.html.erb   |  17 --
 .../{_show_components.html.erb => show.html.erb}   |   2 +-
 .../views/projects/_show_contents_rows.html.erb    |  11 +-
 .../views/projects/_show_data_collections.html.erb |  72 +----
 .../projects/_show_jobs_and_pipelines.html.erb     |  11 +-
 .../views/projects/_show_other_objects.html.erb    |  11 +-
 .../projects/_show_pipeline_templates.html.erb     |  11 +-
 .../app/views/projects/_show_sharing.html.erb      |  10 +-
 .../app/views/projects/_show_subprojects.html.erb  |  11 +-
 .../app/views/projects/_show_tab_contents.html.erb |  10 +-
 ...how_data_collections.html.erb => show.html.erb} |   9 +-
 apps/workbench/app/views/users/profile.html.erb    | 108 +++++++
 apps/workbench/config/application.default.yml      |  57 ++++
 apps/workbench/config/routes.rb                    |   1 +
 .../test/functional/projects_controller_test.rb    |  72 ++++-
 .../test/integration/application_layout_test.rb    | 317 +++++++++++++++++++++
 .../test/integration/pipeline_instances_test.rb    |   1 +
 apps/workbench/test/integration/projects_test.rb   |  12 +-
 apps/workbench/test/test_helper.rb                 |   3 +
 crunch_scripts/collection-merge                    |  39 +--
 crunch_scripts/decompress-all.py                   |  62 ++++
 crunch_scripts/run-command                         | 143 ++++++++--
 crunch_scripts/split-fastq.py                      | 128 +++++++++
 crunch_scripts/subst.py                            |   6 +-
 doc/_config.yml                                    |   2 +-
 ...py.liquid => _concurrent_hash_script_py.liquid} |   0
 doc/api/methods/collections.html.textile.liquid    |   3 +
 .../topics/tutorial-job-debug.html.textile.liquid  | 163 -----------
 .../topics/tutorial-parallel.html.textile.liquid   |  22 +-
 .../tutorial-trait-search.html.textile.liquid      |  44 +--
 .../tutorial-firstscript.html.textile.liquid       | 165 ++++-------
 .../tutorials/tutorial-keep.html.textile.liquid    |   4 +-
 ...uid => tutorial-submit-job.html.textile.liquid} |  11 +-
 docker/build_tools/config.rb                       |   5 +-
 docker/jobs/Dockerfile                             |   4 +-
 sdk/cli/bin/arv                                    |   8 +-
 sdk/cli/bin/arv-run-pipeline-instance              |  45 +--
 sdk/cli/bin/crunch-job                             |  27 +-
 sdk/go/keepclient/hashcheck.go                     |   5 +-
 sdk/go/keepclient/keepclient_test.go               |  28 +-
 sdk/python/arvados/__init__.py                     |  11 +
 sdk/python/arvados/api.py                          |   8 +-
 sdk/python/arvados/collection.py                   |  10 +-
 sdk/python/arvados/events.py                       |   8 +-
 sdk/python/arvados/keep.py                         |  54 ++--
 sdk/python/arvados/stream.py                       |   1 -
 sdk/python/bin/arv-get                             |  39 ++-
 sdk/python/bin/arv-ls                              |   3 -
 sdk/python/bin/arv-normalize                       |   3 -
 sdk/python/bin/arv-ws                              |   8 +-
 sdk/python/tests/run_test_server.py                |  22 +-
 sdk/ruby/lib/arvados.rb                            |  20 +-
 services/api/Gemfile.lock                          |  14 +-
 .../api/app/controllers/application_controller.rb  |  12 +-
 .../arvados/v1/collections_controller.rb           |  85 +++---
 .../app/controllers/arvados/v1/jobs_controller.rb  |  18 ++
 .../arvados/v1/repositories_controller.rb          |  10 +-
 .../controllers/arvados/v1/schema_controller.rb    |  57 ++--
 .../app/controllers/arvados/v1/users_controller.rb |  16 +-
 services/api/app/mailers/profile_notifier.rb       |   8 +
 services/api/app/models/arvados_model.rb           |  22 ++
 services/api/app/models/collection.rb              |   7 +-
 services/api/app/models/job.rb                     |   2 +-
 services/api/app/models/user.rb                    |  13 +
 .../profile_notifier/profile_created.text.erb      |   2 +
 services/api/config/application.default.yml        |   6 +
 services/api/script/crunch-dispatch.rb             |  19 +-
 .../test/fixtures/api_client_authorizations.yml    |  12 +
 services/api/test/fixtures/jobs.yml                |  11 +
 services/api/test/fixtures/pipeline_instances.yml  |   5 +
 services/api/test/fixtures/users.yml               |  61 +++-
 .../arvados/v1/collections_controller_test.rb      |  47 ++-
 .../functional/arvados/v1/users_controller_test.rb |  65 +++++
 services/fuse/arvados_fuse/__init__.py             |  20 +-
 services/fuse/bin/arv-mount                        |  50 ++--
 services/keepproxy/keepproxy_test.go               |  25 +-
 96 files changed, 1881 insertions(+), 826 deletions(-)
 copy services/fuse/tests/__init__.py => apps/workbench/app/views/application/_tab_line_buttons.html.erb (100%)
 create mode 100644 apps/workbench/app/views/collections/index.html.erb
 create mode 100644 apps/workbench/app/views/pipeline_instances/index.html.erb
 copy apps/workbench/app/views/pipeline_templates/{_show_components.html.erb => show.html.erb} (93%)
 copy apps/workbench/app/views/projects/{_show_data_collections.html.erb => show.html.erb} (86%)
 create mode 100644 apps/workbench/app/views/users/profile.html.erb
 create mode 100644 apps/workbench/test/integration/application_layout_test.rb
 create mode 100755 crunch_scripts/decompress-all.py
 create mode 100755 crunch_scripts/split-fastq.py
 rename doc/_includes/{_parallel_hash_script_py.liquid => _concurrent_hash_script_py.liquid} (100%)
 delete mode 100644 doc/user/topics/tutorial-job-debug.html.textile.liquid
 copy doc/user/tutorials/{tutorial-firstscript.html.textile.liquid => tutorial-submit-job.html.textile.liquid} (90%)
 create mode 100644 services/api/app/mailers/profile_notifier.rb
 create mode 100644 services/api/app/views/profile_notifier/profile_created.text.erb

       via  32cecc78ad532393ba0f1b3e80db850dc33bf4b5 (commit)
       via  76319efd911f8b8536868831a49faa82f797ecc4 (commit)
       via  922da69f42998b29355796e20e4dee0079d4113e (commit)
       via  5fcff4c13ae17527ee1efd6fa01d08133212085b (commit)
       via  9ccff2073a124639eec457e4fb47d9cbf2527d04 (commit)
       via  fb3a1997d5e7f9a38a64824367e75fcc782e946d (commit)
       via  63871346153fea194b169eec38f6efae3061ebf6 (commit)
       via  3cc80b447efcaf416ea4d6857d6d40583e462ff8 (commit)
       via  dfda463f54b05a5fbc023077584d8681d9e6c96d (commit)
       via  348c0d6b9927b7fd416085b131e9afbc54e90446 (commit)
       via  37cea605dcd9d7b16a009c8a2720255587af72a7 (commit)
       via  936ee283693b7ec95241d9defa2750e98a93dcbd (commit)
       via  7d598997ce1851f37ac0ec21c47abc76d5e84277 (commit)
       via  ba30220effee82890c7ab55e4ca0286a2e99c772 (commit)
       via  5a3d5ac75e3058698bad452bbd980a1e3cb9be2d (commit)
       via  32af86f5f4a2849b12c96e40ed20d33b7682ba55 (commit)
       via  71ed41b87ab6b1b2db92752c59fdf7cf59c2b2cd (commit)
       via  b6e28fbe905737bd0ea5bda5f4fd74fd259c58b1 (commit)
       via  6520a31f91a590fe8d559c14e75e6c99a676ba20 (commit)
       via  b00bc4b607cbd1eeb9cf749dc8b681e48002e2bc (commit)
       via  20b2859d2e4114b7224fa55d04d98a0fe3e16ef5 (commit)
       via  588a4505ac005d54b7aad208e038ded0a978425d (commit)
       via  9d76f0c0fc0c35b70f3988695fcb253e1739e36b (commit)
       via  c5be0c3abd926adc54e0c1de65e8dfdd25a84ea1 (commit)
       via  0a53423e423d107e457e1555ce3ec4e9ab2dd911 (commit)
       via  19e913d3b754429be49c38505c249b7b2151a70f (commit)
       via  57ee96926d2d3d315ece3b2cbfb20d0fe01ab912 (commit)
       via  33f848525d46357fbe7669bc9ea09f2f4379f425 (commit)
       via  ed1580a38c1aae0910cef83605622a41d927fba3 (commit)
       via  0ce64862c39e93591635f31a47c5b7d4aa0b9a19 (commit)
       via  30a74a09202eedbea5e5c7bd59768e616cd38c79 (commit)
       via  268e630e92fe5088d7bfb9baf15a86b099e7faa0 (commit)
       via  bb3c3a0792e1f6be7fcb5e663ac82d5a9c9c0c13 (commit)
       via  6ba24a89c7b2fa6f600910dc28af218500a463dd (commit)
       via  ddb56f97e792fb7bc6471a75b900ba096164d424 (commit)
       via  a4993e59eaefab303fb9d3b4a2cdc07d166046a4 (commit)
       via  a2f138c3ea2a6245cd5ea8008b709ed16720392d (commit)
       via  d7581fb19947ff1efa3b5dcc045b24377e1fe3d6 (commit)
       via  b349b49b54f5bebc624f4afb981dddea1bfc0d61 (commit)
       via  2bec2ba1ce3b37fb8ff9a94f20d6c8a694d87183 (commit)
       via  55db20860c90c60dd231083c1cc81001c3fbe971 (commit)
       via  7b9529d616cdf9022392321dc055f668a1a1ba62 (commit)
       via  7c4b27bff2d9ad383689217b068b3ba70d463def (commit)
       via  1626b1014244622928ebd98498b73282052439d6 (commit)
       via  a6010696b246cc43c721a35d56179c629d54e798 (commit)
       via  e8a6a6726da065dc650913a101279717f3bc35e8 (commit)
       via  41e77a9116878cd9527d042ce80a987f2c04010e (commit)
       via  6c91320c3a53ddbe1b81bee8ed6322c20acbd047 (commit)
       via  f45b07b22f6d6e4169899d1d036610c29a7f495d (commit)
       via  3b98ce7a73f94fcf0ccc24bb4b3eac576744cebb (commit)
       via  acba0c0caa17d721724533803f797235ab572d94 (commit)
       via  c7cf7b6012ecf15264e48af9c7fa4a4e93519a40 (commit)
       via  9b5c87a043b10e1d983ec1c7e8b7784e5b79c5ae (commit)
       via  aa923c951ff68e7131628c449b5e2f8a74e2a21e (commit)
       via  965bf2a51134ed26fb23d2209d9a0d319fe05744 (commit)
       via  cd3a0b27c6985f72d58581d43c7cd6686a977f56 (commit)
       via  7f4ff745bfd5356e885e13b4984d93c5c5b204f1 (commit)
       via  774a5d8543e7335a8580c7c86f2436b96aff1024 (commit)
       via  872cf2e096a7b72722aa76040339a23e962cdf96 (commit)
       via  802fd8ec8df8a36029c76b20e472f78c09772950 (commit)
       via  7ea5d6161e4eab67795fbe2758d98822a9a03f13 (commit)
       via  cedd2b046ddf4d2f819a4d1dedbbe82d4e70e72d (commit)
       via  fd38dcafdb0b89aff5f722946c7326291ad69290 (commit)
       via  bc681e11a92d4d07bcc18c570f68ea64afd1e8cb (commit)
       via  1b1248a5e763387149e40cb6ae1759459f624365 (commit)
       via  6060e478ec99b9dbc12785fadc76d388d6678fe3 (commit)
       via  fe3b22e8850d28e5d2b30f59c112087d892844dd (commit)
       via  f8df913d401e7d6015631741952429ec683671e8 (commit)
       via  c2cd31f182e588363a20fe855be3058c5505dda8 (commit)
       via  9e5af4afef0f70222515214fb4778389c0d364d9 (commit)
       via  c803bd3b08fb2a981bb02f99d2be6d10bc37d341 (commit)
       via  8fc5d7b3a697e08391296ac4d434f4f4a23a695a (commit)
       via  f22dc5b8e0b2d844c03656a959085006b6c56dac (commit)
       via  6f69b8a9314ca4041291411d7a3c57686399e9e5 (commit)
       via  b7744c883953c97568f851995d722a0ed044774e (commit)
       via  51ab8fada99e0d5dad24b7e905c494850dcd1fe1 (commit)
       via  e5337814593c504ef71e9f517dc1d99d41e19784 (commit)
       via  612d5fd9a0066665b522997f025499460d9edf43 (commit)
       via  65c7f47f25003775f0a9d1560829b47af70490a0 (commit)
       via  5b6180084964461d6201aacdb327fe4b1b2bc8b5 (commit)
       via  a5186eeef2d320d34d70d9f55c70a1e6679c29cf (commit)
       via  7a5a843993ad8502bfe1a290d0b0a5f3d9692bf3 (commit)
       via  e5e0835b2d374b88e686bf06be0607e10f616e34 (commit)
       via  a14f6bf083841a868c054e7e00149c6a1bf0b708 (commit)
       via  e5e28415e44e4b3cc1695ba827a1ebc0256fafdd (commit)
       via  51a0f4eb8bcd1467cea656d70a41a0901762e9be (commit)
       via  fd7cf52127c9aa905aeae09b13dd4d1ee9f66e1c (commit)
       via  efd131427759f5a2663dea04a402054e361b7c90 (commit)
       via  b79c440b6af5cf4855e3fb3fb510b3eb8de1da9c (commit)
       via  b5393c72ddd855564cae2f2d798a3e4496a8d2ec (commit)
       via  db4c2a1cbf4d526a16e59b58fbac81a703dee87b (commit)
       via  839f0ec7e4931f77eaf537d4642bb769b22fabe6 (commit)
       via  cb880a9fa932988892ffc9f95d38166e9dec5458 (commit)
       via  5edfdafe30ea9d74a5a49602d61934b793762f4b (commit)
       via  b1365ce7c1ccc74f479b1ebdf31b5da52028da84 (commit)
       via  6f231c2537c196644f15eb7cac6f6861ea24e429 (commit)
       via  addce205a8b7bca49038167c2066d31efccad870 (commit)
       via  f00ee875d99ba65aaac178e762fbd3e35ddc5f87 (commit)
       via  fb0585a11cc10929cd8121ddd219855172754ef3 (commit)
       via  b14aa29daff5264bd2352ec1a61b222c9e7812a2 (commit)
       via  f3e546e73898e9ff57fb45e53b9f009265cd7ddd (commit)
       via  d7e17c51907d658d2d4e2794044486ebe007126d (commit)
       via  fde712e92ad33e03dfd79f5fca99d2005cdd0795 (commit)
       via  c424885353afb06ac835e6d44be2d838d193d49f (commit)
       via  1071802079ee3c706d217ce41fd35b4e304a6a30 (commit)
       via  9921c58649fcbda169f10cf0a2f0e21620b0e3cd (commit)
       via  8514f29184502ce8b39c0c67489740006f6bd5a9 (commit)
       via  2d8508738cc5ae65818f5e6a0ca4e0af15fb6b0c (commit)
       via  ff2e08fbf73f90956141ab6cb0e6fca42ddec33f (commit)
       via  57e0202fcbec42bf9f9aabade183c66551be0a88 (commit)
       via  e50d40423bb2bf1fa1fe940b91006bfcd1643a8c (commit)
       via  f2263977500c541ae8eefdd1462264593b979d63 (commit)
       via  602a0e46ee210602bb9606695808f7035e1336d9 (commit)
       via  1c61d2595c8489bc577128156f78d57fa4c85b53 (commit)
       via  d7dc4d6026d2752b752b30dc627a22c158141ebb (commit)
       via  290274d8413e674d087542f247e944c1277bae2b (commit)
       via  86f97fe1bf8ebb7fb9b3c8c730687074d44d4ad8 (commit)
       via  a73069f409eab6d7ee0c4935097805b228e0e67c (commit)
       via  363d128327963a7c1d93992613a741af4d5f55fd (commit)
       via  d94d24f806debac76b29896bf486067be3cb084c (commit)
       via  85ee7f10d6aa8084da51a388011395c080842c70 (commit)
       via  9d476c8e51784747298293864026252852480df0 (commit)
       via  692f03def1a915a8e76dc44c480be9d6716887fb (commit)
       via  91d83dc26c64bb0eff00e1c73e284a2dacafc840 (commit)
       via  14878e2c9e384381b5797c644570d5e19718ed5c (commit)
       via  cdb015d76288de70b828ade02928b41ebc0feb7a (commit)
       via  b3d92b09ab0e06c1719d541d4704ec89113ee3cd (commit)
       via  d0930bfe4226ba361a5b1087b01946130f8282fd (commit)
       via  d82509cf925a2afa5b09f8a67952d5553101778d (commit)
       via  fdd0351cfcf54dd64423c9df16902fe83b512619 (commit)
       via  c96db8766d22832ac19d260377d0fa747a657dd1 (commit)
       via  e9509c501f197fb22875bef48a7fa618371f3ca4 (commit)
       via  22383b73db60dd00bb5b9ef68b009828b59b968e (commit)
       via  1c5b0ee281a30b25bc622565dac2df75f99e4863 (commit)
       via  2399e2081ec59c60f6b2ddf47d7235fa30bbd4c7 (commit)
       via  92f63fe18f3b6d8e4ee589e7a962d39ed4754e9e (commit)
       via  a4f3031bb766ca8a9b9dfbc738dbf0dc9bcd5b67 (commit)
       via  708b630be8dc82b3b1b1e246719eb61688efef0f (commit)
       via  c75a4bb16b2ae143023a001ddb92ce175c813c11 (commit)
       via  cd8865242a72db92cb2c6a269ca209e06b0a31ef (commit)
       via  629ff557c7cb0e94080d3faed8b5ed4c53119f29 (commit)
       via  2b18c1a62315bf7eb407d75923d8d3e10b4c7cd2 (commit)
       via  b0dff193d231456b36bed0bca7eac7f78997a8ae (commit)
       via  529efd199afb26cdc7b8a422ab8b69bcee1b3ec8 (commit)
       via  528280155a4a963187736364f74835f2873fc073 (commit)
       via  74fb942ca46cf6f039b961b572f9c0f160a24b93 (commit)
       via  adcf46d59e7da4f08fbc9a94dcae52bc573c24ad (commit)
       via  577c61793d8d9f2452b6b53d3791822d001e339c (commit)
       via  c3b19359bd21c0b2115c4169102327762e48a93b (commit)
       via  baf2c86b3af2d0b8db22aff5d6f427f025d767b7 (commit)
       via  1d13f6a6edd0f101d11edc55663d83ac40f6fbfe (commit)
       via  99d5b548b50c573281d9780ecd631ecf83f4eefe (commit)
       via  06cc4285949e8203a80f1b506b3551b731494dcf (commit)
       via  1774a688181d771790c3c406ae45c99dd26df023 (commit)
       via  d1332738de33f6e5c50b8d444590f4add9663853 (commit)
       via  6755f71e4b5e9474f24f8d79739feb775d91496b (commit)
       via  a8e5a5ee592e9e71c1ce80247212e33d61ae2381 (commit)
       via  e4f893184833d43c4aed29a1825f4db08cb14d0e (commit)
       via  0cf8e41ee88c6cd6e2546958926d7a59991dab4e (commit)
       via  2c7b8f8bee023c438c47aff2f35848bbf6c1ae5f (commit)
       via  5990ac0ad45146fad60d151b24a39c15e72a1d87 (commit)
       via  925a830167cb2af6ededf9a0f6d83a2e672452b8 (commit)
       via  95ec380b85dec7a9004bcfd05e613eeb773c9d60 (commit)
       via  783aff1187eba225008cd7db6fdd8307e46bc59b (commit)
      from  d30c3b218773355150aa1ee47fa64150dd1b4111 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit 32cecc78ad532393ba0f1b3e80db850dc33bf4b5
Author: Tom Clegg <tom at curoverse.com>
Date:   Wed Aug 13 15:36:30 2014 -0400

    3551: Set mode of generated files more aggressively (overrule umask).

diff --git a/docker/build_tools/config.rb b/docker/build_tools/config.rb
index 7f21940..cee72cf 100755
--- a/docker/build_tools/config.rb
+++ b/docker/build_tools/config.rb
@@ -49,7 +49,10 @@ Dir.glob(globdir + '/*.in') do |template_file|
   generated_dir = File.join(File.dirname(template_file), 'generated')
   Dir.mkdir(generated_dir) unless Dir.exists? generated_dir
   output_path = File.join(generated_dir, File.basename(template_file, '.in'))
-  File.open(output_path, "w", File.stat(template_file).mode) do |output|
+  output_mode = (File.stat(template_file).mode & 0100) ? 0755 : 0644
+  File.open(output_path, "w", output_mode) do |output|
+    # Set the mode again after opening, to thwart any prevailing umask:
+    output.chmod output_mode
     File.open(template_file) do |input|
       input.each_line do |line|
 

commit 76319efd911f8b8536868831a49faa82f797ecc4
Author: Tom Clegg <tom at curoverse.com>
Date:   Wed Aug 13 15:22:00 2014 -0400

    3551: Handle missing GOPATH and multiple-entry GOPATH sensibly.

diff --git a/sdk/python/tests/run_test_server.py b/sdk/python/tests/run_test_server.py
index 3226a3c..9249702 100644
--- a/sdk/python/tests/run_test_server.py
+++ b/sdk/python/tests/run_test_server.py
@@ -23,7 +23,10 @@ import arvados.config
 SERVICES_SRC_DIR = os.path.join(MY_DIRNAME, '../../../services')
 SERVER_PID_PATH = 'tmp/pids/webrick-test.pid'
 WEBSOCKETS_SERVER_PID_PATH = 'tmp/pids/passenger-test.pid'
-os.environ['PATH'] = os.environ['GOPATH'] + '/bin:' + os.environ['PATH']
+if 'GOPATH' in os.environ:
+    gopaths = os.environ['GOPATH'].split(':')
+    gobins = [os.path.join(path, 'bin') for path in gopaths]
+    os.environ['PATH'] = ':'.join(gobins) + ':' + os.environ['PATH']
 
 logfile = None
 

commit 922da69f42998b29355796e20e4dee0079d4113e
Merge: 5fcff4c 3cc80b4
Author: Tom Clegg <tom at curoverse.com>
Date:   Wed Aug 13 15:13:43 2014 -0400

    3551: Merge branch 'master' into 3551-go-layout


commit 5fcff4c13ae17527ee1efd6fa01d08133212085b
Author: Tom Clegg <tom at curoverse.com>
Date:   Wed Aug 13 15:10:13 2014 -0400

    3551: When invoking run_test_server.py during tests, pass stderr
    through to caller instead of discarding.

diff --git a/services/keepproxy/keepproxy_test.go b/services/keepproxy/keepproxy_test.go
index b9d5276..c4e5ae7 100644
--- a/services/keepproxy/keepproxy_test.go
+++ b/services/keepproxy/keepproxy_test.go
@@ -39,12 +39,27 @@ func (s *ServerRequiredSuite) SetUpSuite(c *C) {
 	defer os.Chdir(cwd)
 
 	os.Chdir(pythonDir())
-
-	if err := exec.Command("python", "run_test_server.py", "start").Run(); err != nil {
-		panic("'python run_test_server.py start' returned error")
+	{
+		cmd := exec.Command("python", "run_test_server.py", "start")
+		stderr, err := cmd.StderrPipe()
+		if err != nil {
+			log.Fatalf("Setting up stderr pipe: %s", err)
+		}
+		go io.Copy(os.Stderr, stderr)
+		if err := cmd.Run(); err != nil {
+			panic(fmt.Sprintf("'python run_test_server.py start' returned error %s", err))
+		}
 	}
-	if err := exec.Command("python", "run_test_server.py", "start_keep").Run(); err != nil {
-		panic("'python run_test_server.py start_keep' returned error")
+	{
+		cmd := exec.Command("python", "run_test_server.py", "start_keep")
+		stderr, err := cmd.StderrPipe()
+		if err != nil {
+			log.Fatalf("Setting up stderr pipe: %s", err)
+		}
+		go io.Copy(os.Stderr, stderr)
+		if err := cmd.Run(); err != nil {
+			panic(fmt.Sprintf("'python run_test_server.py start_keep' returned error %s", err))
+		}
 	}
 
 	os.Setenv("ARVADOS_API_HOST", "localhost:3001")

commit 9ccff2073a124639eec457e4fb47d9cbf2527d04
Author: Tom Clegg <tom at curoverse.com>
Date:   Wed Aug 13 15:02:51 2014 -0400

    3551: Behave correctly when Read() yields some data along with the EOF condition.
    
    "a Reader returning a non-zero number of bytes at the end of the input
    stream may return either err == EOF or err == nil."
    
    -- http://golang.org/pkg/io/#Reader

diff --git a/sdk/go/keepclient/hashcheck.go b/sdk/go/keepclient/hashcheck.go
index a585d00..1f696d9 100644
--- a/sdk/go/keepclient/hashcheck.go
+++ b/sdk/go/keepclient/hashcheck.go
@@ -30,9 +30,10 @@ type HashCheckingReader struct {
 // the checksum doesn't match.
 func (this HashCheckingReader) Read(p []byte) (n int, err error) {
 	n, err = this.Reader.Read(p)
-	if err == nil {
+	if n > 0 {
 		this.Hash.Write(p[:n])
-	} else if err == io.EOF {
+	}
+	if err == io.EOF {
 		sum := this.Hash.Sum(make([]byte, 0, this.Hash.Size()))
 		if fmt.Sprintf("%x", sum) != this.Check {
 			err = BadChecksum

commit fb3a1997d5e7f9a38a64824367e75fcc782e946d
Author: Tom Clegg <tom at curoverse.com>
Date:   Wed Aug 13 14:34:29 2014 -0400

    3551: When invoking run_test_server.py during tests, pass stderr
    through to caller instead of discarding.

diff --git a/sdk/go/keepclient/keepclient_test.go b/sdk/go/keepclient/keepclient_test.go
index 66037dc..015b248 100644
--- a/sdk/go/keepclient/keepclient_test.go
+++ b/sdk/go/keepclient/keepclient_test.go
@@ -42,13 +42,29 @@ func pythonDir() string {
 func (s *ServerRequiredSuite) SetUpSuite(c *C) {
 	if *no_server {
 		c.Skip("Skipping tests that require server")
-	} else {
-		os.Chdir(pythonDir())
-		if err := exec.Command("python", "run_test_server.py", "start").Run(); err != nil {
-			panic("'python run_test_server.py start' returned error")
+		return
+	}
+	os.Chdir(pythonDir())
+	{
+		cmd := exec.Command("python", "run_test_server.py", "start")
+		stderr, err := cmd.StderrPipe()
+		if err != nil {
+			log.Fatalf("Setting up stderr pipe: %s", err)
+		}
+		go io.Copy(os.Stderr, stderr)
+		if err := cmd.Run(); err != nil {
+			panic(fmt.Sprintf("'python run_test_server.py start' returned error %s", err))
+		}
+	}
+	{
+		cmd := exec.Command("python", "run_test_server.py", "start_keep")
+		stderr, err := cmd.StderrPipe()
+		if err != nil {
+			log.Fatalf("Setting up stderr pipe: %s", err)
 		}
-		if err := exec.Command("python", "run_test_server.py", "start_keep").Run(); err != nil {
-			panic("'python run_test_server.py start_keep' returned error")
+		go io.Copy(os.Stderr, stderr)
+		if err := cmd.Run(); err != nil {
+			panic(fmt.Sprintf("'python run_test_server.py start_keep' returned error %s", err))
 		}
 	}
 }

commit 63871346153fea194b169eec38f6efae3061ebf6
Author: Tom Clegg <tom at curoverse.com>
Date:   Wed Aug 13 14:32:40 2014 -0400

    3551: When testing keep clients, write keepstore/keepproxy logs to
    tmp/run_test_server.log instead of discarding.

diff --git a/sdk/python/tests/run_test_server.py b/sdk/python/tests/run_test_server.py
index a82866a..3226a3c 100644
--- a/sdk/python/tests/run_test_server.py
+++ b/sdk/python/tests/run_test_server.py
@@ -25,6 +25,8 @@ SERVER_PID_PATH = 'tmp/pids/webrick-test.pid'
 WEBSOCKETS_SERVER_PID_PATH = 'tmp/pids/passenger-test.pid'
 os.environ['PATH'] = os.environ['GOPATH'] + '/bin:' + os.environ['PATH']
 
+logfile = None
+
 def find_server_pid(PID_PATH, wait=10):
     now = time.time()
     timeout = now + wait
@@ -143,7 +145,7 @@ def _start_keep(n, keep_args):
     for arg, val in keep_args.iteritems():
         keep_cmd.append("{}={}".format(arg, val))
 
-    kp0 = subprocess.Popen(keep_cmd)
+    kp0 = subprocess.Popen(keep_cmd, stderr=log_stream())
     with open("tmp/keep{}.pid".format(n), 'w') as f:
         f.write(str(kp0.pid))
 
@@ -206,7 +208,8 @@ def run_keep_proxy(auth):
     os.environ["ARVADOS_API_TOKEN"] = fixture("api_client_authorizations")[auth]["api_token"]
 
     kp0 = subprocess.Popen(["keepproxy",
-                            "-pid=tmp/keepproxy.pid", "-listen=:{}".format(25101)])
+                            "-pid=tmp/keepproxy.pid", "-listen=:{}".format(25101)],
+                           stderr=log_stream())
 
     authorize_with("admin")
     api = arvados.api('v1', cache=False)
@@ -217,6 +220,16 @@ def run_keep_proxy(auth):
 def stop_keep_proxy():
     kill_server_pid("tmp/keepproxy.pid", 0)
 
+def log_stream():
+    global logfile
+    if not os.path.exists("tmp"):
+        os.mkdir("tmp")
+    if not logfile:
+        logpath = os.path.join(os.getcwd(), 'tmp', 'run_test_server.log')
+        logfile = open(logpath, 'a')
+        print >>sys.stderr, "Saving Keep server log messages to %s" % (logpath,)
+    return logfile
+
 def fixture(fix):
     '''load a fixture yaml file'''
     with open(os.path.join(SERVICES_SRC_DIR, 'api', "test", "fixtures",

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list