[ARVADOS] updated: f526141fa776df068d011093ccb89f31f52e69be

Git user git at public.curoverse.com
Tue Jun 7 11:45:57 EDT 2016


Summary of changes:
 .../app/controllers/application_controller.rb        |  4 ++--
 .../app/views/projects/_compute_node_status.html.erb | 17 ++++++-----------
 .../app/views/projects/_show_dashboard.html.erb      |  6 +++---
 apps/workbench/test/unit/work_unit_test.rb           |  2 +-
 services/api/test/fixtures/container_requests.yml    | 20 ++++++++++++++++----
 services/api/test/fixtures/containers.yml            | 16 ++++++++++++++++
 6 files changed, 44 insertions(+), 21 deletions(-)

       via  f526141fa776df068d011093ccb89f31f52e69be (commit)
      from  e02bf11203b85a6baac31584b9ba451c92be21b3 (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 f526141fa776df068d011093ccb89f31f52e69be
Author: radhika <radhika at curoverse.com>
Date:   Tue Jun 7 11:43:00 2016 -0400

    9318: running and finished containers and fixtures updated.

diff --git a/apps/workbench/app/controllers/application_controller.rb b/apps/workbench/app/controllers/application_controller.rb
index 63c75bc..7ab2403 100644
--- a/apps/workbench/app/controllers/application_controller.rb
+++ b/apps/workbench/app/controllers/application_controller.rb
@@ -834,7 +834,7 @@ class ApplicationController < ActionController::Base
 
     pipelines = PipelineInstance.limit(lim).order(["started_at desc", "created_at desc"]).filter([["state", "in", ["RunningOnServer", "RunningOnClient"]]])
 
-    crs = ContainerRequest.order(["modified_at desc"]).filter([["requesting_container_uuid", "!=", nil], ["state", "=", "Committed"]])
+    crs = ContainerRequest.order(["modified_at desc"]).filter([["requesting_container_uuid", "=", nil], ["state", "=", "Committed"]])
     cr_uuids = crs.results.collect { |c| c.container_uuid }
     containers = Container.limit(lim).order(["started_at desc", "created_at desc"]).filter([["uuid", "in", cr_uuids], ["state", "=", "Running"]]).results if cr_uuids.any?
 
@@ -856,7 +856,7 @@ class ApplicationController < ActionController::Base
 
     pipelines = PipelineInstance.limit(lim).order(["finished_at desc"]).filter([["state", "in", ["Complete", "Failed", "Paused"]], ["finished_at", "!=", nil]])
 
-    crs = ContainerRequest.order(["modified_at desc"]).filter([["requesting_container_uuid", "!=", nil], ["state", "=", "Final"]])
+    crs = ContainerRequest.order(["modified_at desc"]).filter([["requesting_container_uuid", "=", nil], ["state", "=", "Final"]])
     cr_uuids = crs.results.collect { |c| c.container_uuid }
     containers = Container.limit(lim).order(["finished_at desc"]).filter([["uuid", "in", cr_uuids], ["state", "in", ["Complete", "Canceled"]], ["finished_at", "!=", nil]]).results if cr_uuids.any?
 
diff --git a/apps/workbench/app/views/projects/_compute_node_status.html.erb b/apps/workbench/app/views/projects/_compute_node_status.html.erb
index 8fb0b14..b7b791b 100644
--- a/apps/workbench/app/views/projects/_compute_node_status.html.erb
+++ b/apps/workbench/app/views/projects/_compute_node_status.html.erb
@@ -2,20 +2,20 @@
 <% queue = queued_processes %>
 <% if queue.any? %>
 
-<% queue.each do |p| %>
-  <% wu = p.work_unit %>
+<% queue.each do |q| %>
+  <% wu = q.work_unit %>
   <div class="row">
     <div class="col-md-3 text-overflow-ellipsis">
-      <%= link_to_if_arvados_object p, friendly_name: true %>
+      <%= link_to_if_arvados_object q, friendly_name: true %>
     </div>
     <div class="col-md-4">
-      <%= render_localized_date(p.created_at) %>
+      <%= render_localized_date(wu.created_at) %>
     </div>
     <div class="col-md-3">
-      <%= render_runtime(Time.now - p.created_at, false) %>
+      <%= render_runtime(Time.now - wu.created_at, false) %>
     </div>
     <div class="col-md-2">
-      <%= p.priority %>
+      <%= wu.priority %>
     </div>
   </div>
 <% end %>
@@ -33,11 +33,6 @@
       <b>Priority</b>
     </div>
   </div>
-  <% if Job.queue_size > queue.size %>
-    <i>Note: some items in the queue are not visible to you.</i>
-  <% end %>
-  <div>
-  </div>
 <% else %>
   There are currently no processes in your queue.
 <% end %>
diff --git a/apps/workbench/app/views/projects/_show_dashboard.html.erb b/apps/workbench/app/views/projects/_show_dashboard.html.erb
index f813258..80e8e23 100644
--- a/apps/workbench/app/views/projects/_show_dashboard.html.erb
+++ b/apps/workbench/app/views/projects/_show_dashboard.html.erb
@@ -38,9 +38,9 @@
 
               <%
                 children = wu.children
-                running = children.select { |c| c.andand.state_label == "Running" }
-                queued = children.select { |c| c.andand.state_label == "Queued" }
-                %>
+                running = children.select { |c| c.state_label == "Running" }
+                queued = children.select { |c| c.state_label == "Queued" }
+              %>
 
               <div class="clearfix">
                 Started at <%= render_localized_date(wu.started_at || wu.created_at, "noseconds") %>.
diff --git a/apps/workbench/test/unit/work_unit_test.rb b/apps/workbench/test/unit/work_unit_test.rb
index cc3334d..db38b8e 100644
--- a/apps/workbench/test/unit/work_unit_test.rb
+++ b/apps/workbench/test/unit/work_unit_test.rb
@@ -10,7 +10,7 @@ class WorkUnitTest < ActiveSupport::TestCase
     [PipelineInstance, 'pipeline_in_running_state', nil, 1, "Running", nil, 0.0],
     [PipelineInstance, 'has_component_with_completed_jobs', nil, 3, "Complete", true, 1.0],
     [PipelineInstance, 'pipeline_with_tagged_collection_input', "pwu", 1, "Ready", nil, 0.0],
-    [Container, 'requester', 'cwu', 5, "Complete", true, 1.0],
+    [Container, 'requester', 'cwu', 1, "Complete", true, 1.0],
   ].each do |type, fixture, label, num_children, state, success, progress|
     test "children of #{fixture}" do
       use_token 'active'
