[ARVADOS] updated: 869f3f0ad541c85bfb72060b1018905d3f882292

git at public.curoverse.com git at public.curoverse.com
Thu Jun 4 17:10:09 EDT 2015


Summary of changes:
 sdk/cli/bin/crunch-job | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

  discards  9943f1edaafce7b82c03e4a1926a8c1f5526b03d (commit)
       via  869f3f0ad541c85bfb72060b1018905d3f882292 (commit)

This update added new revisions after undoing existing revisions.  That is
to say, the old revision is not a strict subset of the new revision.  This
situation occurs when you --force push a change and generate a repository
containing something like this:

 * -- * -- B -- O -- O -- O (9943f1edaafce7b82c03e4a1926a8c1f5526b03d)
            \
             N -- N -- N (869f3f0ad541c85bfb72060b1018905d3f882292)

When this happens we assume that you've already had alert emails for all
of the O revisions, and so we here report only the revisions in the N
branch from the common base, B.

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 869f3f0ad541c85bfb72060b1018905d3f882292
Author: Tom Clegg <tom at curoverse.com>
Date:   Thu Jun 4 17:09:59 2015 -0400

    6146: Document how --steps really works. Simplify squeue output format and parsing.

diff --git a/sdk/cli/bin/crunch-job b/sdk/cli/bin/crunch-job
index 786e18f..090cadf 100755
--- a/sdk/cli/bin/crunch-job
+++ b/sdk/cli/bin/crunch-job
@@ -1299,8 +1299,15 @@ sub check_squeue
     return;
   }
 
-  # get a list of steps still running
-  my @squeue = `squeue --jobs=\Q$ENV{SLURM_JOB_ID}\E --steps --format='%i %j' --noheader`;
+  # Get a list of steps still running.  Note: squeue(1) says --steps
+  # selects a format (which we override anyway) and allows us to
+  # specify which steps we're interested in (which we don't).
+  # Importantly, it also changes the meaning of %j from "job name" to
+  # "step name" and (although this isn't mentioned explicitly in the
+  # docs) switches from "one line per job" mode to "one line per step"
+  # mode. Without it, we'd just get a list of one job, instead of a
+  # list of N steps.
+  my @squeue = `squeue --jobs=\Q$ENV{SLURM_JOB_ID}\E --steps --format='%j' --noheader`;
   if ($? != 0)
   {
     Log(undef, "warning: squeue exit status $? ($!)");
@@ -1310,15 +1317,9 @@ sub check_squeue
 
   # which of my jobsteps are running, according to squeue?
   my %ok;
-  foreach (@squeue)
+  for my $jobstepname (@squeue)
   {
-    if (/^(\d+)\.(\d+) (\S+)/)
-    {
-      if ($1 eq $ENV{SLURM_JOB_ID})
-      {
-	$ok{$3} = 1;
-      }
-    }
+    $ok{$jobstepname} = 1;
   }
 
   # Check for child procs >60s old and not mentioned by squeue.

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list