arvados-cli 0.1.20140826202602 → 0.1.20140827170424
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/arv-run-pipeline-instance +27 -31
- data/bin/crunch-job +2 -24
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 90cc9aaaf46a6cf3ec9bf6061312ccdceb0f48bf
|
4
|
+
data.tar.gz: 8f9cbaf8c21301b8e1d3a9caf7937447bc64b757
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 858b280278788af73c75afd2b67a3b16ccc76d461c116e7884736b008ae8f734df529286e8fc273a248a3ca1e7af77ddd627d090d19f42de4a2492bae104a990
|
7
|
+
data.tar.gz: 3ad8893233125003588dc393245703b76debe28b79a6fd73faaf4c094625ecf5c174c6de253a23ea64bb6178e70ef4d9656e9fc85d1676a6ca8b05ea007af1df
|
@@ -518,7 +518,6 @@ class WhRunPipelineInstance
|
|
518
518
|
:script_version => c[:script_version],
|
519
519
|
:repository => c[:repository],
|
520
520
|
:nondeterministic => c[:nondeterministic],
|
521
|
-
:output_is_persistent => c[:output_is_persistent] || false,
|
522
521
|
:runtime_constraints => c[:runtime_constraints],
|
523
522
|
:owner_uuid => owner_uuid,
|
524
523
|
}, {
|
@@ -562,37 +561,34 @@ class WhRunPipelineInstance
|
|
562
561
|
# This is my first time discovering that the job
|
563
562
|
# succeeded. (At the top of this loop, I was still
|
564
563
|
# waiting for it to finish.)
|
565
|
-
|
566
|
-
|
567
|
-
|
568
|
-
|
569
|
-
|
570
|
-
|
571
|
-
|
572
|
-
|
573
|
-
|
574
|
-
|
575
|
-
|
576
|
-
|
577
|
-
|
578
|
-
|
579
|
-
|
580
|
-
|
581
|
-
|
582
|
-
|
583
|
-
|
584
|
-
|
585
|
-
|
586
|
-
|
587
|
-
link_class: 'resources',
|
588
|
-
name: 'wants',
|
589
|
-
tail_kind: 'arvados#user',
|
590
|
-
tail_uuid: @my_user_uuid,
|
591
|
-
head_kind: 'arvados#collection',
|
592
|
-
head_uuid: wanted,
|
593
|
-
owner_uuid: owner_uuid
|
564
|
+
|
565
|
+
debuglog "names: #{@instance[:name]} #{@template[:name]}", 0
|
566
|
+
if (not @instance[:name].nil?) and (not @instance[:name].empty?)
|
567
|
+
pipeline_name = @instance[:name]
|
568
|
+
else
|
569
|
+
fetch_template(@instance[:pipeline_template_uuid])
|
570
|
+
pipeline_name = @template[:name]
|
571
|
+
end
|
572
|
+
if c[:output_name] != false
|
573
|
+
output_name = c[:output_name] || "Output of #{cname} of #{pipeline_name}"
|
574
|
+
# Create a collection located in the same project as the pipeline with the contents of the output.
|
575
|
+
portable_data_hash = c[:job][:output]
|
576
|
+
collections = $arv.collection.list(limit: 1,
|
577
|
+
filters: [['portable_data_hash', '=', portable_data_hash]],
|
578
|
+
select: ["portable_data_hash", "manifest_text"]
|
579
|
+
)[:items]
|
580
|
+
if collections.any?
|
581
|
+
newcollection = {
|
582
|
+
owner_uuid: owner_uuid,
|
583
|
+
name: "#{output_name} at #{c[:job][:finished_at]}",
|
584
|
+
portable_data_hash: collections.first[:portable_data_hash],
|
585
|
+
manifest_text: collections.first[:manifest_text]
|
594
586
|
}
|
595
|
-
debuglog "
|
587
|
+
debuglog "Creating collection #{newcollection}", 0
|
588
|
+
newcollection_actual = $arv.collection.create collection: newcollection
|
589
|
+
c[:output_uuid] = newcollection_actual[:uuid]
|
590
|
+
else
|
591
|
+
debuglog "Could not find a collection with portable data hash #{portable_data_hash}", 0
|
596
592
|
end
|
597
593
|
end
|
598
594
|
end
|
data/bin/crunch-job
CHANGED
@@ -853,37 +853,15 @@ else {
|
|
853
853
|
eval {
|
854
854
|
open(my $orig_manifest, '-|', 'arv-get', $collated_output)
|
855
855
|
or die "failed to get collated manifest: $!";
|
856
|
-
# Read the original manifest, and strip permission hints from it,
|
857
|
-
# so we can put the result in a Collection.
|
858
|
-
my @stripped_manifest_lines = ();
|
859
856
|
my $orig_manifest_text = '';
|
860
857
|
while (my $manifest_line = <$orig_manifest>) {
|
861
858
|
$orig_manifest_text .= $manifest_line;
|
862
|
-
my @words = split(/ /, $manifest_line, -1);
|
863
|
-
foreach my $ii (0..$#words) {
|
864
|
-
if ($words[$ii] =~ /^[0-9a-f]{32}\+/) {
|
865
|
-
$words[$ii] =~ s/\+A[0-9a-f]{40}@[0-9a-f]{8}\b//;
|
866
|
-
}
|
867
|
-
}
|
868
|
-
push(@stripped_manifest_lines, join(" ", @words));
|
869
859
|
}
|
870
|
-
my $stripped_manifest_text = join("", @stripped_manifest_lines);
|
871
860
|
my $output = $arv->{'collections'}->{'create'}->execute('collection' => {
|
872
|
-
'uuid' => md5_hex($stripped_manifest_text),
|
873
861
|
'manifest_text' => $orig_manifest_text,
|
874
862
|
});
|
875
|
-
Log(undef, "output " . $output->{
|
876
|
-
$Job->update_attributes('output' => $output->{
|
877
|
-
if ($Job->{'output_is_persistent'}) {
|
878
|
-
$arv->{'links'}->{'create'}->execute('link' => {
|
879
|
-
'tail_kind' => 'arvados#user',
|
880
|
-
'tail_uuid' => $User->{'uuid'},
|
881
|
-
'head_kind' => 'arvados#collection',
|
882
|
-
'head_uuid' => $Job->{'output'},
|
883
|
-
'link_class' => 'resources',
|
884
|
-
'name' => 'wants',
|
885
|
-
});
|
886
|
-
}
|
863
|
+
Log(undef, "output " . $output->{portable_data_hash});
|
864
|
+
$Job->update_attributes('output' => $output->{portable_data_hash}) if $job_has_uuid;
|
887
865
|
};
|
888
866
|
if ($@) {
|
889
867
|
Log (undef, "Failed to register output manifest: $@");
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: arvados-cli
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.20140827170424
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Arvados Authors
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-08-
|
11
|
+
date: 2014-08-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: arvados
|
@@ -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
|
169
|
+
description: This is the Arvados SDK CLI gem, git revision 0042e4b42d9f4d3900aefc68617cb28c5a61a522
|
170
170
|
email: gem-dev@curoverse.com
|
171
171
|
executables:
|
172
172
|
- arv
|