[ARVADOS] updated: 513c30b5c5c2b3dd72894667eb0e51e24c9d4182
Git user
git at public.curoverse.com
Mon May 2 17:14:15 EDT 2016
Summary of changes:
sdk/cli/bin/crunch-job | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
via 513c30b5c5c2b3dd72894667eb0e51e24c9d4182 (commit)
from 25505fc5105bc776ed2d6d898f18f91d6451088b (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 513c30b5c5c2b3dd72894667eb0e51e24c9d4182
Author: Tom Clegg <tom at curoverse.com>
Date: Mon May 2 17:13:35 2016 -0400
Use "grep -xF ... >/dev/null" instead of "grep -qxF ..."
1. -q "Exit immediately with zero status if any match is found, even if
an error was detected." --grep(1)
Depending on buffering and timing, if grep exits early (before
consuming stdin) "docker images" can receive SIGPIPE and exit
non-zero. We use "set -o pipefail" here, so this fails the "docker
load" phase and then the whole job.
2. "Portable shell scripts should avoid both -q and -s and should
redirect standard and error output to /dev/null instead." --grep(1)
No issue #
diff --git a/sdk/cli/bin/crunch-job b/sdk/cli/bin/crunch-job
index 149d20b..39238b0 100755
--- a/sdk/cli/bin/crunch-job
+++ b/sdk/cli/bin/crunch-job
@@ -416,7 +416,7 @@ if ($docker_locator = $Job->{docker_image_locator}) {
Log (undef, "docker image hash is $docker_hash");
$docker_stream =~ s/^\.//;
my $docker_install_script = qq{
-if $docker_bin images -q --no-trunc --all | grep -qxF \Q$docker_hash\E; then
+if $docker_bin images -q --no-trunc --all | grep -xF \Q$docker_hash\E >/dev/null; then
exit 0
fi
declare -a exit_codes=("\${PIPESTATUS[@]}")
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list