Clear a step's success only when it was started and failed, and say updated when it passes again (novox/hq issue 467)
A bundle that could not be fetched refused nothing; clearing for it would rerun every step on a node once the artifact store came back from an outage.
This commit is contained in:
@@ -172,10 +172,12 @@ func applyProcess(ctx context.Context, r *declaration.Process, run Runner,
|
||||
return out, err
|
||||
}
|
||||
if _, err := run(ctx, "systemctl", "start", r.Name+".service"); err != nil {
|
||||
out.refused = true // started and did not complete: run again until it does (novox/hq issue 467)
|
||||
return out, fmt.Errorf("the %s step did not complete (journalctl -u %s.service says why): %w", r.Name, r.Name, err)
|
||||
}
|
||||
// Updated whenever it has a record, whose Wrote a failed run cleared (novox/hq issue 467).
|
||||
out.Action = "created"
|
||||
if previous.Wrote != "" {
|
||||
if previous.Wrote != "" || previous.ID != "" {
|
||||
out.Action = "updated"
|
||||
}
|
||||
out.Detail = fmt.Sprintf("%d file(s), step completed", written)
|
||||
|
||||
Reference in New Issue
Block a user