[ARVADOS] updated: 8deda2012ea7e25610f2cbd0a271e131d9364503

git at public.curoverse.com git at public.curoverse.com
Tue Nov 18 10:36:14 EST 2014


Summary of changes:
 apps/workbench/Gemfile                             |   2 +-
 apps/workbench/Gemfile.lock                        |  12 +--
 .../workbench/app/assets/javascripts/filterable.js |  41 +++++--
 .../app/assets/javascripts/infinite_scroll.js      |   7 +-
 .../app/assets/javascripts/pipeline_instances.js   |  10 +-
 .../app/assets/javascripts/select_modal.js         |  31 +++++-
 .../app/assets/javascripts/selection.js.erb        |   3 +-
 .../app/controllers/application_controller.rb      |  15 ++-
 .../controllers/pipeline_instances_controller.rb   |  26 +++--
 apps/workbench/app/helpers/application_helper.rb   |  11 +-
 apps/workbench/app/models/arvados_resource_list.rb |   9 +-
 .../app/views/application/_choose.html.erb         |   9 +-
 .../app/views/collections/_choose_rows.html.erb    |   4 +-
 .../collections/_show_chooser_preview.html.erb     |   2 +-
 .../app/views/collections/_show_files.html.erb     |  23 ++--
 .../app/views/layouts/application.html.erb         |   2 +-
 apps/workbench/app/views/layouts/body.html.erb     |  13 ---
 .../views/pipeline_instances/_show_recent.html.erb |  44 +-------
 ..._recent.html.erb => _show_recent_rows.html.erb} |  45 +-------
 .../app/views/pipeline_instances/index.html.erb    |  14 ++-
 .../pipeline_instances_controller_test.rb          |   2 +-
 .../integration/filterable_infinite_scroll_test.rb |  29 +++++
 .../test/integration/pipeline_instances_test.rb    | 119 +++++++++++++++------
 .../test/unit/arvados_resource_list_test.rb        |  11 ++
 sdk/cli/bin/crunch-job                             |  91 +++++++++-------
 sdk/go/keepclient/keepclient_test.go               |  10 +-
 sdk/python/arvados/collection.py                   |  20 ++--
 sdk/python/arvados/stream.py                       |   4 +-
 sdk/python/tests/test_collections.py               |   4 -
 sdk/ruby/arvados.gemspec                           |   2 +-
 .../api/app/controllers/application_controller.rb  |   8 ++
 services/api/app/models/collection.rb              |   6 +-
 services/api/app/models/node.rb                    |  60 ++++++++---
 services/api/config/application.default.yml        |  22 +++-
 services/api/config/unbound.template               |   4 +
 services/api/script/restart-dns-server             |  34 ++++++
 services/api/script/restart-dnsmasq                |  21 ----
 services/api/test/fixtures/pipeline_templates.yml  |  38 +++++++
 .../arvados/v1/collections_controller_test.rb      |  12 +++
 services/api/test/unit/collection_test.rb          |   2 +-
 services/fuse/setup.py                             |   2 +-
 services/fuse/tests/test_mount.py                  |  15 +--
 42 files changed, 531 insertions(+), 308 deletions(-)
 copy apps/workbench/app/views/pipeline_instances/{_show_recent.html.erb => _show_recent_rows.html.erb} (58%)
 create mode 100644 apps/workbench/test/integration/filterable_infinite_scroll_test.rb
 create mode 100644 services/api/config/unbound.template
 create mode 100755 services/api/script/restart-dns-server
 delete mode 100755 services/api/script/restart-dnsmasq

  discards  9cd3ddf205cb4b0874c2b80bc200adac2598961d (commit)
  discards  4b20653d3f65c01661c6eae9cea25c0ab3c79aef (commit)
  discards  e8dd6d95b4ab40e6f95b0faa51752599e27f6baf (commit)
  discards  97bb07673de62fe9bdb5fe8ae0a9c6dbc8d8c2d8 (commit)
  discards  34a73d5411d0e9a86ede40e6a3ebce54f4d9a94f (commit)
  discards  1aa683826a4e9d1956167f812e12a9386de58c81 (commit)
  discards  f78caf95ed818b476a1b9de1c4fc868aa020f185 (commit)
       via  8deda2012ea7e25610f2cbd0a271e131d9364503 (commit)
       via  732f7f0740dc7e5d5cff54f9cc30d4cd4597cb27 (commit)
       via  763af5413e6195fe004846abf86a7ae134168990 (commit)
       via  f72ca2ac98200452700dc386fa439a45b8bb15e3 (commit)
       via  4805867bc1004ae9d755a6375d592748a7b29585 (commit)
       via  ff7b22c70cd77073d9bdbebac0bf03d43745ed0c (commit)
       via  95a61743fd1df435313042c17e581d4b7b457a2a (commit)
       via  78447c70f491db25dc99eca60ebcc1b7a5362ec3 (commit)
       via  664919d58c3689cd9e0a25547ec1e02d9adda38c (commit)
       via  97ddc11818d059e42989f302fa15db4c5e19d5b3 (commit)
       via  9a46fb0033514db6dd5e8ab4ccf793f78458a734 (commit)
       via  bfd5100c4e0bed1910875099937169f1b0c8ce7b (commit)
       via  d9f45bd01d2f5691a9aaca4f1fc00465497ef00c (commit)
       via  0adcabd351108e83b630e27c48ce85f2b3cb3e14 (commit)
       via  e0f4747a2b24af68b474bb2da12e8799440c9acc (commit)
       via  a128baa147df78cadb5c1657dfa740fad80570ea (commit)
       via  43e019a1e37effa0ccde680b52a61fbba1f858d4 (commit)
       via  7395af3b19b8fc422fe2456c6bead1e7f4c60989 (commit)
       via  a75ef0985d2a385165168cbb488cf97382308549 (commit)
       via  11374252ee3c26240420bb3aa0d0433fad71731f (commit)
       via  5d87bcae66870127445e5eb018a69d606e93e244 (commit)
       via  83e73eda7123a6de741198d759841fd186fc2a11 (commit)
       via  06afd90ff09a83982451733f1e39974299d9a2d9 (commit)
       via  4b3222657e160eaf61459aac843e8377100a53e4 (commit)
       via  abe8fc4c5818165ffb696448c81b3bf1bb5dc1dd (commit)
       via  4c110b5f4e8e92d613f70427f27bdfae2ea376c7 (commit)
       via  2ac2528dc0e5b700a2640e28dc66e474db9ad329 (commit)
       via  9cd99d3070cd69664a31f8e25fad68fe8b7c43cf (commit)
       via  6de0a4ab0323e69a5499e59af03c9c5e6125fed7 (commit)
       via  2070784e52d89bbcf636062532a8ce37629737db (commit)
       via  59f750a109a706d29862530dc3d282db75736d38 (commit)
       via  8b7ed36ff057c4a483f4ee8a1c66929425b366c6 (commit)
       via  f5a1a9210e7638babe33d16938246e93ff4dd334 (commit)
       via  3a31350c6265cb1135d3d4d40af436aae91a9894 (commit)
       via  c805714d8bbc51adb32a3a3ae4b82ea41eaa0de0 (commit)
       via  9325dabcc2b6c32a589ba86cc052946b4875eb1d (commit)
       via  95323ba327cadff2d1cb8c3f38c5dbb65dbd3694 (commit)
       via  eb185aab22bd916981ea874fd82e6a1fecce7cd2 (commit)
       via  f81483a374fbdfe6d5f36e5f5e55f92455afa155 (commit)
       via  1ac0e3da5fbd477bd2acbf5bd8baa3c86f08194b (commit)
       via  dff161c1eaaecd6b557e88709fdf5f0dcb52821b (commit)
       via  a0e70cf1da033f7d94e728ab919bd8cfcabf3743 (commit)
       via  c28b9b91028c90497455bfde188915982377b825 (commit)
       via  76c9a858643680d90f9694d49c212a54fe5b759f (commit)
       via  bc4992f9e11cd0639cf6461736963d66830c5af8 (commit)
       via  39e39addee0a0de050c2b4d1f88fb7d56da7436b (commit)
       via  333fbec95590cfcb30cfff7dc61e6b8cc41edf18 (commit)
       via  b2610e066d569b323fe55ffee615e61ca4e461d1 (commit)
       via  6c7bfabc03237419decad9674c90ea7af906b615 (commit)
       via  cac035d7a171b90f0dc714d17b500b4062c0c58b (commit)
       via  5cfa1aab53ba24d800d2dfa9ac1d88477063ab7f (commit)
       via  61f8ceeb1d9b0786507d44ddceffce43fb9d13ae (commit)
       via  8e209b3cc2065c4a52d7bdcb2c4c651b3f450d0d (commit)
       via  e993707e7a20ec37f4023bcf709fc77adce3857d (commit)
       via  2d10f584cafa6348a933a5714ec8a7744957005d (commit)
       via  16527c125c469451d810951ded0860294950a1f0 (commit)
       via  cba838830cb4b47420573ba0187e0eebbc5b6f1f (commit)
       via  7b4fc9f10ad0df6e532299dbfc57ad4ba97ee015 (commit)
       via  9547602dd2a0daf680635cec3249da759d3fd274 (commit)
       via  911c97b06e4578e7c74db814ae1587f23ef18604 (commit)
       via  7c76d9218ef91b14ede8a06fe9a96a5016361e17 (commit)
       via  f628e38317c20513cb73f81633d6a7c0663b8fd5 (commit)
       via  7d197c6f7a676ac0e73f855fb4e6a3cd103dc55c (commit)
       via  008cec917d19fadc011fdb1d61d7b54ffe1d4dda (commit)
       via  b917e8a2ebf8c51729ecde1d3cc3396d2fcf0034 (commit)
       via  d3cb9460f0a30f9602508bed7507c906b8a6d91d (commit)
       via  1491cdd65b8a3ef75f66516004bc0680651da201 (commit)
       via  29e012f772b1c1d4c286e143b50a9de9b8a6918c (commit)
       via  a5b4a7e8da51d84fe200d88dc39bd5431bb60a11 (commit)
       via  723afcb87896a7dcee99bb41b37ef368464f4f40 (commit)
       via  cffe9566efaa838ada850353dd6e51ec4cc3ebff (commit)
       via  88d7932586705439e7a02b403e65202164920660 (commit)
       via  1c0e350af2a30f4627ad879545c9c6fc6554d92a (commit)
       via  81bfa2fd57ee5e4b0042d418115f0e50170ee5eb (commit)
       via  6ac59725fedc0a958d60d85740b47deb25addb5b (commit)
       via  974ad63fc24161cb228003f4ef4cc32d5da578ff (commit)
       via  87567c9440a65a42fdde62e513b40dc5a8585fdf (commit)