diff --git a/services/api/test/fixtures/container_requests.yml b/services/api/test/fixtures/container_requests.yml
index 87c712e..371db4a 100644
--- a/services/api/test/fixtures/container_requests.yml
+++ b/services/api/test/fixtures/container_requests.yml
@@ -13,7 +13,6 @@ queued:
   output_path: test
   command: ["echo", "hello"]
   container_uuid: zzzzz-dz642-queuedcontainer
-  requesting_container_uuid: zzzzz-dz642-requestingcntnr
 
 running:
   uuid: zzzzz-xvhdp-cr4runningcntnr
@@ -30,7 +29,6 @@ running:
   output_path: test
   command: ["echo", "hello"]
   container_uuid: zzzzz-dz642-runningcontainr
-  requesting_container_uuid: zzzzz-dz642-requestingcntnr
 
 running-older:
   uuid: zzzzz-xvhdp-cr4runningcntn2
@@ -47,7 +45,6 @@ running-older:
   output_path: test
   command: ["echo", "hello"]
   container_uuid: zzzzz-dz642-runningcontain2
-  requesting_container_uuid: zzzzz-dz642-requestingcntnr
 
 completed:
   uuid: zzzzz-xvhdp-cr4completedctr
@@ -64,7 +61,6 @@ completed:
   output_path: test
   command: ["echo", "hello"]
   container_uuid: zzzzz-dz642-compltcontainer
-  requesting_container_uuid: zzzzz-dz642-requestingcntnr
 
 completed-older:
   uuid: zzzzz-xvhdp-cr4completedcr2
@@ -81,4 +77,20 @@ completed-older:
   output_path: test
   command: ["echo", "hello"]
   container_uuid: zzzzz-dz642-compltcontainr2
+
+cr_for_requester:
+  uuid: zzzzz-xvhdp-cr4requestercnt
+  owner_uuid: zzzzz-tpzed-xurymjxw79nv3jz
+  name: requester_cr
+  state: Final
+  priority: 1
+  created_at: 2016-01-11 11:11:11.111111111 Z
+  updated_at: 2016-01-11 11:11:11.111111111 Z
+  modified_at: 2016-01-11 11:11:11.111111111 Z
+  modified_by_user_uuid: zzzzz-tpzed-xurymjxw79nv3jz
+  container_image: test
+  cwd: test
+  output_path: test
+  command: ["echo", "hello"]
+  container_uuid: zzzzz-dz642-requestercntnr1
   requesting_container_uuid: zzzzz-dz642-requestingcntnr
diff --git a/services/api/test/fixtures/containers.yml b/services/api/test/fixtures/containers.yml
index 5f358b7..b354993 100644
--- a/services/api/test/fixtures/containers.yml
+++ b/services/api/test/fixtures/containers.yml
@@ -115,3 +115,19 @@ requester:
   runtime_constraints:
     ram: 12000000000
     vcpus: 4
+
+requester_container:
+  uuid: zzzzz-dz642-requestercntnr1
+  owner_uuid: zzzzz-tpzed-xurymjxw79nv3jz
+  state: Complete
+  priority: 1
+  created_at: 2016-01-11 11:11:11.111111111 Z
+  updated_at: 2016-01-11 11:11:11.111111111 Z
+  container_image: test
+  cwd: test
+  output: test
+  output_path: test
+  command: ["echo", "hello"]
+  runtime_constraints:
+    ram: 12000000000
+    vcpus: 4

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list