arvados-cli 0.1.20140707150129 → 0.1.20140707162447

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/bin/arv-run-pipeline-instance +25 -10
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d86ebea33eb66b31d9afa7ae9265e33de94126bb
4
- data.tar.gz: 6cc4a3b6c21a413e7c386bb8293437fb0ae0fddf
3
+ metadata.gz: c79405a5f254faac3891203c0c77acbd58a58567
4
+ data.tar.gz: 8f8e9ae749e339a1f9997c345d0adb2f4d851448
5
5
  SHA512:
6
- metadata.gz: bce2a447f0cda210634ae16dd14b4fb0e9eeedf37192a5158f135f980493ec187c39629c5ddbf6cd52f61dc62183d6f543ceffc257e212914febaf1e4e9c18b2
7
- data.tar.gz: b0eedd88074bfc6c7dd53fedfae432364caf1214d2a34073fd52f8b1a6b97c7a2339d8be7855e0942f535cee521c202e12c31f7368db11350bd262d4d5b4d865
6
+ metadata.gz: c8a4083c47903003d0eaa0537023592f257459b7cf694b220f329ca3b72fae60d7896bdc4137558e33453bb36bc44c83757d6430705ce6ec6c080190c473cc3e
7
+ data.tar.gz: ba368e1c1a4b70187867b771886975b279039f0fb8e23f7a7fd3ea842045301c9b23d1dc1d4ad98153ac1c9b409e691a86e5924a39ab19fc5edaf931b4898ec0
@@ -322,18 +322,13 @@ class JobCache
322
322
  []
323
323
  end
324
324
  end
325
- def self.create(job, create_params)
325
+ def self.create(pipeline, component, job, create_params)
326
326
  @cache ||= {}
327
327
 
328
- jsonified_create_params = {}
329
- create_params.each do |k, v|
330
- jsonified_create_params[k] = v.to_json unless v.nil?
331
- end
328
+ body = { :job => job }.merge(create_params.select { |k,v| not v.nil? })
332
329
 
333
330
  result = $client.execute(:api_method => $arvados.jobs.create,
334
- :body => {
335
- :job => job.to_json
336
- }.merge(jsonified_create_params),
331
+ :body => body,
337
332
  :authenticated => false,
338
333
  :headers => {
339
334
  authorization: 'OAuth2 '+ENV['ARVADOS_API_TOKEN']
@@ -342,7 +337,27 @@ class JobCache
342
337
  if j.is_a? Hash and j[:uuid]
343
338
  @cache[j[:uuid]] = j
344
339
  else
345
- debuglog "create job: #{j[:errors] rescue nil} with attributes #{job}", 0
340
+ debuglog "create job: #{j[:errors] rescue nil} with attributes #{body}", 0
341
+
342
+ msg = ""
343
+ j[:errors].each do |err|
344
+ msg += "Error creating job for component #{component}: #{err}\n"
345
+ end
346
+ msg += "Job submission was: #{body.to_json}"
347
+
348
+ $client.execute(:api_method => $arvados.logs.create,
349
+ :body => {
350
+ :log => {
351
+ :object_uuid => pipeline[:uuid],
352
+ :event_type => 'stderr',
353
+ :owner_uuid => pipeline[:owner_uuid],
354
+ :properties => {"text" => msg}
355
+ }
356
+ },
357
+ :authenticated => false,
358
+ :headers => {
359
+ authorization: 'OAuth2 '+ENV['ARVADOS_API_TOKEN']
360
+ })
346
361
  nil
347
362
  end
348
363
  end
@@ -468,7 +483,7 @@ class WhRunPipelineInstance
468
483
  # No job yet associated with this component and is component inputs
469
484
  # are fully specified (any output_of script_parameters are resolved
470
485
  # to real value)
471
- job = JobCache.create({
486
+ job = JobCache.create(@instance, cname, {
472
487
  :script => c[:script],
473
488
  :script_parameters => c[:script_parameters],
474
489
  :script_version => c[:script_version],
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: arvados-cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.20140707150129
4
+ version: 0.1.20140707162447
5
5
  platform: ruby
6
6
  authors:
7
7
  - Arvados Authors
@@ -166,7 +166,7 @@ dependencies:
166
166
  - - "<"
167
167
  - !ruby/object:Gem::Version
168
168
  version: 1.0.0
169
- description: This is the Arvados SDK CLI gem, git revision 9e24edb1d9624b6aed38464c70cab5027586abbc
169
+ description: This is the Arvados SDK CLI gem, git revision ea1a5e8a4e5370dde8fc10ac3889b81053b11187
170
170
  email: gem-dev@curoverse.com
171
171
  executables:
172
172
  - arv