[ARVADOS] created: 61627102af1a1b7a83d547efad5180a584dd9a0c

Git user git at public.curoverse.com
Wed Sep 20 17:52:26 EDT 2017


        at  61627102af1a1b7a83d547efad5180a584dd9a0c (commit)


commit 61627102af1a1b7a83d547efad5180a584dd9a0c
Author: Tom Clegg <tclegg at veritasgenetics.com>
Date:   Wed Sep 20 17:44:22 2017 -0400

    12298: Allow non-null log when cancelling an unrunnable container.
    
    Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tclegg at veritasgenetics.com>

diff --git a/services/api/app/models/container.rb b/services/api/app/models/container.rb
index 36c87af..e95c1e8 100644
--- a/services/api/app/models/container.rb
+++ b/services/api/app/models/container.rb
@@ -389,7 +389,7 @@ class Container < ArvadosModel
       when Running
         permitted.push :finished_at, :output, :log
       when Queued, Locked
-        permitted.push :finished_at
+        permitted.push :finished_at, :log
       end
 
     else
diff --git a/services/api/test/unit/container_test.rb b/services/api/test/unit/container_test.rb
index 0f3dab5..0b75974 100644
--- a/services/api/test/unit/container_test.rb
+++ b/services/api/test/unit/container_test.rb
@@ -451,6 +451,17 @@ class ContainerTest < ActiveSupport::TestCase
     check_no_change_from_cancelled c
   end
 
+  test "Container locked cancel with log" do
+    c, _ = minimal_new
+    set_user_from_auth :dispatch1
+    assert c.lock, show_errors(c)
+    assert c.update_attributes(
+             state: Container::Cancelled,
+             log: collections(:real_log_collection).portable_data_hash,
+           ), show_errors(c)
+    check_no_change_from_cancelled c
+  end
+
   test "Container running cancel" do
     c, _ = minimal_new
     set_user_from_auth :dispatch1

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list