Skip to content

Commit

Permalink
cmd/coordinator: add blank line before SlowBot message
Browse files Browse the repository at this point in the history
Avoids a problem seen on https://golang.org/cl/269799:

Consult https://build.golang.org/ to see whether they are new failures. Keep in mind that TryBots currently test *exactly* your git commit, without rebasing. If your commit's git parent is old, the failure might've already been fixed.SlowBot builds that ran:

linux-ppc64-buildlet
linux-ppc64le-buildlet

Note that "Slowbot builds" is hidden at the end of the failure message.

Also slightly clean up the code: numFail is the length of a slice, and
can't be negative.

Change-Id: Id9c160dbb7031d75232df54b8662c94b2ce464b6
Reviewed-on: https://go-review.googlesource.com/c/build/+/269919
Trust: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
  • Loading branch information
ianlancetaylor committed Nov 13, 2020
1 parent 3a574da commit 5f1e306
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions cmd/coordinator/coordinator.go
Original file line number Diff line number Diff line change
Expand Up @@ -1519,7 +1519,7 @@ func (ts *trySet) noteBuildComplete(bs *buildStatus) {
return
}

const failureFooter = "Consult https://build.golang.org/ to see whether they are new failures. Keep in mind that TryBots currently test *exactly* your git commit, without rebasing. If your commit's git parent is old, the failure might've already been fixed."
const failureFooter = "Consult https://build.golang.org/ to see whether they are new failures. Keep in mind that TryBots currently test *exactly* your git commit, without rebasing. If your commit's git parent is old, the failure might've already been fixed.\n"

s1 := sha1.New()
io.WriteString(s1, buildLog)
Expand Down Expand Up @@ -1569,14 +1569,15 @@ func (ts *trySet) noteBuildComplete(bs *buildStatus) {
if numFail == 0 {
score = 1
fmt.Fprintf(&buf, "%s are happy.\n", name)
} else if numFail > 0 {
} else {
score = -1
ts.mu.Lock()
errMsg := ts.errMsg.String()
ts.mu.Unlock()
fmt.Fprintf(&buf, "%d of %d %s failed:\n%s\n"+failureFooter,
numFail, len(ts.builds), name, errMsg)
}
fmt.Fprintln(&buf)
if len(ts.slowBots) > 0 {
fmt.Fprintf(&buf, "SlowBot builds that ran:\n")
for _, c := range ts.slowBots {
Expand Down

0 comments on commit 5f1e306

Please sign in to comment.