Skip to content

Commit

Permalink
Dynamatrix, buildMatrixCellCI: classsify shell/make errors from build…
Browse files Browse the repository at this point in the history
… log in buildMatrixCellCI() now, and pass tags to Dynamatrix to decide on a verdict without drilling into such details

Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
  • Loading branch information
jimklimov committed Jul 23, 2024
1 parent 062bafe commit 7b3010a
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 1 deletion.
13 changes: 13 additions & 0 deletions src/org/nut/dynamatrix/Dynamatrix.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -2349,6 +2349,17 @@ def parallelStages = prepareDynamatrix(
dsbc.dsbcResultInterim = 'AGENT_DISCONNECTED'
break

case [~/.*buildMatrixCell: workspace problem.*/, ~/.*buildMatrixCell: memory problem.*/] :
dsbc.thisDynamatrix?.countStagesIncrement('AGENT_DISCONNECTED', stageName + sbName)
dsbc.dsbcResultInterim = 'AGENT_DISCONNECTED'
break

case ~/.*buildMatrixCell: scripting problem.*/ :
dsbc.thisDynamatrix?.countStagesIncrement('FAILURE', stageName + sbName)
dsbc.dsbcResultInterim = 'FAILURE'
break

// legacy fallback
case ~/.*(missing workspace|object directory .* does not exist|check .git\/objects\/info\/alternates|Resource temporarily unavailable).*/ :
// For now treat these SCM or workspace
// instantiation issues similar to
Expand All @@ -2357,13 +2368,15 @@ def parallelStages = prepareDynamatrix(
dsbc.dsbcResultInterim = 'AGENT_DISCONNECTED'
break

// legacy fallback
case ~/.*Error (fetching|cloning) remote repo.*/ :
// For now treat these SCM issues similar to
// networking faults - something to retry:
dsbc.thisDynamatrix?.countStagesIncrement('AGENT_DISCONNECTED', stageName + sbName)
dsbc.dsbcResultInterim = 'AGENT_DISCONNECTED'
break

// legacy fallback
case ~/.*bin\/\\S+: cannot open : No such file or directory.*/ :
// in practice FreeBSD agent tends to do this
// (with various programs, often `/bin/sh`)
Expand Down
17 changes: 16 additions & 1 deletion vars/buildMatrixCellCI.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -674,12 +674,27 @@ done
case [
~/.*(missing workspace|object directory .* does not exist|check .git\/objects\/info\/alternates).*/,
~/.*Error (fetching|cloning) remote repo.*/,
]:
if (!(msgFail.isEmpty()))
msgFail += "\n"
msgFail += "buildMatrixCell: workspace problem: " + contentLine
break

case [
~/.*Resource temporarily unavailable.*/,
]:
if (!(msgFail.isEmpty()))
msgFail += "\n"
msgFail += "buildMatrixCell: memory problem: " + contentLine
break

case [
// Make substitutions of progs/files ended up as empty strings?
~/.*bin\/\\S+: cannot open : No such file or directory.*/,
]:
if (!(msgFail.isEmpty()))
msgFail += "\n"
msgFail += contentLine
msgFail += "buildMatrixCell: scripting problem: " + contentLine
break
}
}
Expand Down

0 comments on commit 7b3010a

Please sign in to comment.