This update added new revisions after undoing existing revisions.  That is
to say, the old revision is not a strict subset of the new revision.  This
situation occurs when you --force push a change and generate a repository
containing something like this:

 * -- * -- B -- O -- O -- O (9cd3ddf205cb4b0874c2b80bc200adac2598961d)
            \
             N -- N -- N (8deda2012ea7e25610f2cbd0a271e131d9364503)

When this happens we assume that you've already had alert emails for all
of the O revisions, and so we here report only the revisions in the N
branch from the common base, B.

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 8deda2012ea7e25610f2cbd0a271e131d9364503
Merge: 732f7f0 4805867
Author: Tom Clegg <tom at curoverse.com>
Date:   Tue Nov 18 03:32:11 2014 -0500

    4363: Merge branch 'master' into 4363-less-filename-munging


commit 732f7f0740dc7e5d5cff54f9cc30d4cd4597cb27
Author: Tom Clegg <tom at curoverse.com>
Date:   Tue Nov 18 03:31:19 2014 -0500

    4363: Explicit UTF-8 for test string.

diff --git a/services/api/test/unit/collection_test.rb b/services/api/test/unit/collection_test.rb
index 8853319..593bd4e 100644
--- a/services/api/test/unit/collection_test.rb
+++ b/services/api/test/unit/collection_test.rb
@@ -16,7 +16,7 @@ class CollectionTest < ActiveSupport::TestCase
 
   test 'accept UTF-8 manifest_text' do
     act_as_system_user do
