[ARVADOS] updated: 1.3.0-1008-ge9a3a68fd

Git user git at public.curoverse.com
Thu Jun 6 16:55:58 UTC 2019


Summary of changes:
 services/api/app/controllers/application_controller.rb |  8 ++++++--
 .../arvados/v1/container_requests_controller.rb        | 18 ++++++++++++++++++
 services/api/app/models/container_request.rb           | 18 ------------------
 3 files changed, 24 insertions(+), 20 deletions(-)

       via  e9a3a68fd1c238cd2a6e72df73141462dfe41a85 (commit)
       via  2c8706a4039f10274666b1cd879527d2e18fa338 (commit)
      from  57eb9ae04ace45f70d2e0ceaeda3457062074b95 (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 e9a3a68fd1c238cd2a6e72df73141462dfe41a85
Author: Lucas Di Pentima <ldipentima at veritasgenetics.com>
Date:   Thu Jun 6 13:55:19 2019 -0300

    15306: Adds warning log message when parameter isn't boolean.
    
    Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima <ldipentima at veritasgenetics.com>

diff --git a/services/api/app/controllers/application_controller.rb b/services/api/app/controllers/application_controller.rb
index 234e8018c..30ee0787d 100644
--- a/services/api/app/controllers/application_controller.rb
+++ b/services/api/app/controllers/application_controller.rb
@@ -166,8 +166,12 @@ class ApplicationController < ActionController::Base
   protected
 
   def bool_param(pname)
-    if params.include?(pname) && params[pname].is_a?(Boolean)
-      return params[pname]
+    if params.include?(pname)
+      if params[pname].is_a?(Boolean)
+        return params[pname]
+      else
+        logger.warn "Warning: received non-boolean parameter '#{pname}' on #{self.class.inspect}."
+      end
     end
     false
   end

commit 2c8706a4039f10274666b1cd879527d2e18fa338
Author: Lucas Di Pentima <ldipentima at veritasgenetics.com>
Date:   Thu Jun 6 13:48:47 2019 -0300

    15306: Moves include_trash param declaration to the controller.
    
    Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima <ldipentima at veritasgenetics.com>

diff --git a/services/api/app/controllers/arvados/v1/container_requests_controller.rb b/services/api/app/controllers/arvados/v1/container_requests_controller.rb
index 47ea16e34..3d5d4616e 100644
--- a/services/api/app/controllers/arvados/v1/container_requests_controller.rb
+++ b/services/api/app/controllers/arvados/v1/container_requests_controller.rb
@@ -10,4 +10,22 @@ class Arvados::V1::ContainerRequestsController < ApplicationController
   accept_attribute_as_json :filters, Array
   accept_attribute_as_json :scheduling_parameters, Hash
   accept_attribute_as_json :secret_mounts, Hash
+
+  def self._index_requires_parameters
+    (super rescue {}).
+      merge({
+        include_trash: {
+          type: 'boolean', required: false, description: "Include container requests whose owner project is trashed."
+        },
+      })
+  end
+
+  def self._show_requires_parameters
+    (super rescue {}).
+      merge({
+        include_trash: {
+          type: 'boolean', required: false, description: "Show container request even if its owner project is trashed."
+        },
+      })
+  end
 end
diff --git a/services/api/app/models/container_request.rb b/services/api/app/models/container_request.rb
index 7a710f070..c412e4b85 100644
--- a/services/api/app/models/container_request.rb
+++ b/services/api/app/models/container_request.rb
@@ -76,24 +76,6 @@ class ContainerRequest < ArvadosModel
     t.add :use_existing
   end
 
-  def self._index_requires_parameters
-    (super rescue {}).
-      merge({
-        include_trash: {
-          type: 'boolean', required: false, description: "Include container requests whose owner project is trashed."
-        },
-      })
-  end
-
-  def self._show_requires_parameters
-    (super rescue {}).
-      merge({
-        include_trash: {
-          type: 'boolean', required: false, description: "Show container request even if its owner project is trashed."
-        },
-      })
-  end
-
   # Supported states for a container request
   States =
     [

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list