[ARVADOS] updated: ad1f68c37d46e56916e18996e14405ed9dab7d35

git at public.curoverse.com git at public.curoverse.com
Wed Jun 17 19:08:17 EDT 2015


Summary of changes:
 sdk/python/arvados/api.py                 |  5 ++-
 services/api/app/models/collection.rb     |  4 +-
 services/api/db/structure.sql             |  1 -
 services/api/test/unit/collection_test.rb | 16 +++----
 services/datamanager/keep/keep.go         | 75 +++++++++++++++++++------------
 services/keepstore/handler_test.go        |  8 ++--
 services/keepstore/handlers.go            | 63 ++++++--------------------
 services/keepstore/perms.go               | 23 ++++++----
 services/keepstore/perms_test.go          | 24 +++++-----
 9 files changed, 105 insertions(+), 114 deletions(-)

       via  ad1f68c37d46e56916e18996e14405ed9dab7d35 (commit)
       via  e81225f0a847dfd14d97acbab775a9b3e0e6cb9b (commit)
       via  88ce56692e75cebdedc983fcb00aa48ea60aba8b (commit)
       via  4d0e87db2bef1f30634d28338e89227b985e6485 (commit)
       via  6f652a6a75b6c17e55cf62a3e0c047595e3aa035 (commit)
       via  a4d63932d669acd5011a7fa5afcbeec513acfe2c (commit)
       via  7c0924d91aef5da1f69bd5f88b61880915afae4a (commit)
       via  37ffea7224fa4af8af63de2882e4cf9592870822 (commit)
      from  88038b52936824be2bd2127c03d54e647cd1ff7e (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 ad1f68c37d46e56916e18996e14405ed9dab7d35
Author: radhika <radhika at curoverse.com>
Date:   Wed Jun 17 19:06:00 2015 -0400

    6277: rename the before_validation filter check_manifest_validity as log_invalid_manifest_format until we are ready to actually validate manifest formats.

diff --git a/services/api/app/models/collection.rb b/services/api/app/models/collection.rb
index f7822ec..cac25d1 100644
--- a/services/api/app/models/collection.rb
+++ b/services/api/app/models/collection.rb
@@ -9,7 +9,7 @@ class Collection < ArvadosModel
   serialize :properties, Hash
 
   before_validation :check_encoding
-  before_validation :check_manifest_validity
+  before_validation :log_invalid_manifest_format
   before_validation :check_signatures
   before_validation :strip_signatures_and_update_replication_confirmed
   validate :ensure_pdh_matches_manifest_text
@@ -193,7 +193,7 @@ class Collection < ArvadosModel
     end
   end
 
-  def check_manifest_validity
+  def log_invalid_manifest_format
     begin
       Keep::Manifest.validate! manifest_text if manifest_text
     rescue => e

commit e81225f0a847dfd14d97acbab775a9b3e0e6cb9b
Merge: 88ce566 4d0e87d
Author: radhika <radhika at curoverse.com>
Date:   Wed Jun 17 18:54:36 2015 -0400

    Merge branch 'master' into 6277-manifest-validation-api


commit 88ce56692e75cebdedc983fcb00aa48ea60aba8b
Author: Tom Clegg <tom at curoverse.com>
Date:   Wed Jun 17 16:40:29 2015 -0400

    6277: Simplify manifest-building loop, fix up truncation tests.

diff --git a/services/api/db/structure.sql b/services/api/db/structure.sql
index 66b41cb..0eef6b4 100644
--- a/services/api/db/structure.sql
+++ b/services/api/db/structure.sql
@@ -3,7 +3,6 @@
 --
 
 SET statement_timeout = 0;
-SET lock_timeout = 0;
 SET client_encoding = 'UTF8';
 SET standard_conforming_strings = on;
 SET check_function_bodies = false;
diff --git a/services/api/test/unit/collection_test.rb b/services/api/test/unit/collection_test.rb
index 7ce73eb..bcdefe7 100644
--- a/services/api/test/unit/collection_test.rb
+++ b/services/api/test/unit/collection_test.rb
@@ -56,27 +56,27 @@ class CollectionTest < ActiveSupport::TestCase
   [
     [2**8, false],
     [2**18, true],
-  ].each do |manifest_size, gets_truncated|
-    test "create collection with manifest size #{manifest_size} which gets truncated #{gets_truncated},
+  ].each do |manifest_size, allow_truncate|
+    test "create collection with manifest size #{manifest_size} with allow_truncate=#{allow_truncate},
           and not expect exceptions even on very large manifest texts" do
       # file_names has a max size, hence there will be no errors even on large manifests
       act_as_system_user do
-        manifest_text = './blurfl d41d8cd98f00b204e9800998ecf8427e+0'
+        manifest_text = ''
         index = 0
         while manifest_text.length < manifest_size
-          manifest_text += './subdir1 d41d8cd98f00b204e9800998ecf8427e+0' if index > 0
-          manifest_text += ' ' + "0:0:veryverylongfilename000000000000#{index}.txt\n"
+          manifest_text += "./blurfl d41d8cd98f00b204e9800998ecf8427e+0 0:0:veryverylongfilename000000000000#{index}.txt\n"
           index += 1
         end
+        manifest_text += "./laststreamname d41d8cd98f00b204e9800998ecf8427e+0 0:0:veryverylastfilename.txt\n"
         c = Collection.create(manifest_text: manifest_text)
 
         assert c.valid?
         assert c.file_names
         assert_match /veryverylongfilename0000000000001.txt/, c.file_names
         assert_match /veryverylongfilename0000000000002.txt/, c.file_names
-        if !gets_truncated
-          assert_match /blurfl/, c.file_names
-          assert_match /subdir1/, c.file_names
+        if not allow_truncate
+          assert_match /veryverylastfilename/, c.file_names
+          assert_match /laststreamname/, c.file_names
         end
       end
     end

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list