cmd/coordinator, cmd/gomote: show periodic status updates to stderr
Also modernizes some code in the coordinator.
Updates golang/go#35354 (or fixes. But we could return more info.)
Change-Id: Ifc1aa85ca217a0932e388ec5d36ef0737b90c63d
Reviewed-on: https://go-review.googlesource.com/c/build/+/207841
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Bryan C. Mills <bcmills@google.com>
diff --git a/types/types.go b/types/types.go
index 1261de4..081f049 100644
--- a/types/types.go
+++ b/types/types.go
@@ -168,3 +168,18 @@
}
return a.Minor < b.Minor
}
+
+// BuildletWaitStatus is the periodic messages we send to "gomote create"
+// clients or show on trybot status pages to tell the user who long
+// they're expected to wait.
+type BuildletWaitStatus struct {
+ Ahead int `json:"ahead"` // number of waiters ahead of this buildlet request
+
+ // TODO: add number of active builds, and number of builds
+ // creating. And for how long. And maybe an estimate of how
+ // long those builds typically take? But recognize which are
+ // dynamic vs static (reverse) builder types and don't say
+ // that "1 is creating" on a reverse buildlet that can't
+ // actually "create" any. (It can just wait for one register
+ // itself)
+}