[ARVADOS] updated: 4393148aceab9ae37c3a3f0eabcbf5e16ceaf3a3
git at public.curoverse.com
git at public.curoverse.com
Tue Mar 3 13:22:50 EST 2015
Summary of changes:
.../pipeline_instances/_running_component.html.erb | 2 +-
.../test/integration/pipeline_instances_test.rb | 6 +++
services/api/test/fixtures/pipeline_instances.yml | 44 +++++++++++++++++++---
3 files changed, 46 insertions(+), 6 deletions(-)
via 4393148aceab9ae37c3a3f0eabcbf5e16ceaf3a3 (commit)
from ba386628f3d998cf1dc28990505b1bbac6021db7 (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 4393148aceab9ae37c3a3f0eabcbf5e16ceaf3a3
Author: Tom Clegg <tom at curoverse.com>
Date: Tue Mar 3 13:19:14 2015 -0500
5349: Add test to protect bugfix in a1d70a2116673ac46f4946115bdb5048137689a2. Fix regression.
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 f87dede..018d49f 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.parse(current_job[:created_at].to_s) %>
Queued for <%= render_runtime(queuetime, true) %>.
<% begin %>
<% if current_job[:queue_position] == 0 %>
diff --git a/apps/workbench/test/integration/pipeline_instances_test.rb b/apps/workbench/test/integration/pipeline_instances_test.rb
index eac190a..69b8849 100644
--- a/apps/workbench/test/integration/pipeline_instances_test.rb
+++ b/apps/workbench/test/integration/pipeline_instances_test.rb
@@ -490,4 +490,10 @@ class PipelineInstancesTest < ActionDispatch::IntegrationTest
end
end
end
+
+ test 'render job run time when job record is inaccessible' do
+ pi = api_fixture('pipeline_instances', 'has_component_with_completed_jobs')
+ visit page_with_token 'active', '/pipeline_instances/' + pi['uuid']
+ assert_text 'Queued for '
+ end
end
diff --git a/services/api/test/fixtures/pipeline_instances.yml b/services/api/test/fixtures/pipeline_instances.yml
index 376808b..dd1df3b 100644
--- a/services/api/test/fixtures/pipeline_instances.yml
+++ b/services/api/test/fixtures/pipeline_instances.yml
@@ -32,11 +32,13 @@ has_component_with_empty_script_parameters:
script_version: master
has_component_with_completed_jobs:
- # Test that the job "started_at" and "finished_at" fields are
- # parsed into Time fields when rendering. This job must *not*
- # have its own fixture; the point is to force the
- # pipeline_instances_controller_test in Workbench to parse
- # the "components" field.
+ # Test that the job "started_at" and "finished_at" fields are parsed
+ # into Time fields when rendering. These jobs must *not* have their
+ # own fixtures; the point is to force the
+ # pipeline_instances_controller_test in Workbench to parse the
+ # "components" field. (The relevant code paths are also used when a
+ # user has permission to read the pipeline instance itself, but not
+ # the jobs referenced by its components hash.)
state: Complete
uuid: zzzzz-d1hrv-i3e77t9z5y8j9cc
owner_uuid: zzzzz-tpzed-xurymjxw79nv3jz
@@ -48,8 +50,40 @@ has_component_with_completed_jobs:
job:
uuid: zzzzz-8i9sb-rft1xdewxkwgxnz
script_version: master
+ created_at: <%= 10.minute.ago.to_s(:db) %>
started_at: <%= 10.minute.ago.to_s(:db) %>
finished_at: <%= 9.minute.ago.to_s(:db) %>
+ state: Complete
+ tasks_summary:
+ failed: 0
+ todo: 0
+ running: 0
+ done: 1
+ bar:
+ script: bar
+ script_version: master
+ script_parameters: {}
+ job:
+ uuid: zzzzz-8i9sb-r2dtbzr6bfread7
+ script_version: master
+ created_at: <%= 9.minute.ago.to_s(:db) %>
+ started_at: <%= 9.minute.ago.to_s(:db) %>
+ state: Running
+ tasks_summary:
+ failed: 0
+ todo: 1
+ running: 2
+ done: 3
+ baz:
+ script: baz
+ script_version: master
+ script_parameters: {}
+ job:
+ uuid: zzzzz-8i9sb-c7408rni11o7r6s
+ script_version: master
+ created_at: <%= 9.minute.ago.to_s(:db) %>
+ state: Queued
+ tasks_summary: {}
has_job:
name: pipeline_with_job
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list