Closed vs49688 closed 4 years ago
If onerror == fail and the last command in a job fails, the job scheduler doesn't count it as a failure.
onerror == fail
This is a logic error in DefaultJobScheduler.java:
DefaultJobScheduler.java
if(au.getAction() == AgentUpdate.Action.Stop) { if(cr.index < maxIdx || cr.status != CommandResult.CommandResultStatus.SUCCESS) { /* A command has failed and caused the job to stop. */ ops.updateJobFinished(att, true); } else { /* We've finished successfully. */ ops.updateJobFinished(att, false); } }
There's no real way to fix this as the CommandResult structures look the same regardless of the onerror status.
CommandResult
onerror
Current workaround is to add exec /bin/true as the final command in a planfile
exec /bin/true
If
onerror == fail
and the last command in a job fails, the job scheduler doesn't count it as a failure.This is a logic error in
DefaultJobScheduler.java
: