[ARVADOS] updated: 1.3.0-1590-gd47c64bec

Git user git at public.curoverse.com
Mon Sep 9 19:38:13 UTC 2019


Summary of changes:
 services/api/app/models/container_request.rb     | 16 ++++++++++++++++
 services/api/test/unit/container_request_test.rb |  8 +++++++-
 2 files changed, 23 insertions(+), 1 deletion(-)

       via  d47c64becdb1f28b297b3de60c4a87b12bae70be (commit)
      from  3ee696c6485008044b1a54c351d0035ef485305e (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 d47c64becdb1f28b297b3de60c4a87b12bae70be
Author: Peter Amstutz <pamstutz at veritasgenetics.com>
Date:   Mon Sep 9 15:37:32 2019 -0400

    15499: Create additional unmodified log collection
    
    Arvados-DCO-1.1-Signed-off-by: Peter Amstutz <pamstutz at veritasgenetics.com>

diff --git a/services/api/app/models/container_request.rb b/services/api/app/models/container_request.rb
index c412e4b85..20402960a 100644
--- a/services/api/app/models/container_request.rb
+++ b/services/api/app/models/container_request.rb
@@ -187,6 +187,22 @@ class ContainerRequest < ArvadosModel
       end
 
       if out_type == "log"
+        # Save log to its own collection
+        completed_coll = Collection.new(
+          owner_uuid: self.owner_uuid,
+          name: "Container #{out_type} for container #{container.uuid}",
+          properties: {
+            'type' => out_type,
+            'container_request' => uuid,
+          },
+          portable_data_hash: Digest::MD5.hexdigest(manifest) + '+' + manifest.bytesize.to_s,
+          manifest_text: manifest,
+          trash_at: trash_at,
+          delete_at: trash_at)
+        completed_coll.save_with_unique_name!
+
+        # Also copy the log into a merged collection that has all
+        # attempts.
         src = Arv::Collection.new(manifest)
         dst = Arv::Collection.new(coll.manifest_text)
         dst.cp_r("./", ".", src)
diff --git a/services/api/test/unit/container_request_test.rb b/services/api/test/unit/container_request_test.rb
index 4087a8878..b04bae864 100644
--- a/services/api/test/unit/container_request_test.rb
+++ b/services/api/test/unit/container_request_test.rb
@@ -852,12 +852,18 @@ class ContainerRequestTest < ActiveSupport::TestCase
 
   def run_container(cr)
     act_as_system_user do
+      logc = Collection.new(owner_uuid: system_user_uuid,
+                            manifest_text: ". ef772b2f28e2c8ca84de45466ed19ee9+7815 0:0:arv-mount.txt\n")
+      logc.save!
+
       c = Container.find_by_uuid(cr.container_uuid)
       c.update_attributes!(state: Container::Locked)
       c.update_attributes!(state: Container::Running)
       c.update_attributes!(state: Container::Complete,
                            exit_code: 0,
-                           output: '1f4b0bc7583c2a7f9102c395f4ffc5e3+45')
+                           output: '1f4b0bc7583c2a7f9102c395f4ffc5e3+45',
+                           log: logc.portable_data_hash)
+      logc.destroy
       c
     end
   end

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list