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>
This commit is contained in:
Dmitri Shuralyov 2021-11-16 12:42:29 -05:00
Родитель 7b9db79e20
Коммит 2891c2edef
7 изменённых файлов: 179 добавлений и 139 удалений

Просмотреть файл

@ -11,8 +11,11 @@ package main
import ( import (
"bytes" "bytes"
"encoding/json" "encoding/json"
"fmt"
"html"
"html/template"
"net/http" "net/http"
"text/template" "strings"
"golang.org/x/build/dashboard" "golang.org/x/build/dashboard"
) )
@ -41,7 +44,34 @@ func handleBuilders(w http.ResponseWriter, r *http.Request) {
} }
} }
var buildersTmpl = template.Must(template.New("builders").Parse(` var buildersTmpl = template.Must(template.New("builders").Funcs(template.FuncMap{
"builderOwners": func(bc *dashboard.BuildConfig) template.HTML {
owners := bc.HostConfig().Owners
if len(owners) == 0 {
return "golang-dev"
}
var buf strings.Builder
for i, p := range owners {
if i != 0 {
buf.WriteString(", ")
}
if p.GitHub != "" {
fmt.Fprintf(&buf, `<a href="https://github.com/%s">@%[1]s</a>`, html.EscapeString(p.GitHub))
} else if len(p.Emails) > 0 {
name := p.Name
if name == "" {
name = p.Emails[0]
}
fmt.Fprintf(&buf, `<a href="mailto:%s">%s</a>`, html.EscapeString(p.Emails[0]), html.EscapeString(name))
} else if p.Name != "" {
buf.WriteString(html.EscapeString(p.Name))
} else {
buf.WriteString("(unnamed)")
}
}
return template.HTML(buf.String())
},
}).Parse(`
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head><link rel="stylesheet" href="/style.css"/><title>Go Farmer</title></head> <head><link rel="stylesheet" href="/style.css"/><title>Go Farmer</title></head>
@ -62,13 +92,13 @@ var buildersTmpl = template.Must(template.New("builders").Parse(`
<h2 id='builders'>Defined Builders</h2> <h2 id='builders'>Defined Builders</h2>
<table> <table>
<thead><tr><th>name</th><th>pool</th><th>owner</th><th>notes</th></tr> <thead><tr><th>name</th><th>pool</th><th>owners</th><th>notes</th></tr>
</thead> </thead>
{{range .Builders}} {{range .Builders}}
<tr> <tr>
<td>{{.Name}}</td> <td>{{.Name}}</td>
<td><a href='#{{.HostType}}'>{{.HostType}}</a></td> <td><a href='#{{.HostType}}'>{{.HostType}}</a></td>
<td>{{if .OwnerGithub}}<a href='https://github.com/{{.OwnerGithub}}'>@{{.OwnerGithub}}</a>{{else}}{{.ShortOwner}}{{end}}</td> <td>{{builderOwners .}}</td>
<td>{{.Notes}}</td> <td>{{.Notes}}</td>
</tr> </tr>
{{end}} {{end}}
@ -83,7 +113,7 @@ var buildersTmpl = template.Must(template.New("builders").Parse(`
<tr id='{{.HostType}}'> <tr id='{{.HostType}}'>
<td>{{.HostType}}</td> <td>{{.HostType}}</td>
<td>{{.PoolName}}</td> <td>{{.PoolName}}</td>
<td>{{html .Notes}}</td> <td>{{.Notes}}</td>
</tr> </tr>
{{end}} {{end}}
</table> </table>

Просмотреть файл

@ -13,11 +13,11 @@ import (
"encoding/json" "encoding/json"
"errors" "errors"
"fmt" "fmt"
"html/template"
"log" "log"
"net/http" "net/http"
"strconv" "strconv"
"strings" "strings"
"text/template"
"golang.org/x/build/internal/buildgo" "golang.org/x/build/internal/buildgo"
"golang.org/x/build/internal/coordinator/pool" "golang.org/x/build/internal/coordinator/pool"

Просмотреть файл

@ -23,6 +23,7 @@ import (
"golang.org/x/build/buildlet" "golang.org/x/build/buildlet"
"golang.org/x/build/dashboard" "golang.org/x/build/dashboard"
"golang.org/x/build/internal/coordinator/pool" "golang.org/x/build/internal/coordinator/pool"
"golang.org/x/build/internal/gophers"
) )
type TestBuildletPool struct { type TestBuildletPool struct {
@ -100,7 +101,7 @@ func addBuilder(name string) {
} }
dashboard.Hosts["test-host"] = &dashboard.HostConfig{ dashboard.Hosts["test-host"] = &dashboard.HostConfig{
HostType: "test-host", HostType: "test-host",
Owner: "test@golang.org", Owners: []*gophers.Person{{Emails: []string{"test@golang.org"}}},
} }
testPool.Add("test-host", &buildlet.Client{}) testPool.Add("test-host", &buildlet.Client{})
} }

Просмотреть файл

@ -15,6 +15,7 @@ import (
"time" "time"
"golang.org/x/build/buildenv" "golang.org/x/build/buildenv"
"golang.org/x/build/internal/gophers"
"golang.org/x/build/maintner/maintnerd/maintapi/version" "golang.org/x/build/maintner/maintnerd/maintapi/version"
"golang.org/x/build/types" "golang.org/x/build/types"
) )
@ -218,21 +219,21 @@ var Hosts = map[string]*HostConfig{
Notes: "SiFive HiFive Unleashed RISC-V board. 8 GB RAM, 4 cores.", Notes: "SiFive HiFive Unleashed RISC-V board. 8 GB RAM, 4 cores.",
IsReverse: true, IsReverse: true,
ExpectNum: 1, ExpectNum: 1,
OwnerGithub: "4a6f656c", Owners: []*gophers.Person{gh("4a6f656c")},
env: []string{"GOROOT_BOOTSTRAP=/usr/local/goboot"}, env: []string{"GOROOT_BOOTSTRAP=/usr/local/goboot"},
}, },
"host-linux-riscv64-unmatched": &HostConfig{ "host-linux-riscv64-unmatched": &HostConfig{
Notes: "SiFive HiFive Unmatched RISC-V board. 16 GB RAM, 4 cores.", Notes: "SiFive HiFive Unmatched RISC-V board. 16 GB RAM, 4 cores.",
IsReverse: true, IsReverse: true,
ExpectNum: 1, ExpectNum: 1,
OwnerGithub: "mengzhuo", Owners: []*gophers.Person{gh("mengzhuo")},
env: []string{"GOROOT_BOOTSTRAP=/usr/local/goboot"}, env: []string{"GOROOT_BOOTSTRAP=/usr/local/goboot"},
}, },
"host-linux-riscv64-unleashed": &HostConfig{ "host-linux-riscv64-unleashed": &HostConfig{
Notes: "SiFive HiFive Unleashed RISC-V board. 8 GB RAM, 4 cores.", Notes: "SiFive HiFive Unleashed RISC-V board. 8 GB RAM, 4 cores.",
IsReverse: true, IsReverse: true,
ExpectNum: 1, // for now. Joel's board might join the party later. ExpectNum: 1, // for now. Joel's board might join the party later.
OwnerGithub: "bradfitz", // at home Owners: []*gophers.Person{gh("bradfitz")}, // at home
env: []string{"GOROOT_BOOTSTRAP=/usr/local/goboot"}, env: []string{"GOROOT_BOOTSTRAP=/usr/local/goboot"},
}, },
"host-openbsd-amd64-68": &HostConfig{ "host-openbsd-amd64-68": &HostConfig{
@ -255,19 +256,19 @@ var Hosts = map[string]*HostConfig{
IsReverse: true, IsReverse: true,
ExpectNum: 1, ExpectNum: 1,
env: []string{"GOROOT_BOOTSTRAP=/usr/local/go"}, env: []string{"GOROOT_BOOTSTRAP=/usr/local/go"},
OwnerGithub: "4a6f656c", Owners: []*gophers.Person{gh("4a6f656c")},
}, },
"host-openbsd-arm64-joelsing": &HostConfig{ "host-openbsd-arm64-joelsing": &HostConfig{
IsReverse: true, IsReverse: true,
ExpectNum: 1, ExpectNum: 1,
env: []string{"GOROOT_BOOTSTRAP=/usr/local/go"}, env: []string{"GOROOT_BOOTSTRAP=/usr/local/go"},
OwnerGithub: "4a6f656c", Owners: []*gophers.Person{gh("4a6f656c")},
}, },
"host-openbsd-mips64-joelsing": &HostConfig{ "host-openbsd-mips64-joelsing": &HostConfig{
IsReverse: true, IsReverse: true,
ExpectNum: 1, ExpectNum: 1,
env: []string{"GOROOT_BOOTSTRAP=/usr/local/go"}, env: []string{"GOROOT_BOOTSTRAP=/usr/local/go"},
OwnerGithub: "4a6f656c", Owners: []*gophers.Person{gh("4a6f656c")},
}, },
"host-freebsd-11_2": &HostConfig{ "host-freebsd-11_2": &HostConfig{
VMImage: "freebsd-amd64-112", VMImage: "freebsd-amd64-112",
@ -321,13 +322,13 @@ var Hosts = map[string]*HostConfig{
IsReverse: true, IsReverse: true,
ExpectNum: 1, ExpectNum: 1,
env: []string{"GOROOT_BOOTSTRAP=/usr/pkg/go112"}, env: []string{"GOROOT_BOOTSTRAP=/usr/pkg/go112"},
OwnerGithub: "bsiegert", Owners: []*gophers.Person{gh("bsiegert")},
}, },
"host-netbsd-arm64-bsiegert": &HostConfig{ "host-netbsd-arm64-bsiegert": &HostConfig{
IsReverse: true, IsReverse: true,
ExpectNum: 1, ExpectNum: 1,
env: []string{"GOROOT_BOOTSTRAP=/usr/pkg/go114"}, env: []string{"GOROOT_BOOTSTRAP=/usr/pkg/go114"},
OwnerGithub: "bsiegert", Owners: []*gophers.Person{gh("bsiegert")},
}, },
"host-dragonfly-amd64-master": &HostConfig{ "host-dragonfly-amd64-master": &HostConfig{
IsReverse: true, IsReverse: true,
@ -335,39 +336,39 @@ var Hosts = map[string]*HostConfig{
Notes: "DragonFly BSD master, run by DragonFly team", Notes: "DragonFly BSD master, run by DragonFly team",
env: []string{"GOROOT_BOOTSTRAP=/usr/local/go"}, env: []string{"GOROOT_BOOTSTRAP=/usr/local/go"},
SSHUsername: "root", SSHUsername: "root",
OwnerGithub: "tuxillo", Owners: []*gophers.Person{gh("tuxillo")},
}, },
"host-freebsd-arm-paulzhol": &HostConfig{ "host-freebsd-arm-paulzhol": &HostConfig{
IsReverse: true, IsReverse: true,
ExpectNum: 1, ExpectNum: 1,
Notes: "Cubiboard2 1Gb RAM dual-core Cortex-A7 (Allwinner A20), FreeBSD 11.1-RELEASE", Notes: "Cubiboard2 1Gb RAM dual-core Cortex-A7 (Allwinner A20), FreeBSD 11.1-RELEASE",
env: []string{"GOROOT_BOOTSTRAP=/usr/home/paulzhol/go1.4"}, env: []string{"GOROOT_BOOTSTRAP=/usr/home/paulzhol/go1.4"},
OwnerGithub: "paulzhol", Owners: []*gophers.Person{gh("paulzhol")},
}, },
"host-freebsd-arm64-dmgk": &HostConfig{ "host-freebsd-arm64-dmgk": &HostConfig{
IsReverse: true, IsReverse: true,
ExpectNum: 1, ExpectNum: 1,
Notes: "AWS EC2 a1.large 2 vCPU 4GiB RAM, FreeBSD 12.1-STABLE", Notes: "AWS EC2 a1.large 2 vCPU 4GiB RAM, FreeBSD 12.1-STABLE",
env: []string{"GOROOT_BOOTSTRAP=/usr/home/builder/gobootstrap"}, env: []string{"GOROOT_BOOTSTRAP=/usr/home/builder/gobootstrap"},
OwnerGithub: "dmgk", Owners: []*gophers.Person{gh("dmgk")},
}, },
"host-plan9-arm-0intro": &HostConfig{ "host-plan9-arm-0intro": &HostConfig{
IsReverse: true, IsReverse: true,
ExpectNum: 1, ExpectNum: 1,
Notes: "Raspberry Pi 3 Model B, Plan 9 from Bell Labs", Notes: "Raspberry Pi 3 Model B, Plan 9 from Bell Labs",
OwnerGithub: "0intro", Owners: []*gophers.Person{gh("0intro")},
}, },
"host-plan9-amd64-0intro": &HostConfig{ "host-plan9-amd64-0intro": &HostConfig{
IsReverse: true, IsReverse: true,
ExpectNum: 1, ExpectNum: 1,
Notes: "QEMU VM, Plan 9 from Bell Labs, 9k kernel", Notes: "QEMU VM, Plan 9 from Bell Labs, 9k kernel",
OwnerGithub: "0intro", Owners: []*gophers.Person{gh("0intro")},
}, },
"host-plan9-386-0intro": &HostConfig{ "host-plan9-386-0intro": &HostConfig{
IsReverse: true, IsReverse: true,
ExpectNum: 1, ExpectNum: 1,
Notes: "QEMU VM, Plan 9 from Bell Labs", Notes: "QEMU VM, Plan 9 from Bell Labs",
OwnerGithub: "0intro", Owners: []*gophers.Person{gh("0intro")},
}, },
"host-plan9-386-gce": &HostConfig{ "host-plan9-386-gce": &HostConfig{
VMImage: "plan9-386-v7", VMImage: "plan9-386-v7",
@ -409,7 +410,7 @@ var Hosts = map[string]*HostConfig{
"host-windows-arm64-zx2c4": &HostConfig{ "host-windows-arm64-zx2c4": &HostConfig{
IsReverse: true, IsReverse: true,
ExpectNum: 1, ExpectNum: 1,
OwnerGithub: "zx2c4", Owners: []*gophers.Person{gh("zx2c4")},
env: []string{"GOROOT_BOOTSTRAP=C:\\Program Files (Arm)\\Go"}, env: []string{"GOROOT_BOOTSTRAP=C:\\Program Files (Arm)\\Go"},
}, },
"host-windows-arm64-mini": &HostConfig{ "host-windows-arm64-mini": &HostConfig{
@ -470,7 +471,7 @@ var Hosts = map[string]*HostConfig{
}, },
"host-linux-s390x": &HostConfig{ "host-linux-s390x": &HostConfig{
Notes: "run by IBM", Notes: "run by IBM",
OwnerGithub: "ruixin-bao", Owners: []*gophers.Person{gh("ruixin-bao")},
IsReverse: true, IsReverse: true,
env: []string{"GOROOT_BOOTSTRAP=/var/buildlet/go-linux-s390x-bootstrap"}, env: []string{"GOROOT_BOOTSTRAP=/var/buildlet/go-linux-s390x-bootstrap"},
}, },
@ -527,23 +528,21 @@ var Hosts = map[string]*HostConfig{
}, },
"host-illumos-amd64-jclulow": &HostConfig{ "host-illumos-amd64-jclulow": &HostConfig{
Notes: "SmartOS base64@19.1.0 zone", Notes: "SmartOS base64@19.1.0 zone",
Owner: "josh@sysmgr.org", Owners: []*gophers.Person{gh("jclulow")},
OwnerGithub: "jclulow",
IsReverse: true, IsReverse: true,
ExpectNum: 1, ExpectNum: 1,
SSHUsername: "gobuild", SSHUsername: "gobuild",
}, },
"host-solaris-oracle-amd64-oraclerel": &HostConfig{ "host-solaris-oracle-amd64-oraclerel": &HostConfig{
Notes: "Oracle Solaris amd64 Release System", Notes: "Oracle Solaris amd64 Release System",
Owner: "", Owners: []*gophers.Person{gh("rorth")}, // https://github.com/golang/go/issues/15581#issuecomment-550368581
OwnerGithub: "rorth", // https://github.com/golang/go/issues/15581#issuecomment-550368581
IsReverse: true, IsReverse: true,
ExpectNum: 1, ExpectNum: 1,
env: []string{"GOROOT_BOOTSTRAP=/opt/golang/go-solaris-amd64-bootstrap"}, env: []string{"GOROOT_BOOTSTRAP=/opt/golang/go-solaris-amd64-bootstrap"},
}, },
"host-linux-loong64-3a5000": &HostConfig{ "host-linux-loong64-3a5000": &HostConfig{
Notes: "Loongson 3A5000 Box hosted by Loongson; loong64 is the short name of LoongArch 64 bit version", Notes: "Loongson 3A5000 Box hosted by Loongson; loong64 is the short name of LoongArch 64 bit version",
OwnerGithub: "XiaodongLoong", Owners: []*gophers.Person{gh("XiaodongLoong")},
IsReverse: true, IsReverse: true,
ExpectNum: 5, ExpectNum: 5,
env: []string{ env: []string{
@ -552,7 +551,7 @@ var Hosts = map[string]*HostConfig{
}, },
"host-linux-mipsle-mengzhuo": &HostConfig{ "host-linux-mipsle-mengzhuo": &HostConfig{
Notes: "Loongson 3A Box hosted by Meng Zhuo; actually MIPS64le despite the name", Notes: "Loongson 3A Box hosted by Meng Zhuo; actually MIPS64le despite the name",
OwnerGithub: "mengzhuo", Owners: []*gophers.Person{gh("mengzhuo")},
IsReverse: true, IsReverse: true,
ExpectNum: 1, ExpectNum: 1,
env: []string{ env: []string{
@ -562,7 +561,7 @@ var Hosts = map[string]*HostConfig{
}, },
"host-linux-mips64le-rtrk": &HostConfig{ "host-linux-mips64le-rtrk": &HostConfig{
Notes: "cavium,rhino_utm8 board hosted at RT-RK.com; quad-core cpu, 8GB of ram and 240GB ssd disks.", Notes: "cavium,rhino_utm8 board hosted at RT-RK.com; quad-core cpu, 8GB of ram and 240GB ssd disks.",
OwnerGithub: "bogojevic", // and @milanknezevic. https://github.com/golang/go/issues/31217#issuecomment-547004892 Owners: []*gophers.Person{gh("bogojevic"), gh("milanknezevic")}, // See https://github.com/golang/go/issues/31217#issuecomment-547004892.
IsReverse: true, IsReverse: true,
ExpectNum: 1, ExpectNum: 1,
env: []string{ env: []string{
@ -571,7 +570,7 @@ var Hosts = map[string]*HostConfig{
}, },
"host-linux-mips64-rtrk": &HostConfig{ "host-linux-mips64-rtrk": &HostConfig{
Notes: "cavium,rhino_utm8 board hosted at RT-RK.com; quad-core cpu, 8GB of ram and 240GB ssd disks.", Notes: "cavium,rhino_utm8 board hosted at RT-RK.com; quad-core cpu, 8GB of ram and 240GB ssd disks.",
OwnerGithub: "bogojevic", // and @milanknezevic. https://github.com/golang/go/issues/31217#issuecomment-547004892 Owners: []*gophers.Person{gh("bogojevic"), gh("milanknezevic")}, // See https://github.com/golang/go/issues/31217#issuecomment-547004892.
IsReverse: true, IsReverse: true,
ExpectNum: 1, ExpectNum: 1,
env: []string{ env: []string{
@ -580,7 +579,7 @@ var Hosts = map[string]*HostConfig{
}, },
"host-ios-arm64-corellium-ios": &HostConfig{ "host-ios-arm64-corellium-ios": &HostConfig{
Notes: "Virtual iOS devices hosted by Zenly on Corellium; see issues 31722 and 40523", Notes: "Virtual iOS devices hosted by Zenly on Corellium; see issues 31722 and 40523",
OwnerGithub: "znly", Owners: []*gophers.Person{gh("steeve")},
IsReverse: true, IsReverse: true,
ExpectNum: 3, ExpectNum: 3,
env: []string{ env: []string{
@ -589,7 +588,7 @@ var Hosts = map[string]*HostConfig{
}, },
"host-android-arm64-corellium-android": &HostConfig{ "host-android-arm64-corellium-android": &HostConfig{
Notes: "Virtual Android devices hosted by Zenly on Corellium; see issues 31722 and 40523", Notes: "Virtual Android devices hosted by Zenly on Corellium; see issues 31722 and 40523",
OwnerGithub: "znly", Owners: []*gophers.Person{gh("steeve")},
IsReverse: true, IsReverse: true,
ExpectNum: 3, ExpectNum: 3,
env: []string{ env: []string{
@ -598,7 +597,7 @@ var Hosts = map[string]*HostConfig{
}, },
"host-aix-ppc64-osuosl": &HostConfig{ "host-aix-ppc64-osuosl": &HostConfig{
Notes: "AIX 7.2 VM on OSU; run by Tony Reix", Notes: "AIX 7.2 VM on OSU; run by Tony Reix",
OwnerGithub: "trex58", Owners: []*gophers.Person{gh("trex58")},
IsReverse: true, IsReverse: true,
ExpectNum: 1, ExpectNum: 1,
env: []string{"GOROOT_BOOTSTRAP=/opt/freeware/lib/golang"}, env: []string{"GOROOT_BOOTSTRAP=/opt/freeware/lib/golang"},
@ -614,7 +613,7 @@ var Hosts = map[string]*HostConfig{
}, },
"host-linux-amd64-wsl": &HostConfig{ "host-linux-amd64-wsl": &HostConfig{
Notes: "Windows 10 WSL2 Ubuntu", Notes: "Windows 10 WSL2 Ubuntu",
OwnerGithub: "mengzhuo", Owners: []*gophers.Person{gh("mengzhuo")},
IsReverse: true, IsReverse: true,
ExpectNum: 2, ExpectNum: 2,
env: []string{"GOROOT_BOOTSTRAP=/usr/lib/go"}, env: []string{"GOROOT_BOOTSTRAP=/usr/lib/go"},
@ -646,6 +645,14 @@ type CrossCompileConfig struct {
AlwaysCrossCompile bool AlwaysCrossCompile bool
} }
func gh(githubUsername string) *gophers.Person {
p := gophers.GetPerson("@" + githubUsername)
if p == nil {
panic("person with GitHub username " + githubUsername + " does not exist in the golang.org/x/build/internal/gophers package")
}
return p
}
func init() { func init() {
for key, c := range Hosts { for key, c := range Hosts {
if key == "" { if key == "" {
@ -724,8 +731,7 @@ type HostConfig struct {
// relevant Cloud Storage bucket as specified by the build environment. // relevant Cloud Storage bucket as specified by the build environment.
goBootstrapURLTmpl string // optional URL to a built Go 1.4+ tar.gz goBootstrapURLTmpl string // optional URL to a built Go 1.4+ tar.gz
Owner string // optional email of owner; "bradfitz@golang.org", empty means golang-dev Owners []*gophers.Person // owners; empty means golang-dev
OwnerGithub string // optional GitHub username of owner
Notes string // notes for humans Notes string // notes for humans
SSHUsername string // username to ssh as, empty means not supported SSHUsername string // username to ssh as, empty means not supported
@ -1291,20 +1297,6 @@ func (c *HostConfig) IsEC2() bool {
return c.isEC2 return c.isEC2
} }
// ShortOwner returns a short human-readable owner.
func (c BuildConfig) ShortOwner() string {
owner := c.HostConfig().Owner
if owner == "" {
return "go-dev"
}
return strings.TrimSuffix(owner, "@golang.org")
}
// OwnerGithub returns the Github handle of the owner.
func (c BuildConfig) OwnerGithub() string {
return c.HostConfig().OwnerGithub
}
// PoolName returns a short summary of the builder's host type for the // PoolName returns a short summary of the builder's host type for the
// https://farmer.golang.org/builders page. // https://farmer.golang.org/builders page.
func (c *HostConfig) PoolName() string { func (c *HostConfig) PoolName() string {
@ -2206,7 +2198,7 @@ func init() {
addBuilder(BuildConfig{ addBuilder(BuildConfig{
Name: "ios-arm64-corellium", Name: "ios-arm64-corellium",
HostType: "host-ios-arm64-corellium-ios", HostType: "host-ios-arm64-corellium-ios",
Notes: "Virtual iPhone SE running on Corellium; owned by zenly", Notes: "Virtual iPhone SE running on Corellium; owned by zenly (github.com/znly)",
buildsRepo: func(repo, branch, goBranch string) bool { buildsRepo: func(repo, branch, goBranch string) bool {
return repo == "go" && branch == "master" && goBranch == "master" return repo == "go" && branch == "master" && goBranch == "master"
}, },
@ -2215,7 +2207,7 @@ func init() {
addBuilder(BuildConfig{ addBuilder(BuildConfig{
Name: "android-arm64-corellium", Name: "android-arm64-corellium",
HostType: "host-android-arm64-corellium-android", HostType: "host-android-arm64-corellium-android",
Notes: "Virtual Android running on Corellium; owned by zenly", Notes: "Virtual Android running on Corellium; owned by zenly (github.com/znly)",
buildsRepo: func(repo, branch, goBranch string) bool { buildsRepo: func(repo, branch, goBranch string) bool {
return repo == "go" && branch == "master" && goBranch == "master" return repo == "go" && branch == "master" && goBranch == "master"
}, },
@ -2224,7 +2216,7 @@ func init() {
addBuilder(BuildConfig{ addBuilder(BuildConfig{
Name: "android-arm-corellium", Name: "android-arm-corellium",
HostType: "host-android-arm64-corellium-android", HostType: "host-android-arm64-corellium-android",
Notes: "Virtual Android running on Corellium; owned by zenly", Notes: "Virtual Android running on Corellium; owned by zenly (github.com/znly)",
buildsRepo: func(repo, branch, goBranch string) bool { buildsRepo: func(repo, branch, goBranch string) bool {
return repo == "go" && branch == "master" && goBranch == "master" return repo == "go" && branch == "master" && goBranch == "master"
}, },
@ -2573,8 +2565,7 @@ func init() {
}) })
} }
// addBuilder adds c to the Builders map after doing some sanity // addBuilder adds c to the Builders map after doing some checks.
// checks.
func addBuilder(c BuildConfig) { func addBuilder(c BuildConfig) {
if c.Name == "" { if c.Name == "" {
panic("empty name") panic("empty name")

Просмотреть файл

@ -675,6 +675,17 @@ func TestHostConfigsAllUsed(t *testing.T) {
} }
} }
// Test that all specified builder owners are non-nil.
func TestBuilderOwners(t *testing.T) {
for host, config := range Hosts {
for i, p := range config.Owners {
if p == nil {
t.Errorf("dashboard.Hosts[%q].Owners[%d] is nil, want non-nil", host, i)
}
}
}
}
// tests that goBranch is optional for repo == "go" // tests that goBranch is optional for repo == "go"
func TestBuildsRepoAtAllImplicitGoBranch(t *testing.T) { func TestBuildsRepoAtAllImplicitGoBranch(t *testing.T) {
builder := Builders["android-amd64-emu"] builder := Builders["android-amd64-emu"]

Просмотреть файл

@ -11,7 +11,7 @@ import (
func gh(githubUsername string) Owner { func gh(githubUsername string) Owner {
p := gophers.GetPerson("@" + githubUsername) p := gophers.GetPerson("@" + githubUsername)
if p == nil { if p == nil {
panic("person with GitHub username " + githubUsername + " does not exist in the internal/gophers package.") panic("person with GitHub username " + githubUsername + " does not exist in the golang.org/x/build/internal/gophers package")
} }
return Owner{GitHubUsername: githubUsername, GerritEmail: p.Gerrit} return Owner{GitHubUsername: githubUsername, GerritEmail: p.Gerrit}
} }

Просмотреть файл

@ -379,6 +379,7 @@ func init() {
addPerson("Antonin Amand", "antonin.amand@gmail.com", "@gwik") addPerson("Antonin Amand", "antonin.amand@gmail.com", "@gwik")
addPerson("Antonio Antelo", "aantelov87@gmail.com") addPerson("Antonio Antelo", "aantelov87@gmail.com")
addPerson("Antonio Bibiano", "antbbn@gmail.com", "@antbbn") addPerson("Antonio Bibiano", "antbbn@gmail.com", "@antbbn")
addPerson("Antonio Huete Jimenez", "@tuxillo")
addPerson("Antonio Murdaca", "runcom@redhat.com", "@runcom") addPerson("Antonio Murdaca", "runcom@redhat.com", "@runcom")
addPerson("Aram Hăvărneanu", "aram@mgk.ro", "5036@62eb7196-b449-3ce5-99f1-c037f21e1705") addPerson("Aram Hăvărneanu", "aram@mgk.ro", "5036@62eb7196-b449-3ce5-99f1-c037f21e1705")
addPerson("Aram Hăvărneanu", "aram@mgk.ro", "@4ad") addPerson("Aram Hăvărneanu", "aram@mgk.ro", "@4ad")
@ -489,6 +490,7 @@ func init() {
addPerson("Bobby DeSimone", "bobbydesimone@gmail.com", "@desimone") addPerson("Bobby DeSimone", "bobbydesimone@gmail.com", "@desimone")
addPerson("Bobby Powers", "bobbypowers@gmail.com", "@bpowers") addPerson("Bobby Powers", "bobbypowers@gmail.com", "@bpowers")
addPerson("Bodo Junglas", "bodo.junglas@leanovate.de") addPerson("Bodo Junglas", "bodo.junglas@leanovate.de")
addPerson("@bogojevic")
addPerson("Boris Nagaev", "nagaev@google.com") addPerson("Boris Nagaev", "nagaev@google.com")
addPerson("Boris Schrijver", "bschrijver@schubergphilis.com") addPerson("Boris Schrijver", "bschrijver@schubergphilis.com")
addPerson("Borja Clemente", "borja.clemente@gmail.com", "@clebs") addPerson("Borja Clemente", "borja.clemente@gmail.com", "@clebs")
@ -864,6 +866,7 @@ func init() {
addPerson("Diogo Pinela", "diogoid7400@gmail.com", "@dpinela") addPerson("Diogo Pinela", "diogoid7400@gmail.com", "@dpinela")
addPerson("Dirk Gadsden", "dirk@esherido.com", "@dirk") addPerson("Dirk Gadsden", "dirk@esherido.com", "@dirk")
addPerson("Diwaker Gupta", "diwakergupta@gmail.com", "@diwakergupta") addPerson("Diwaker Gupta", "diwakergupta@gmail.com", "@diwakergupta")
addPerson("Dmitri Goutnik", "@dmgk")
addPerson("Dmitri Popov", "operator@cv.dp-net.com", "@pin") addPerson("Dmitri Popov", "operator@cv.dp-net.com", "@pin")
addPerson("Dmitri Shuralyov", "dmitshur@golang.org", "dmitri@shuralyov.com", "shurcool@gmail.com", "@dmitshur", "6005@62eb7196-b449-3ce5-99f1-c037f21e1705") addPerson("Dmitri Shuralyov", "dmitshur@golang.org", "dmitri@shuralyov.com", "shurcool@gmail.com", "@dmitshur", "6005@62eb7196-b449-3ce5-99f1-c037f21e1705")
addPerson("Dmitriy Dudkin", "dudkin.dmitriy@gmail.com", "@tmwh") addPerson("Dmitriy Dudkin", "dudkin.dmitriy@gmail.com", "@tmwh")
@ -1528,6 +1531,7 @@ func init() {
addPerson("Joshua Boelter", "joshua.boelter@intel.com", "@duckized") addPerson("Joshua Boelter", "joshua.boelter@intel.com", "@duckized")
addPerson("Joshua Humphries", "jhumphries131@gmail.com") addPerson("Joshua Humphries", "jhumphries131@gmail.com")
addPerson("Joshua Rubin", "joshua@rubixconsulting.com", "@joshuarubin") addPerson("Joshua Rubin", "joshua@rubixconsulting.com", "@joshuarubin")
addPerson("Joshua M. Clulow", "@jclulow", "josh@sysmgr.org")
addPerson("Joshua T Corbin", "joshua@uber.com") addPerson("Joshua T Corbin", "joshua@uber.com")
addPerson("Josselin Costanzi", "josselin@costanzi.fr") addPerson("Josselin Costanzi", "josselin@costanzi.fr")
addPerson("Josselin Costanzi", "josselin@costanzi.fr", "16720@62eb7196-b449-3ce5-99f1-c037f21e1705") addPerson("Josselin Costanzi", "josselin@costanzi.fr", "16720@62eb7196-b449-3ce5-99f1-c037f21e1705")
@ -2398,6 +2402,7 @@ func init() {
addPerson("Ron Hashimoto", "mail@h2so5.net", "@h2so5") addPerson("Ron Hashimoto", "mail@h2so5.net", "@h2so5")
addPerson("Ronald G. Minnich", "rminnich@gmail.com", "@rminnich") addPerson("Ronald G. Minnich", "rminnich@gmail.com", "@rminnich")
addPerson("Ronan Guilloux", "ronan.guilloux@gmail.com") addPerson("Ronan Guilloux", "ronan.guilloux@gmail.com")
addPerson("@rorth")
addPerson("Ross Chater", "rdchater@gmail.com", "@rdcx") addPerson("Ross Chater", "rdchater@gmail.com", "@rdcx")
addPerson("Ross Light", "light@google.com", "8285@62eb7196-b449-3ce5-99f1-c037f21e1705") addPerson("Ross Light", "light@google.com", "8285@62eb7196-b449-3ce5-99f1-c037f21e1705")
addPerson("Ross Light", "light@google.com", "@zombiezen") addPerson("Ross Light", "light@google.com", "@zombiezen")
@ -2406,6 +2411,7 @@ func init() {
addPerson("Ruben Vermeersch", "ruben@rocketeer.be") addPerson("Ruben Vermeersch", "ruben@rocketeer.be")
addPerson("Rudi Kramer", "rudi.kramer@gmail.com") addPerson("Rudi Kramer", "rudi.kramer@gmail.com")
addPerson("Rui Ueyama", "ruiu@google.com", "@rui314") addPerson("Rui Ueyama", "ruiu@google.com", "@rui314")
addPerson("Ruixin Bao", "@ruixin-bao")
addPerson("Ruslan Nigmatullin", "elessar@dropbox.com") addPerson("Ruslan Nigmatullin", "elessar@dropbox.com")
addPerson("Russ Cox", "rsc@golang.org", "5056@62eb7196-b449-3ce5-99f1-c037f21e1705", "@rsc") addPerson("Russ Cox", "rsc@golang.org", "5056@62eb7196-b449-3ce5-99f1-c037f21e1705", "@rsc")
addPerson("Russell Haering", "russellhaering@gmail.com", "@russellhaering") addPerson("Russell Haering", "russellhaering@gmail.com", "@russellhaering")
@ -2713,7 +2719,7 @@ func init() {
addPerson("Tomas Basham", "tomasbasham@gmail.com") addPerson("Tomas Basham", "tomasbasham@gmail.com")
addPerson("Tommy Schaefer", "tommy.schaefer@teecom.com", "@tommyschaefer") addPerson("Tommy Schaefer", "tommy.schaefer@teecom.com", "@tommyschaefer")
addPerson("Tonis Tiigi", "tonistiigi@gmail.com", "@tonistiigi") addPerson("Tonis Tiigi", "tonistiigi@gmail.com", "@tonistiigi")
addPerson("Tony Reix", "Tony.Reix@bull.net", "16326@62eb7196-b449-3ce5-99f1-c037f21e1705") addPerson("Tony Reix", "Tony.Reix@bull.net", "@trex58", "16326@62eb7196-b449-3ce5-99f1-c037f21e1705")
addPerson("Tony Walker", "walkert.uk@gmail.com", "@walkert") addPerson("Tony Walker", "walkert.uk@gmail.com", "@walkert")
addPerson("Tooru Takahashi", "tooru.takahashi134@gmail.com", "@tooru") addPerson("Tooru Takahashi", "tooru.takahashi134@gmail.com", "@tooru")
addPerson("Tor Andersson", "tor.andersson@gmail.com", "@ccxvii") addPerson("Tor Andersson", "tor.andersson@gmail.com", "@ccxvii")
@ -2842,6 +2848,7 @@ func init() {
addPerson("Xi Ruoyao", "xry23333@gmail.com") addPerson("Xi Ruoyao", "xry23333@gmail.com")
addPerson("Xia Bin", "snyh@snyh.org", "12161@62eb7196-b449-3ce5-99f1-c037f21e1705") addPerson("Xia Bin", "snyh@snyh.org", "12161@62eb7196-b449-3ce5-99f1-c037f21e1705")
addPerson("Xia Bin", "snyh@snyh.org", "@snyh") addPerson("Xia Bin", "snyh@snyh.org", "@snyh")
addPerson("Xiaodong Liu", "@XiaodongLoong")
addPerson("Xing Xing", "mikespook@gmail.com", "@mikespook") addPerson("Xing Xing", "mikespook@gmail.com", "@mikespook")
addPerson("Xudong Zhang", "felixmelon@gmail.com") addPerson("Xudong Zhang", "felixmelon@gmail.com")
addPerson("Xudong Zheng", "7pkvm5aw@slicealias.com", "@xudongzheng") addPerson("Xudong Zheng", "7pkvm5aw@slicealias.com", "@xudongzheng")