add missing failStep()
If a re-run fails today, that leaf exec.Run() step will fail, and its
grandparent (representing a giant bunch of sources and a set of flags)
fails, and the whole great-grandparent task fails, but the exec.Run()'s
parent (a small batch of those sources) stays green.
Here's a before-this-CL example:
https://task-driver.skia.org/td/y2nmMwJAyuK2kmCNGtrk?ifNotFound=https%3A%2F%2Fchromium-swarm.appspot.com%2Ftask%3Fid%3D520ccdac1ff16010
Here's one where the failures propagate up right, I think:
https://task-driver.skia.org/td/Gb2Pta6M2bZAJpQYvRXO?ifNotFound=https%3A%2F%2Fchromium-swarm.appspot.com%2Ftask%3Fid%3D520cfbaeb2f06010
I don't suspect anything's wrong beyond bookkeeping.
Change-Id: Ib138f62f6663bbba1804ccafb28756f8c4c4d3ea
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/378401
Reviewed-by: Eric Boren <borenet@google.com>
diff --git a/infra/bots/task_drivers/fm_driver/fm_driver.go b/infra/bots/task_drivers/fm_driver/fm_driver.go
index 7cb50e1..053942e 100644
--- a/infra/bots/task_drivers/fm_driver/fm_driver.go
+++ b/infra/bots/task_drivers/fm_driver/fm_driver.go
@@ -279,6 +279,9 @@
defer endStep(ctx)
if failures := worker(ctx, w.Sources, w.Flags); failures > 0 {
atomic.AddInt32(w.Failures, int32(failures))
+ if !*local { // Uninteresting to see on local runs.
+ failStep(ctx, fmt.Errorf("%v reruns failed\n", failures))
+ }
}
}()
}
@@ -327,7 +330,7 @@
if *failures > 0 {
atomic.AddInt32(&totalFailures, *failures)
if !*local { // Uninteresting to see on local runs.
- failStep(ctx, fmt.Errorf("%v runs failed\n", *failures))
+ failStep(ctx, fmt.Errorf("%v total reruns failed\n", *failures))
}
}
endStep(ctx)