[ARVADOS] created: 2fc8f46b831dab10200eadfc67ccdfd99e0dbc92

git at public.curoverse.com git at public.curoverse.com
Sat Dec 20 12:49:38 EST 2014


        at  2fc8f46b831dab10200eadfc67ccdfd99e0dbc92 (commit)


commit 2fc8f46b831dab10200eadfc67ccdfd99e0dbc92
Author: Phil Hodgson <bitbucket at philhodgson.net>
Date:   Sat Dec 20 18:49:26 2014 +0100

    4232: bonus fix of missing word in template

diff --git a/apps/workbench/app/views/application/_title_and_buttons.html.erb b/apps/workbench/app/views/application/_title_and_buttons.html.erb
index 4a40510..887529b 100644
--- a/apps/workbench/app/views/application/_title_and_buttons.html.erb
+++ b/apps/workbench/app/views/application/_title_and_buttons.html.erb
@@ -27,7 +27,7 @@
              success: 'redirect-to-created-object'
            }.to_json),
           { class: "btn btn-sm btn-primary", remote: true, method: 'get',
-            title: "Make a copy this #{object_class}" }) do %>
+            title: "Make a copy of this #{object_class}" }) do %>
         <i class="fa fa-fw fa-copy"></i> Copy to project...
       <% end %>
     <% end %>

commit fce35aa6114a89ee54da6b913926215194a96926
Author: Phil Hodgson <bitbucket at philhodgson.net>
Date:   Sat Dec 20 18:48:59 2014 +0100

    4232: theoretical fix of slow API response when getting pipeline and job contents of a project

diff --git a/services/api/app/models/job.rb b/services/api/app/models/job.rb
index 0444528..ec5f7dd 100644
--- a/services/api/app/models/job.rb
+++ b/services/api/app/models/job.rb
@@ -43,7 +43,7 @@ class Job < ArvadosModel
     t.add :log
     t.add :runtime_constraints
     t.add :tasks_summary
-    t.add :dependencies
+#    t.add :dependencies
     t.add :nondeterministic
     t.add :repository
     t.add :supplied_script_version
@@ -194,23 +194,23 @@ class Job < ArvadosModel
     end
   end
 
-  def dependencies
-    deps = {}
-    queue = self.script_parameters.values
-    while not queue.empty?
-      queue = queue.flatten.compact.collect do |v|
-        if v.is_a? Hash
-          v.values
-        elsif v.is_a? String
-          v.match(/^(([0-9a-f]{32})\b(\+[^,]+)?,?)*$/) do |locator|
-            deps[locator.to_s] = true
-          end
-          nil
-        end
-      end
-    end
-    deps.keys
-  end
+  # def dependencies
+  #   deps = {}
+  #   queue = self.script_parameters.values
+  #   while not queue.empty?
+  #     queue = queue.flatten.compact.collect do |v|
+  #       if v.is_a? Hash
+  #         v.values
+  #       elsif v.is_a? String
+  #         v.match(/^(([0-9a-f]{32})\b(\+[^,]+)?,?)*$/) do |locator|
+  #           deps[locator.to_s] = true
+  #         end
+  #         nil
+  #       end
+  #     end
+  #   end
+  #   deps.keys
+  # end
 
   def permission_to_update
     if is_locked_by_uuid_was and !(current_user and
diff --git a/services/api/app/models/pipeline_instance.rb b/services/api/app/models/pipeline_instance.rb
index 28345d5..86bd9c9 100644
--- a/services/api/app/models/pipeline_instance.rb
+++ b/services/api/app/models/pipeline_instance.rb
@@ -15,10 +15,10 @@ class PipelineInstance < ArvadosModel
 
   api_accessible :user, extend: :common do |t|
     t.add :pipeline_template_uuid
-    t.add :pipeline_template, :if => :pipeline_template
+    # t.add :pipeline_template, :if => :pipeline_template
     t.add :name
     t.add :components
-    t.add :dependencies
+    # t.add :dependencies
     t.add :properties
     t.add :state
     t.add :components_summary
@@ -39,9 +39,9 @@ class PipelineInstance < ArvadosModel
      (Complete = 'Complete'),
     ]
 
-  def dependencies
-    dependency_search(self.components).keys
-  end
+  # def dependencies
+  #   dependency_search(self.components).keys
+  # end
 
   # if all components have input, the pipeline is Ready
   def components_look_ready?

commit a01fda456b81fcc70e857da201410936ed5c3044
Author: Phil Hodgson <bitbucket at philhodgson.net>
Date:   Sat Dec 20 18:48:12 2014 +0100

    4232: attempts to optimize what appears to be the largest Workbench slowdown when showing a lot of pipelines with a lot of jobs
    (calling #where was not taking advantage of the caching done by #find)

diff --git a/apps/workbench/app/helpers/pipeline_instances_helper.rb b/apps/workbench/app/helpers/pipeline_instances_helper.rb
index b0d5216..238082a 100644
--- a/apps/workbench/app/helpers/pipeline_instances_helper.rb
+++ b/apps/workbench/app/helpers/pipeline_instances_helper.rb
@@ -89,9 +89,9 @@ module PipelineInstancesHelper
       c[:job][:uuid] if c.is_a?(Hash) and c[:job].is_a?(Hash)
     }.compact
     job = {}
-    Job.where(uuid: jobuuids).each do |j|
-      job[j[:uuid]] = j
-    end
+    jobuuids.each do |jobuuid|
+      job[jobuuid] = Job.find?(jobuuid)
+    end.compact
 
     object.components.each do |cname, c|
       i += 1

commit a1d70a2116673ac46f4946115bdb5048137689a2
Author: Phil Hodgson <bitbucket at philhodgson.net>
Date:   Sat Dec 20 18:46:51 2014 +0100

    4232: fixes error displaying queue time
    (created_at comes out in iso8601 format and must be parsed as such)

diff --git a/apps/workbench/app/views/pipeline_instances/_running_component.html.erb b/apps/workbench/app/views/pipeline_instances/_running_component.html.erb
index c916ee9..dc9f00d 100644
--- a/apps/workbench/app/views/pipeline_instances/_running_component.html.erb
+++ b/apps/workbench/app/views/pipeline_instances/_running_component.html.erb
@@ -39,7 +39,7 @@
           <% if current_job[:state] == "Queued" %>
             <%# column offset 5 %>
             <div class="col-md-6">
-              <% queuetime = Time.now - current_job[:created_at] %>
+              <% queuetime = Time.now - Time.iso8601(current_job[:created_at]) %>
               Queued for <%= render_runtime(queuetime, true) %>.
               <% begin %>
                 <% if current_job[:queue_position] == 0 %>

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list