[ARVADOS] updated: a3d3ebb9e31e2937e918087e991ee4786e1d91fa
git at public.curoverse.com
git at public.curoverse.com
Thu Sep 4 11:39:31 EDT 2014
Summary of changes:
sdk/cli/bin/crunch-job | 22 +++++++++++++++++-----
1 file changed, 17 insertions(+), 5 deletions(-)
via a3d3ebb9e31e2937e918087e991ee4786e1d91fa (commit)
from b1670d8bb221c397f443a508e083b6948a9dcc5b (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 a3d3ebb9e31e2937e918087e991ee4786e1d91fa
Author: Brett Smith <brett at curoverse.com>
Date: Thu Sep 4 11:41:05 2014 -0400
3720: Fixup crunch-job to do its own manifest parsing.
diff --git a/sdk/cli/bin/crunch-job b/sdk/cli/bin/crunch-job
index 0d31afc..d875457 100755
--- a/sdk/cli/bin/crunch-job
+++ b/sdk/cli/bin/crunch-job
@@ -1461,14 +1461,26 @@ sub find_docker_image {
# If so, return its stream name and Docker hash.
# If not, return undef for both values.
my $locator = shift;
+ my ($streamname, $filename);
if (my $image = $arv->{collections}->{get}->execute(uuid => $locator)) {
- my @file_list = @{$image->{files}};
- if ((scalar(@file_list) == 1) &&
- ($file_list[0][1] =~ /^([0-9A-Fa-f]{64})\.tar$/)) {
- return ($file_list[0][0], $1);
+ foreach my $line (split(/\n/, $image->{manifest_text})) {
+ my @tokens = split(/\s+/, $line);
+ next if (!@tokens);
+ $streamname = shift(@tokens);
+ foreach my $filedata (grep(/^\d+:\d+:/, @tokens)) {
+ if (defined($filename)) {
+ return (undef, undef); # More than one file in the Collection.
+ } else {
+ $filename = (split(/:/, $filedata, 3))[2];
+ }
+ }
}
}
- return (undef, undef);
+ if (defined($filename) and ($filename =~ /^([0-9A-Fa-f]{64})\.tar$/)) {
+ return ($streamname, $1);
+ } else {
+ return (undef, undef);
+ }
}
__DATA__
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list