commit | e430176fd0041c5b8296bf2d9bfa4b0ed131d8e8 | [log] [tgz] |
---|---|---|
author | Kevin Lubick <kjlubick@google.com> | Mon Sep 18 15:14:33 2023 -0400 |
committer | SkCQ <skcq-be@skia-corp.google.com.iam.gserviceaccount.com> | Mon Sep 18 19:36:26 2023 +0000 |
tree | 2048f40cf77e4296324e79d2d8049851b618d7e2 | |
parent | 633fee62fe8f6354c37d1f13861cb76ca0db4bbb [diff] |
Preserve log trace when there is only one error Noticed this "break of stacktrace" when diagnosing an issue today. Change-Id: I5e9c200b6cc25c6ef4e25cfd8bc9f746ff6df89d Reviewed-on: https://skia-review.googlesource.com/c/buildbot/+/757317 Reviewed-by: Eric Boren <borenet@google.com> Auto-Submit: Kevin Lubick <kjlubick@google.com> Commit-Queue: Kevin Lubick <kjlubick@google.com> Reviewed-by: Leandro Lovisolo <lovisolo@google.com>
diff --git a/task_scheduler/go/scheduling/task_scheduler.go b/task_scheduler/go/scheduling/task_scheduler.go index 3d7b77b..0127b90 100644 --- a/task_scheduler/go/scheduling/task_scheduler.go +++ b/task_scheduler/go/scheduling/task_scheduler.go
@@ -1437,7 +1437,9 @@ s.queue = queue s.lastScheduled = now.Now(ctx) - if len(errs) > 0 { + if len(errs) == 1 { + return skerr.Wrapf(errs[0], "Cannot schedule all tasks") + } else if len(errs) > 1 { rvErr := "Got failures: " for _, e := range errs { rvErr += fmt.Sprintf("\n%s\n", e)