[ARVADOS] created: 0b8289d0b2aa1a951af23600a24b6cbb67512598

git at public.curoverse.com git at public.curoverse.com
Mon Jul 7 15:49:16 EDT 2014


        at  0b8289d0b2aa1a951af23600a24b6cbb67512598 (commit)


commit 0b8289d0b2aa1a951af23600a24b6cbb67512598
Author: Peter Amstutz <peter.amstutz at curoverse.com>
Date:   Mon Jul 7 15:48:12 2014 -0400

    Update package version dependencies on arvados-cli to use commit:7bd2ee2

diff --git a/services/api/Gemfile b/services/api/Gemfile
index e5235a5..605eb73 100644
--- a/services/api/Gemfile
+++ b/services/api/Gemfile
@@ -70,7 +70,7 @@ gem 'database_cleaner'
 
 gem 'themes_for_rails'
 
-gem 'arvados-cli', '>= 0.1.20140703225421'
+gem 'arvados-cli', '>= 0.1.20140707154524'
 
 # pg_power lets us use partial indexes in schema.rb in Rails 3
 gem 'pg_power'
diff --git a/services/api/Gemfile.lock b/services/api/Gemfile.lock
index ea44cc1..9453c3c 100644
--- a/services/api/Gemfile.lock
+++ b/services/api/Gemfile.lock
@@ -41,7 +41,7 @@ GEM
       google-api-client (~> 0.6.3)
       json (>= 1.7.7)
       jwt (>= 0.1.5, < 1.0.0)
-    arvados-cli (0.1.20140703225421)
+    arvados-cli (0.1.20140707154524)
       activesupport (~> 3.2, >= 3.2.13)
       andand (~> 1.3, >= 1.3.3)
       arvados (~> 0.1.0)
@@ -217,7 +217,7 @@ PLATFORMS
 DEPENDENCIES
   acts_as_api
   andand
-  arvados-cli (>= 0.1.20140703225421)
+  arvados-cli (>= 0.1.20140707154524)
   coffee-rails (~> 3.2.0)
   database_cleaner
   faye-websocket

commit 7bd2ee234481ccdb28315c4fd41b6a6bf71033f5
Author: Peter Amstutz <peter.amstutz at curoverse.com>
Date:   Mon Jul 7 15:45:24 2014 -0400

    arv-run-pipeline-instance sends error message to logs table when job submission
    fails.  Pipeline instance view in workbench now shows messages for the pipeline
    instance (in addition to the jobs) and shows messages when the pipeline is
    failed (not only when it is running.)

diff --git a/apps/workbench/app/views/pipeline_instances/_show_components.html.erb b/apps/workbench/app/views/pipeline_instances/_show_components.html.erb
index 8658219..fb15cd7 100644
--- a/apps/workbench/app/views/pipeline_instances/_show_components.html.erb
+++ b/apps/workbench/app/views/pipeline_instances/_show_components.html.erb
@@ -74,17 +74,15 @@
     </tfoot>
   </table>
 
-  <% if @object.state.in? %w(RunningOnServer RunningOnClient) %>
+  <% if @object.state.in? %w(RunningOnServer RunningOnClient Failed) %>
 
-    <% if !pipeline_job_uuids.empty? %>
-      <h4>Log messages from running jobs</h4>
-      <% log_history = pipeline_log_history(pipeline_job_uuids) %>
-      <div class="arv-log-event-listener arv-log-event-handler-append-logs arv-job-log-window" id="pipeline_event_log_div" data-object-uuids="<%=pipeline_job_uuids.join(" ")%>">
+      <h4>Log messages from jobs</h4>
+      <% log_history = pipeline_log_history((pipeline_job_uuids || []) + [@object.uuid]) %>
+      <div class="arv-log-event-listener arv-log-event-handler-append-logs arv-job-log-window" id="pipeline_event_log_div" data-object-uuids="<%= @object.uuid %> <%=(pipeline_job_uuids || []).join(" ")%>">
         <% log_history.each do |entry| %>
           <%=entry%><br/>
         <% end %>
       </div>
-    <% end %>
 
   <% end %>
 
diff --git a/sdk/cli/bin/arv-run-pipeline-instance b/sdk/cli/bin/arv-run-pipeline-instance
index 8b18d37..30db8d7 100755
--- a/sdk/cli/bin/arv-run-pipeline-instance
+++ b/sdk/cli/bin/arv-run-pipeline-instance
@@ -322,7 +322,7 @@ class JobCache
       []
     end
   end
-  def self.create(job, create_params)
+  def self.create(pipeline, component, job, create_params)
     @cache ||= {}
 
     jsonified_create_params = {}
@@ -330,10 +330,10 @@ class JobCache
       jsonified_create_params[k] = v.to_json unless v.nil?
     end
 
+    body = { :job => job }.merge(jsonified_create_params)
+
     result = $client.execute(:api_method => $arvados.jobs.create,
-                             :body => {
-                               :job => job.to_json
-                             }.merge(jsonified_create_params),
+                             :body => body,
                              :authenticated => false,
                              :headers => {
                                authorization: 'OAuth2 '+ENV['ARVADOS_API_TOKEN']
@@ -342,7 +342,27 @@ class JobCache
     if j.is_a? Hash and j[:uuid]
       @cache[j[:uuid]] = j
     else
-      debuglog "create job: #{j[:errors] rescue nil} with attributes #{job}", 0
+      debuglog "create job: #{j[:errors] rescue nil} with attributes #{body}", 0
+
+      msg = ""
+      j[:errors].each do |err|
+        msg += "Error creating job for component #{component}: #{err}\n"
+      end
+      msg += "Job submission was: #{body.to_json}"
+
+      $client.execute(:api_method => $arvados.logs.create,
+                      :body => {
+                        :log => {
+                          :object_uuid => pipeline[:uuid],
+                          :event_type => 'stderr',
+                          :owner_uuid => pipeline[:owner_uuid],
+                          :properties => {"text" => msg}
+                        }
+                      },
+                      :authenticated => false,
+                      :headers => {
+                        authorization: 'OAuth2 '+ENV['ARVADOS_API_TOKEN']
+                      })
       nil
     end
   end
@@ -468,7 +488,7 @@ class WhRunPipelineInstance
           # No job yet associated with this component and is component inputs
           # are fully specified (any output_of script_parameters are resolved
           # to real value)
-          job = JobCache.create({
+          job = JobCache.create(@instance, cname, {
             :script => c[:script],
             :script_parameters => c[:script_parameters],
             :script_version => c[:script_version],

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list