Console: a job is done only on the app's closing report; prove-shard.sh takes every block fixture after the first argument
The console marked any job with a RESULT line as done, so a running shard job read as finished. Done now means the SUMMARY line carries finished_at or the job's closing 'job <id>: <status> (exit N)' line is present. prove-shard.sh dropped the third fixture argument (block-344-shards4) because it read only $2. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
parent
3377ef08eb
commit
1c1dbd93d6
2 changed files with 8 additions and 3 deletions
|
|
@ -7,7 +7,7 @@
|
|||
set -uo pipefail
|
||||
HERE="$(cd "$(dirname "$0")" && pwd)"
|
||||
SHARD_FIXTURE="${1:-block-338-shard1}"
|
||||
BLOCK_FIXTURES="${2:-block-341-shards2 block-344-shards4}"
|
||||
BLOCK_FIXTURES="${*:2}"; BLOCK_FIXTURES="${BLOCK_FIXTURES:-block-341-shards2 block-344-shards4}" # every argument after the first; a quoted list works too
|
||||
export PATH="$HOME/.cargo/bin:$HOME/.sp1/bin:$PATH"
|
||||
CUDA_DIR="$(ls -d /usr/local/cuda-12.* 2>/dev/null | sort -V | tail -1 || true)"
|
||||
[ -n "$CUDA_DIR" ] && export PATH="$CUDA_DIR/bin:$PATH" && export LD_LIBRARY_PATH="$CUDA_DIR/lib64:/usr/lib/wsl/lib:${LD_LIBRARY_PATH:-}"
|
||||
|
|
|
|||
|
|
@ -220,8 +220,13 @@ async function jobs(sql) {
|
|||
const runs = rows.map(r => {
|
||||
const m = /^job-(.+)-([0-9a-f]{8,32})$/.exec(r.run_id);
|
||||
const lines = r.tail.split('\n').filter(l => l.trim());
|
||||
const ex = lastMatch(lines, /\b(?:exit(?:ed)?(?:[ _-]?code)?|EXIT|rc)\s*[=: ]\s*(-?\d+)\b/i);
|
||||
const done = !!ex || lines.some(l => /^(DONE|FINISHED|RESULT)\b/.test(l));
|
||||
// Final only when the app's closing report is in: a SUMMARY line with finished_at set, or its
|
||||
// "job <id>: done|failed|timeout|aborted (exit N)" line. RESULT lines and a stage's own "exit N" echo are progress.
|
||||
let summaryJson = null;
|
||||
for (const l of lines) { const mm = /^SUMMARY\s+(\{.*\})\s*$/.exec(l); if (mm) { try { summaryJson = JSON.parse(mm[1]); } catch {} } }
|
||||
const finalLine = lastMatch(lines, /^job \S+: (?:done|failed|timeout|aborted) \(exit (-?\d+)\)/);
|
||||
const done = !!(summaryJson && summaryJson.finished_at) || !!finalLine;
|
||||
const ex = finalLine || (summaryJson && summaryJson.finished_at ? [null, String(summaryJson.exit)] : null);
|
||||
const sum = lastMatch(lines, /^(?:RESULT|SUMMARY)[:\s](.+)$/i);
|
||||
const machineId = m ? m[2] : r.machine;
|
||||
return { run_id: r.run_id, job_id: m ? m[1] : r.run_id, machine_id: machineId, machine: NAMES[machineId.slice(0, 8)] || r.machine, host: r.machine, at: iso(r.received_at), label: r.label,
|
||||
|
|
|
|||
Loading…
Reference in a new issue