[ARVADOS] updated: 8d6efcbfb559e377a8f21873b736390035bc44ed
git at public.curoverse.com
git at public.curoverse.com
Sat Apr 19 22:53:38 EDT 2014
Summary of changes:
services/api/app/models/job.rb | 2 +-
services/api/test/fixtures/jobs.yml | 21 +++++++++++++++++++-
.../functional/arvados/v1/jobs_controller_test.rb | 15 ++++++++++++++
3 files changed, 36 insertions(+), 2 deletions(-)
via 8d6efcbfb559e377a8f21873b736390035bc44ed (commit)
from 309e25a64fe994867db8459543af372f850e25b9 (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 8d6efcbfb559e377a8f21873b736390035bc44ed
Author: Tom Clegg <tom at curoverse.com>
Date: Sat Apr 19 22:50:54 2014 -0400
Permit a job to update its output and log attributes even if those
collections have not yet been registered with apiserver.
diff --git a/services/api/app/models/job.rb b/services/api/app/models/job.rb
index 0b2247b..61aa7dc 100644
--- a/services/api/app/models/job.rb
+++ b/services/api/app/models/job.rb
@@ -71,7 +71,7 @@ class Job < ArvadosModel
end
def skip_uuid_read_permission_check
- super + %w(cancelled_by_client_uuid)
+ super + %w(cancelled_by_client_uuid output log)
end
def ensure_script_version_is_commit
diff --git a/services/api/test/fixtures/jobs.yml b/services/api/test/fixtures/jobs.yml
index 81e8cb3..4279828 100644
--- a/services/api/test/fixtures/jobs.yml
+++ b/services/api/test/fixtures/jobs.yml
@@ -145,4 +145,23 @@ nondeterminisic_job_run:
input: fa7aeb5140e2848d39b416daeef4ffc5+45
an_integer: "1"
success: true
- nondeterministic: true
\ No newline at end of file
+ nondeterministic: true
+
+nearly_finished_job:
+ uuid: zzzzz-8i9sb-2gx6rz0pjl033w3
+ owner_uuid: zzzzz-tpzed-xurymjxw79nv3jz
+ repository: arvados
+ script: doesnotexist
+ script_version: 309e25a64fe994867db8459543af372f850e25b9
+ script_parameters:
+ input: b519d9cb706a29fc7ea24dbea2f05851+249025
+ started_at: <%= 3.minute.ago.to_s(:db) %>
+ finished_at: ~
+ running: true
+ success: ~
+ tasks_summary:
+ failed: 0
+ todo: 0
+ running: 1
+ done: 0
+ runtime_constraints: {}
diff --git a/services/api/test/functional/arvados/v1/jobs_controller_test.rb b/services/api/test/functional/arvados/v1/jobs_controller_test.rb
index 9904c83..398c867 100644
--- a/services/api/test/functional/arvados/v1/jobs_controller_test.rb
+++ b/services/api/test/functional/arvados/v1/jobs_controller_test.rb
@@ -235,5 +235,20 @@ class Arvados::V1::JobsControllerTest < ActionController::TestCase
assert_response 422
end
+ test "finish a job" do
+ authorize_with :active
+ put :update, {
+ id: jobs(:nearly_finished_job).uuid,
+ job: {
+ output_uuid: '551392cc37a317abf865b95f66f4ef94+101',
+ log: '9215de2a951a721f5f156bc08cf63ad7+93',
+ tasks_summary: {done: 1, running: 0, todo: 0, failed: 0},
+ success: true,
+ running: false,
+ finished_at: Time.now.to_s
+ }
+ }
+ assert_response :success
+ end
end
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list