-      c = create_collection "f\xc3\x98\xc3\x98"
+      c = create_collection "f\xc3\x98\xc3\x98", Encoding::UTF_8
       assert c.valid?
     end
   end

commit 763af5413e6195fe004846abf86a7ae134168990
Author: Tom Clegg <tom at curoverse.com>
Date:   Mon Nov 17 11:01:49 2014 -0500

    4363: Validate utf-8 encoding of manifest_text.

diff --git a/services/api/app/models/collection.rb b/services/api/app/models/collection.rb
index accd2cc..5dd760f 100644
--- a/services/api/app/models/collection.rb
+++ b/services/api/app/models/collection.rb
@@ -5,6 +5,7 @@ class Collection < ArvadosModel
   include KindAndEtag
   include CommonApiTemplate
 
+  before_validation :check_encoding
   before_validation :check_signatures
   before_validation :strip_manifest_text
   before_validation :set_portable_data_hash
@@ -106,6 +107,15 @@ class Collection < ArvadosModel
     true
   end
 
+  def check_encoding
+    if manifest_text.encoding.name == 'UTF-8' and manifest_text.valid_encoding?
+      true
+    else
+      errors.add :manifest_text, "must use UTF-8 encoding"
+      false
+    end
+  end
+
   def redundancy_status
     if redundancy_confirmed_as.nil?
       'unconfirmed'
