[ARVADOS] updated: 1.3.0-600-g661fbce61

Git user git at public.curoverse.com
Tue Mar 26 18:50:28 UTC 2019


Summary of changes:
 services/api/app/models/container.rb                               | 7 ++++---
 .../api/db/migrate/20190322174136_add_file_info_to_collection.rb   | 4 ++--
 2 files changed, 6 insertions(+), 5 deletions(-)

       via  661fbce61e9a150a0bfc5ab9dd5bff04afdd4286 (commit)
       via  4447a6160034e0b1f53a54ace8da7e0956c4c452 (commit)
      from  4e03c7e92230d5ceb5adf09844f514eacbfc3a41 (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 661fbce61e9a150a0bfc5ab9dd5bff04afdd4286
Author: Eric Biagiotti <ebiagiotti at veritasgenetics.com>
Date:   Tue Mar 26 14:50:18 2019 -0400

    14484: Fixes grouping bug by simplifying nested pdhs arrays
    
    Arvados-DCO-1.1-Signed-off-by: Eric Biagiotti <ebiagiotti at veritasgenetics.com>

diff --git a/services/api/app/models/container.rb b/services/api/app/models/container.rb
index e46ef6fd3..0e6a01c63 100644
--- a/services/api/app/models/container.rb
+++ b/services/api/app/models/container.rb
@@ -423,14 +423,15 @@ class Container < ArvadosModel
 
     while any
       any = false
-      pdhs = ActiveRecord::Base.connection.exec_query(
+      pdhs_res = ActiveRecord::Base.connection.exec_query(
         'SELECT DISTINCT portable_data_hash FROM collections '\
         "WHERE portable_data_hash > '#{last_pdh}' "\
         'GROUP BY portable_data_hash LIMIT 1000'
       )
-      break if pdhs.rows.count.zero?
+      break if pdhs_res.rows.count.zero?
 
-      Container.group_pdhs_by_manifest_size(pdhs.rows, batch_size_max) do |grouped_pdhs|
+      pdhs = pdhs_res.rows.collect { |r| r[0] }
+      Container.group_pdhs_by_manifest_size(pdhs, batch_size_max) do |grouped_pdhs|
         any = true
         yield grouped_pdhs
         done += grouped_pdhs.size
diff --git a/services/api/db/migrate/20190322174136_add_file_info_to_collection.rb b/services/api/db/migrate/20190322174136_add_file_info_to_collection.rb
index c55840432..e12e508be 100755
--- a/services/api/db/migrate/20190322174136_add_file_info_to_collection.rb
+++ b/services/api/db/migrate/20190322174136_add_file_info_to_collection.rb
@@ -6,7 +6,7 @@ class AddFileInfoToCollection < ActiveRecord::Migration
   def do_batch(pdhs)
     pdhs_str = ''
     pdhs.each do |pdh|
-      pdhs_str << "'" << pdh[0] << "'" << ','
+      pdhs_str << "'" << pdh << "'" << ','
     end
 
     collections = ActiveRecord::Base.connection.exec_query(

commit 4447a6160034e0b1f53a54ace8da7e0956c4c452
Author: Eric Biagiotti <ebiagiotti at veritasgenetics.com>
Date:   Tue Mar 26 13:56:10 2019 -0400

    14484: Changes file token to match the one used in collection.rb model
    
    Arvados-DCO-1.1-Signed-off-by: Eric Biagiotti <ebiagiotti at veritasgenetics.com>

diff --git a/services/api/db/migrate/20190322174136_add_file_info_to_collection.rb b/services/api/db/migrate/20190322174136_add_file_info_to_collection.rb
index 97bab1e56..c55840432 100755
--- a/services/api/db/migrate/20190322174136_add_file_info_to_collection.rb
+++ b/services/api/db/migrate/20190322174136_add_file_info_to_collection.rb
@@ -18,7 +18,7 @@ class AddFileInfoToCollection < ActiveRecord::Migration
       file_count = 0
       file_size_total = 0
       row[1].scan(/\S+/) do |token|
-        is_file = token.match(/^[[:digit:]]+:[[:digit:]]+:([^\000-\040\\]|\\[0-3][0-7][0-7])+$/)
+        is_file = token.match(/^[[:digit:]]+:[[:digit:]]+:/)
         if is_file
           _, filesize, filename = token.split(':', 3)
 

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list