[ARVADOS] updated: b5b0f8c9822435fa5faf0e59b65495806ea82dcb

git at public.curoverse.com git at public.curoverse.com
Tue Jul 8 16:45:20 EDT 2014


Summary of changes:
 sdk/cli/bin/arv-run-pipeline-instance | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

       via  b5b0f8c9822435fa5faf0e59b65495806ea82dcb (commit)
      from  25e33b1caae27d60d8a915b708b431766d9eb7cd (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 b5b0f8c9822435fa5faf0e59b65495806ea82dcb
Author: Brett Smith <brett at curoverse.com>
Date:   Tue Jul 8 16:46:29 2014 -0400

    arv-run-pipeline-instance doesn't submit nil Job parameters.
    
    This is the same principle that we already take with POST parameters,
    applied to the body of the Job itself.  It immediately prevents
    sending nil runtime_constraints, which the API server doesn't accept.
    It should also mean that any error messages passed on from the API
    server are more likely to be helpful.
    
    No issue # - reported by Abram on IRC.

diff --git a/sdk/cli/bin/arv-run-pipeline-instance b/sdk/cli/bin/arv-run-pipeline-instance
index 974e967..e358896 100755
--- a/sdk/cli/bin/arv-run-pipeline-instance
+++ b/sdk/cli/bin/arv-run-pipeline-instance
@@ -325,7 +325,7 @@ class JobCache
   def self.create(pipeline, component, job, create_params)
     @cache ||= {}
 
-    body = { :job => job }.merge(create_params.select { |k,v| not v.nil? })
+    body = {job: no_nil_values(job)}.merge(no_nil_values(create_params))
 
     result = $client.execute(:api_method => $arvados.jobs.create,
                              :body => body,
@@ -361,6 +361,12 @@ class JobCache
       nil
     end
   end
+
+  protected
+
+  def self.no_nil_values(hash)
+    hash.reject { |key, value| value.nil? }
+  end
 end
 
 class WhRunPipelineInstance

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list