diff --git a/services/api/test/unit/collection_test.rb b/services/api/test/unit/collection_test.rb
index 4f73670..8853319 100644
--- a/services/api/test/unit/collection_test.rb
+++ b/services/api/test/unit/collection_test.rb
@@ -1,7 +1,41 @@
 require 'test_helper'
 
 class CollectionTest < ActiveSupport::TestCase
-  # test "the truth" do
-  #   assert true
-  # end
+  def create_collection name, enc=nil
+    txt = ". d41d8cd98f00b204e9800998ecf8427e+0 0:0:#{name}.txt\n"
+    txt.force_encoding(enc) if enc
+    return Collection.create(manifest_text: txt)
+  end
+
+  test 'accept ASCII manifest_text' do
+    act_as_system_user do
+      c = create_collection 'foo'
+      assert c.valid?
+    end
+  end
+
+  test 'accept UTF-8 manifest_text' do
+    act_as_system_user do
+      c = create_collection "f\xc3\x98\xc3\x98"
+      assert c.valid?
+    end
+  end
+
+  test 'refuse manifest_text with invalid UTF-8 byte sequence' do
+    act_as_system_user do
+      c = create_collection "f\xc8o", Encoding::UTF_8
+      assert !c.valid?
+      assert_equal [:manifest_text], c.errors.messages.keys
+      assert_match /UTF-8/, c.errors.messages[:manifest_text].first
+    end
+  end
+
+  test 'refuse manifest_text with non-UTF-8 encoding' do
+    act_as_system_user do
+      c = create_collection "f\xc8o", Encoding::ASCII_8BIT
+      assert !c.valid?
+      assert_equal [:manifest_text], c.errors.messages.keys
+      assert_match /UTF-8/, c.errors.messages[:manifest_text].first
+    end
+  end
 end

commit f72ca2ac98200452700dc386fa439a45b8bb15e3
Author: Tom Clegg <tom at curoverse.com>
Date:   Thu Nov 13 14:54:29 2014 -0500

    4363: Remove redundant test.

diff --git a/services/fuse/tests/test_mount.py b/services/fuse/tests/test_mount.py
index 3a59084..092fed5 100644
--- a/services/fuse/tests/test_mount.py
+++ b/services/fuse/tests/test_mount.py
@@ -353,4 +353,3 @@ class FuseUnitTest(unittest.TestCase):
         self.assertEqual("_", fuse.sanitize_filename(""))
         self.assertEqual("_", fuse.sanitize_filename("."))
         self.assertEqual("__", fuse.sanitize_filename(".."))
-        self.assertEqual("__", fuse.sanitize_filename(".."))

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list