Граф коммитов

16 Коммитов

Автор SHA1 Сообщение Дата
Dmitri Shuralyov 2891c2edef dashboard, cmd/coordinator: support multiple builder owners
Prefer displaying GitHub usernames for convenience of pinging in GitHub
issues, since all current builder owners have them. Keep it possible to
use an email or something else if no GitHub account exists.

Update the owner of the Corellium builders to be individual GitHub
account, so that it can be pinged in an issue. The GitHub organization
is already mentioned in the builder notes.

Also switch to html/template (instead of text/template) for rendering
the builders page.

Fixes golang/go#49596.

Change-Id: I89a96eb8f7a3057bc1f3aaee16abc9c776c45ee7
Reviewed-on: https://go-review.googlesource.com/c/build/+/363983
Trust: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Carlos Amedee <carlos@golang.org>
2021-11-16 18:15:49 +00:00
Dmitri Shuralyov ec857d63f3 cmd/coordinator: update to Go 1.16
Also set the language to 1.16 in the x/build go.mod file.

This is needed to be able to use the //go:embed directive in
coordinator, which will make moving static files much easier.

For golang/go#34744.

Change-Id: I0e627b408fe887ce1d3e0d6b3e032166421a8c41
Reviewed-on: https://go-review.googlesource.com/c/build/+/336390
Trust: Dmitri Shuralyov <dmitshur@golang.org>
Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Carlos Amedee <carlos@golang.org>
2021-07-27 17:34:34 +00:00
Russ Cox f539cd3e8d all: go fmt ./...
Make all our package sources use Go 1.17 gofmt format
(adding //go:build lines).

Not strictly necessary but will avoid spurious changes
as files are edited.

Part of //go:build change (#41184).
See https://golang.org/design/draft-gobuild

Change-Id: I8020e066756b0cfa99ed1cb804b17e127e4151b9
Reviewed-on: https://go-review.googlesource.com/c/build/+/294417
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Robert Griesemer <gri@golang.org>
Reviewed-by: Jason A. Donenfeld <Jason@zx2c4.com>
Trust: Russ Cox <rsc@golang.org>
Run-TryBot: Russ Cox <rsc@golang.org>
2021-02-20 03:31:12 +00:00
Carlos Amedee 7858236789 internal/pool: remove package level accessors
This change moves all package level accessors into a struct as
suggested by Alex:
https://go-review.googlesource.com/c/build/+/227141/6/internal/coordinator/pool/gce.go#227
This will make it easier to move away from global state in
future changes.

Updates golang/go#36841
Updates golang/go#38337

Change-Id: I005884ccd206fe49651d31ef1d3d336fac9c3d5f
Reviewed-on: https://go-review.googlesource.com/c/build/+/227920
Run-TryBot: Carlos Amedee <carlos@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Alexander Rakoczy <alex@golang.org>
2020-04-20 15:46:52 +00:00
Carlos Amedee 26e1579cd0 internal/pool: move the reverse buildlet pool into a pool package
This is a set in a series of steps which will move everything buildlet
pool related into a pool package.

Updates golang/go#36841
Updates golang/go#38337

Change-Id: Ic7a0ccd7838345036df2e72b13084070541cb63c
Reviewed-on: https://go-review.googlesource.com/c/build/+/227769
Run-TryBot: Carlos Amedee <carlos@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Alexander Rakoczy <alex@golang.org>
2020-04-20 15:26:44 +00:00
Carlos Amedee 02e10adc88 internal/pool: move the gce buildlet pool into a pool package
This CL creates the internal/coordinator/pool package intended to
contain all buildlet pool implementations. In order to keep this
change small and carefully discover where the interactions are
between the gce buildlet pool and the rest of the coordinator
are, this change only moves the gce buildlet over to the new
package.

The next steps will be to move the rest of the buildlet pools
over to this package. After that we will restructure the
implementations themselves in order to increase test coverage
and increase the ease of testing.

Updates golang/go#36841
Updates golang/go#38337

Change-Id: If82ae1b584bd77c697aa84fadf9011c9e79fa409
Reviewed-on: https://go-review.googlesource.com/c/build/+/227141
Run-TryBot: Carlos Amedee <carlos@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Alexander Rakoczy <alex@golang.org>
2020-04-20 14:42:36 +00:00
Brad Fitzpatrick 136868bd21 cmd/coordinator: follow module proxy redirects
And because this uses new-in-Go1.13 http.Header.Clone, restrict all
the files to Go 1.13+ and bump the Dockerfile Go version.

Fixes golang/go#33928

Change-Id: I147cc4465e393d2c34e59c70edf65f3901a5e132
Reviewed-on: https://go-review.googlesource.com/c/build/+/192341
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
2019-09-04 16:40:22 +00:00
Dmitri Shuralyov 4567d7f4dc cmd/coordinator: support building and testing on macOS
It's convenient to be able to build and run tests for cmd/coordinator
on macOS, in addition to Linux. Add the build tags and make appropriate
changes to the README to document the level of support.

I've tested running locally on macOS and the limited basic functionality
seems to work okay. If there's something specific that doesn't work on
macOS but works on Linux, we can update the README accordingly.

Start using go run instead of go install to combine two commands into
one. If someone prefers to use go install and run the installed binary,
they can infer the instructions to do so from the go run command.

Change-Id: I823b21a8c790c77045638b53c204ce10b60f40b2
Reviewed-on: https://go-review.googlesource.com/c/build/+/168137
Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2019-03-18 17:58:24 +00:00
Brad Fitzpatrick 532581ba91 all: add linux build tags for linux-only tools
Part of getting the x/build repo passing on the builders.

Change-Id: I3f2055cbe91c03ddc0a5152bfdbc0f377f354f47
Reviewed-on: https://go-review.googlesource.com/c/157441
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2019-01-11 03:37:26 +00:00
Quentin Smith 9a67679eab cmd/coordinator, internal/buildgo: create buildgo package
This package contains the BuilderRev type moved from cmd/coordinator.

The rest of the CL is simply updating coordinator with the new
exported names of the type and its fields.

This refactoring is in preparation for moving the benchmark building and running
code into a separate package.

(Most of the diff could have been avoided with a type alias, but I
assume we'd rather not do that.)

Updates golang/go#19871

Change-Id: Ib6ce49431c8529d6b4e72725d3cd652b9d0160db
Reviewed-on: https://go-review.googlesource.com/44175
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2017-05-26 14:10:59 +00:00
Brad Fitzpatrick 328c9b8918 all: split builder config into builder & host configs
Our builders are named of the form "GOOS-GOARCH" or
"GOOS-GOARCH-suffix".

Over time we've grown many builders. This CL doesn't change
that. Builders continue to be named and operate as before.

Previously the build configuration file (dashboard/builders.go) made
each builder type ("linux-amd64-race", etc) define how to create a
host running a buildlet of that type, even though many builders had
identical host configs. For example, these builders all share the same
host type (a Kubernetes container):

   linux-amd64
   linux-amd64-race
   linux-386
   linux-386-387

And these are the same host type (a GCE VM):

   windows-amd64-gce
   windows-amd64-race
   windows-386-gce

This CL creates a new concept of a "hostType" which defines how
the buildlet is created (Kube, GCE, Reverse, and how), and then each
builder itself references a host type.

Users never see the hostType. (except perhaps in gomote list output)
But they at least never need to care about them.

Reverse buildlets now can only be one hostType at a time, which
simplifies things. We were no longer using multiple roles per machine
once moving to VMs for OS X.

gomote continues to operate as it did previously but its underlying
protocol changed and clients will need to be updated. As a new
feature, gomote now has a new flag to let you reuse a buildlet host
connection for different builder rules if they share the same
underlying host type. But users can ignore that.

This CL is a long-standing TODO (previously attempted and aborted) and
will make many things easier and faster, including the linux-arm
cross-compilation effort, and keeping pre-warmed buildlets of VM types
ready to go.

Updates golang/go#17104

Change-Id: Iad8387f48680424a8441e878a2f4762bf79ea4d2
Reviewed-on: https://go-review.googlesource.com/29551
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
2016-09-22 23:13:34 +00:00
Evan Brown 34ff1d9bc8 all: kubernetes builder autoscaling
Improvements to support rapid scheduling of many build jobs:

- Retry logic in Kubernetes client to handle sporadic connection
  closes from their API server under heavy load

- Cluster autoscaler scales on default CPU utilization metric

- Debug mode allows scheduling multiple builds to test scaling

- Account for scheduled vs. provisioned resources in a cluster
  and use that information to estimate when a build's pod
  will be scheduled and in running state

- Use estimated scheduled time to set context timeout

- Track pod lifecycle (requested time, estimated available time,
  actual available time, terminate time, etc)

Change-Id: I14d6c5e01af0970dbb3390a29d1ee5c43049fff8
Reviewed-on: https://go-review.googlesource.com/19524
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2016-04-07 17:22:57 +00:00
Evan Brown c8b96fa9fa all: report cluster utilization to Cloud Monitoring
Change-Id: Iec8e03fdef27582756d96b731c2fb12b56175ca9
Reviewed-on: https://go-review.googlesource.com/18396
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2016-01-26 17:10:41 +00:00
Evan Brown 08b68a97c7 all: run dev coordinator locally, allow debug in prod
* flag allows debug (trigger a build) in prod mode
* use default zone (us-central1-f) in staging
* compute.CloudPlatformScope satisfies compute and storage scope
  requirements
* new buildlet for linux-amd64 on Kubernetes

Updates golang/go#12546

Change-Id: I1a0cbc0e0c0552b7ac56943c646378194508d48f
Reviewed-on: https://go-review.googlesource.com/17102
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2015-11-20 18:13:27 +00:00
David Crawshaw dd57a13174 cmd/coordinator: minor status improvements
Address post-submit comments from cl/9248.

Change-Id: Ibe57678661c68c4f7b7db8a999a21b7ac001eac8
Reviewed-on: https://go-review.googlesource.com/9450
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2015-04-28 21:22:19 +00:00
David Crawshaw 66c36dd35f cmd/coordinator: run builds on reverse buildlets
Also introduces more dev mode manual testing machinary. It is now
possible to start a coordinator and buildlet on a local machine and
hit localhost:8119/dosomework/buildername to rebuild the latest
revision from build.golang.org.

No support for VMs on reverse buildlets yet. That will have to wait
for some future work.

Change-Id: I590a9bc1779add030bde8dbf496eb6814ef57126
Reviewed-on: https://go-review.googlesource.com/9248
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2015-04-28 13:43:50 +00:00