arvados-cli 0.1.20140425100736 → 0.1.20140425125602

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 -13
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: dd834b3c9e7d5ba0a2ba08966283b70b06233756
4
- data.tar.gz: 9388473209fe3ba26a58ab7c395eb53e606dad12
3
+ metadata.gz: 6351840df801def389676433741b47fc9570487f
4
+ data.tar.gz: 52d36f4542bb029a7a976d113dc69e35d6158d2c
5
5
  SHA512:
6
- metadata.gz: 0e94a37c552c61a6945aa6399b03e8b5642679ce4f773526b0de86c2f884409499c60378af78ed7761d10a7615e7715f42abf1f7c9ac429ef60f8865f4d5c6b0
7
- data.tar.gz: a10c0b4a0b26b79692a8bb459b469f4e862e201d20686123b9cb5568d099679a8b8f119c97acf779bb091bcf82f7cbd590a3475de01640c85bf1e83dd795e652
6
+ metadata.gz: 34aea3f55d930446c5825ec5aad474690a8ebf86849a558ee62948f1428398fc9f3738c1dc91cd2c1493470d280cd6c80cf7ec052f0cf0bc8bd1923ea8d3d7ee
7
+ data.tar.gz: 6ce4b6c1c68d9feb26045f55ff461de96851c85e318d493e3d909878d8462116322a86e73694e84bfda0737d1d3b3c493b733f5a0687b9c9a2fc16d4702a1510
@@ -312,19 +312,19 @@ class JobCache
312
312
  []
313
313
  end
314
314
  end
315
- def self.create(attributes)
315
+ def self.create(job, create_params)
316
316
  @cache ||= {}
317
317
  result = $client.execute(:api_method => $arvados.jobs.create,
318
318
  :parameters => {
319
319
  :api_token => ENV['ARVADOS_API_TOKEN'],
320
- :job => attributes.to_json
321
- },
320
+ :job => job.to_json
321
+ }.merge(create_params),
322
322
  :authenticated => false)
323
323
  j = JSON.parse result.body, :symbolize_names => true
324
324
  if j.is_a? Hash and j[:uuid]
325
325
  @cache[j[:uuid]] = j
326
326
  else
327
- debuglog "create job: #{j[:errors] rescue nil} with attribute #{attributes}", 0
327
+ debuglog "create job: #{j[:errors] rescue nil} with attributes #{job}", 0
328
328
  nil
329
329
  end
330
330
  end
@@ -437,15 +437,27 @@ class WhRunPipelineInstance
437
437
  # No job yet associated with this component and is component inputs
438
438
  # are fully specified (any output_of script_parameters are resolved
439
439
  # to real value)
440
- job = JobCache.create({:script => c[:script],
441
- :script_parameters => c[:script_parameters],
442
- :script_version => c[:script_version],
443
- :repository => c[:repository],
444
- :minimum_script_version => c[:minimum_script_version],
445
- :exclude_script_versions => c[:exclude_minimum_script_versions],
446
- :nondeterministic => c[:nondeterministic],
447
- :no_reuse => @options[:no_reuse],
448
- :output_is_persistent => c[:output_is_persistent] || false})
440
+ job = JobCache.create {
441
+ :script => c[:script],
442
+ :script_parameters => c[:script_parameters],
443
+ :script_version => c[:script_version],
444
+ :repository => c[:repository],
445
+ :nondeterministic => c[:nondeterministic],
446
+ :output_is_persistent => c[:output_is_persistent] || false,
447
+ # TODO: Delete the following three attributes when
448
+ # supporting pre-20140418 API servers is no longer
449
+ # important. New API servers take these as flags that
450
+ # control behavior of create, rather than job attributes.
451
+ :minimum_script_version => c[:minimum_script_version],
452
+ :exclude_script_versions => c[:exclude_minimum_script_versions],
453
+ :no_reuse => @options[:no_reuse] || c[:nondeterministic],
454
+ }, {
455
+ # This is the right place to put these attributes when
456
+ # dealing with new API servers.
457
+ :minimum_script_version => c[:minimum_script_version],
458
+ :exclude_script_versions => c[:exclude_minimum_script_versions],
459
+ :find_or_create => !(@options[:no_reuse] || c[:nondeterministic]),
460
+ }
449
461
  if job
450
462
  debuglog "component #{cname} new job #{job[:uuid]}"
451
463
  c[:job] = job
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.20140425100736
4
+ version: 0.1.20140425125602
5
5
  platform: ruby
6
6
  authors:
7
7
  - Arvados Authors
@@ -146,7 +146,7 @@ dependencies:
146
146
  - - ~>
147
147
  - !ruby/object:Gem::Version
148
148
  version: '0.8'
149
- description: This is the Arvados SDK CLI gem, git revision d61f56590d4c1bc2c965b640698217a5d4af1d8c
149
+ description: This is the Arvados SDK CLI gem, git revision 6d2128ae15825ef03472897e09710b176e3cc1d9
150
150
  email: gem-dev@curoverse.com
151
151
  executables:
152
152
  - arv