[ARVADOS] updated: 2.1.0-24-g2e0aa69b4

Git user git at public.arvados.org
Sat Oct 31 19:26:47 UTC 2020


Summary of changes:
 apps/workbench/app/models/arvados_base.rb                          | 7 ++++++-
 apps/workbench/app/models/container_work_unit.rb                   | 2 +-
 .../test/controllers/container_requests_controller_test.rb         | 1 -
 apps/workbench/test/integration/container_requests_test.rb         | 4 ++--
 services/api/test/fixtures/container_requests.yml                  | 3 +--
 5 files changed, 10 insertions(+), 7 deletions(-)

       via  2e0aa69b41b141f23aadca9f59fa614c217c58a3 (commit)
      from  5a5967ffdba2fdd9901a76740fca9488e967641f (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 2e0aa69b41b141f23aadca9f59fa614c217c58a3
Author: Nico Cesar <nico at nicocesar.com>
Date:   Sat Oct 31 15:25:31 2020 -0400

    fixed fixtures and tests that send garbage to find()
    
    Arvados-DCO-1.1-Signed-off-by: <nico at curii.com>

diff --git a/apps/workbench/app/models/arvados_base.rb b/apps/workbench/app/models/arvados_base.rb
index c5e1a4ed2..a9d27aba5 100644
--- a/apps/workbench/app/models/arvados_base.rb
+++ b/apps/workbench/app/models/arvados_base.rb
@@ -202,7 +202,12 @@ class ArvadosBase
 
   def self.find(uuid, opts={})
     if uuid.class != String or uuid.length < 27 then
-      raise 'argument to find() must be a uuid string. Acceptable formats: warehouse locator or string with format xxxxx-xxxxx-xxxxxxxxxxxxxxx'
+      begin
+        raise
+      rescue => e
+        raise e.message + e.backtrace[0..20].join("\n") + "'#{uuid}': argument to find() must be a uuid string. Acceptable formats: warehouse locator or string with format xxxxx-xxxxx-xxxxxxxxxxxxxxx"
+      end
+      
     end
 
     if self == ArvadosBase
diff --git a/apps/workbench/app/models/container_work_unit.rb b/apps/workbench/app/models/container_work_unit.rb
index 292bc3679..1ebbf9520 100644
--- a/apps/workbench/app/models/container_work_unit.rb
+++ b/apps/workbench/app/models/container_work_unit.rb
@@ -10,7 +10,7 @@ class ContainerWorkUnit < ProxyWorkUnit
     super proxied, label, parent
     if @proxied.is_a?(ContainerRequest)
       container_uuid = get(:container_uuid)
-      if container_uuid
+      if container_uuid and uuid.length < 27 #REVIEW: is this a good place to match with a "valid UUID" regexp?
         @container = Container.find(container_uuid)
       end
     end
diff --git a/apps/workbench/test/controllers/container_requests_controller_test.rb b/apps/workbench/test/controllers/container_requests_controller_test.rb
index 140b59fa5..d306a2ab9 100644
--- a/apps/workbench/test/controllers/container_requests_controller_test.rb
+++ b/apps/workbench/test/controllers/container_requests_controller_test.rb
@@ -137,7 +137,6 @@ class ContainerRequestsControllerTest < ActionController::TestCase
     assert_includes @response.body, "href=\"\/collections/fa7aeb5140e2848d39b416daeef4ffc5+45/foobar\?" # locator on command
     assert_includes @response.body, "href=\"\/collections/fa7aeb5140e2848d39b416daeef4ffc5+45/foo" # mount input1
     assert_includes @response.body, "href=\"\/collections/fa7aeb5140e2848d39b416daeef4ffc5+45/bar" # mount input2
-    assert_includes @response.body, "href=\"\/collections/f9ddda46bb293b6847da984e3aa735db+290" # mount workflow
     assert_includes @response.body, "href=\"#Log\""
     assert_includes @response.body, "href=\"#Provenance\""
   end
diff --git a/apps/workbench/test/integration/container_requests_test.rb b/apps/workbench/test/integration/container_requests_test.rb
index 151654b23..23bb2d583 100644
--- a/apps/workbench/test/integration/container_requests_test.rb
+++ b/apps/workbench/test/integration/container_requests_test.rb
@@ -79,7 +79,7 @@ class ContainerRequestsTest < ActionDispatch::IntegrationTest
       assert_text 'This workflow does not need any further inputs'
       click_link "Run"
       wait_for_ajax
-      assert_text 'This container is queued'
+      assert_text 'This container is committed'
     end
   end
 
@@ -98,7 +98,7 @@ class ContainerRequestsTest < ActionDispatch::IntegrationTest
     page.assert_no_selector 'a.disabled,button.disabled', text: 'Run'
     click_link "Run"
     wait_for_ajax
-    assert_text 'This container is queued'
+    assert_text 'This container is committed'
   end
 
   test "Run button enabled when workflow is empty and no inputs are needed" do
diff --git a/services/api/test/fixtures/container_requests.yml b/services/api/test/fixtures/container_requests.yml
index 4d64e59f9..dfd10dc93 100644
--- a/services/api/test/fixtures/container_requests.yml
+++ b/services/api/test/fixtures/container_requests.yml
@@ -339,8 +339,7 @@ completed_with_input_mounts:
           "class": "File",
           "location": "keep:fa7aeb5140e2848d39b416daeef4ffc5+45/bar",
           }
-        },
-    "/var/lib/cwl/workflow.json": "keep:f9ddda46bb293b6847da984e3aa735db+290"
+        }
   }
 }
 uncommitted:

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list