Skip to content

Commit c310380

Browse files
committed
cmd/coordinator: fix trybot remaining builds count for subrepos
Fixes assumption broken by https://golang.org/cl/143538 where number of builders (types of builders) no longer equals the number of trybot builds. (We now run linux-amd64 1 or 3 times depending on the repo) Fixes golang/go#28714 Change-Id: I3b85adbb79508890d16311fc75f4b48ffc1f3c78 Reviewed-on: https://go-review.googlesource.com/c/149437 Reviewed-by: Dmitri Shuralyov <[email protected]>
1 parent d2a2c12 commit c310380

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cmd/coordinator/coordinator.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1085,7 +1085,6 @@ func newTrySet(work *apipb.GerritTryWorkItem) *trySet {
10851085
tryKey: key,
10861086
tryID: "T" + randHex(9),
10871087
trySetState: trySetState{
1088-
remain: len(builders),
10891088
builds: make([]*buildStatus, 0, len(builders)),
10901089
},
10911090
}
@@ -1108,6 +1107,7 @@ func newTrySet(work *apipb.GerritTryWorkItem) *trySet {
11081107

11091108
idx := len(ts.builds)
11101109
ts.builds = append(ts.builds, bs)
1110+
ts.remain++
11111111
go bs.start() // acquires statusMu itself, so in a goroutine
11121112
go ts.awaitTryBuild(idx, bs, brev)
11131113
}

0 commit comments

Comments
 (0)