Documentation ¶
Overview ¶
Package dashboard contains shared configuration and logic used by various pieces of the Go continuous build system.
Index ¶
- Constants
- Variables
- func GorootFinal(goos string) string
- type BuildConfig
- func (c *BuildConfig) AllScript() string
- func (c *BuildConfig) AllScriptArgs() []string
- func (c *BuildConfig) BuildsRepoPostSubmit(repo, branch, goBranch string) bool
- func (c *BuildConfig) BuildsRepoTryBot(repo, branch, goBranch string) bool
- func (c *BuildConfig) DistTestsExecTimeout(distTests []string) time.Duration
- func (c *BuildConfig) Env() []string
- func (c *BuildConfig) FilePathJoin(x ...string) string
- func (c *BuildConfig) GOARCH() string
- func (c *BuildConfig) GOOS() string
- func (c *BuildConfig) GoBootstrapURL(e *buildenv.Environment) string
- func (c *BuildConfig) GoInstallRacePackages() []string
- func (c *BuildConfig) GoTestTimeoutScale() int
- func (c *BuildConfig) HostConfig() *HostConfig
- func (c *BuildConfig) IsContainer() bool
- func (c *BuildConfig) IsCrossCompileOnly() bool
- func (c *BuildConfig) IsGCE() bool
- func (c *BuildConfig) IsLongTest() bool
- func (c *BuildConfig) IsRace() bool
- func (c *BuildConfig) IsRestricted() bool
- func (c *BuildConfig) IsReverse() bool
- func (c *BuildConfig) IsTryOnly() bool
- func (c *BuildConfig) IsVM() bool
- func (c *BuildConfig) MakeScript() string
- func (c *BuildConfig) MakeScriptArgs() []string
- func (c *BuildConfig) MatchesSlowBotTerm(term string) bool
- func (c *BuildConfig) NumTestHelpers(isTry bool) int
- func (c *BuildConfig) OutboundNetworkAllowed() bool
- func (c *BuildConfig) PrivateGoProxy() bool
- func (c *BuildConfig) ShouldRunDistTest(distTest string, isNormalTry bool) bool
- func (c *BuildConfig) TargetArch() string
- type CosArch
- type HostConfig
- func (c *HostConfig) BuildletBinaryURL(e *buildenv.Environment) string
- func (c *HostConfig) ContainerVMImage() string
- func (hc *HostConfig) CosArchitecture() CosArch
- func (c *HostConfig) IsContainer() bool
- func (c *HostConfig) IsGoogle() bool
- func (c *HostConfig) IsHermetic() bool
- func (c *HostConfig) IsVM() bool
- func (c *HostConfig) MachineType() string
- func (c *HostConfig) PoolName() string
Constants ¶
const GoBootstrap = "go1.22.6"
GoBootstrap is the bootstrap Go version.
For bootstrap versions Go 1.21.0 and newer, bootstrap Go builds for Windows (only) with this name must be in the buildlet bucket, usually uploaded by 'genbootstrap -upload windows-*'. However, as of 2024-08-16 all existing coordinator builders for Windows have migrated to LUCI, so nothing needs to be done for Windows after all.
Variables ¶
var Builders = map[string]*BuildConfig{}
Builders are the different build configurations. The keys are like "darwin-amd64" or "linux-386-387". This map should not be modified by other packages. Initialization happens below, via calls to addBuilder.
var Hosts = map[string]*HostConfig{ "host-aix-ppc64-osuosl": { Notes: "AIX 7.2 VM on OSU; run by Tony Reix", Owners: []*gophers.Person{gh("trex58")}, IsReverse: true, ExpectNum: 1, }, "host-android-arm64-corellium-android": { Notes: "Virtual Android devices hosted by Zenly on Corellium; see issues 31722 and 40523", Owners: []*gophers.Person{gh("steeve"), gh("changkun")}, IsReverse: true, ExpectNum: 3, GoBootstrap: "none", // contains filtered or unexported fields }, "host-darwin-amd64-10_15-aws": { IsReverse: true, ExpectNum: 0, Notes: "AWS macOS Catalina (10.15) VM under QEMU", SSHUsername: "gopher", HermeticReverse: true, GoogleReverse: true, }, "host-darwin-amd64-11-aws": { IsReverse: true, ExpectNum: 0, Notes: "AWS macOS Big Sur (11) VM under QEMU", SSHUsername: "gopher", HermeticReverse: true, GoogleReverse: true, }, "host-darwin-amd64-12-aws": { IsReverse: true, ExpectNum: 0, Notes: "AWS macOS Monterey (12) VM under QEMU", SSHUsername: "gopher", HermeticReverse: true, GoogleReverse: true, }, "host-darwin-amd64-13-aws": { IsReverse: true, ExpectNum: 0, Notes: "AWS macOS Ventura (13) VM under QEMU", SSHUsername: "gopher", HermeticReverse: true, GoogleReverse: true, }, "host-darwin-arm64-11": { IsReverse: true, Notes: "macOS Big Sur (11) ARM64 (M1) on Mac minis in a Google office", ExpectNum: 0, SSHUsername: "gopher", GoogleReverse: true, }, "host-darwin-arm64-12": { IsReverse: true, ExpectNum: 0, Notes: "macOS Monterey (12) ARM64 (M1) on Mac minis in a Google office", SSHUsername: "gopher", GoogleReverse: true, }, "host-dragonfly-amd64-622": { Notes: "DragonFly BSD 6.2.2 on GCE, built from build/env/dragonfly-amd64", VMImage: "dragonfly-amd64-622", SSHUsername: "root", }, "host-freebsd-amd64-12_3": { VMImage: "freebsd-amd64-123-stable-20211230", Notes: "FreeBSD 12.3; GCE VM, built from build/env/freebsd-amd64", SSHUsername: "gopher", }, "host-freebsd-amd64-13_0": { VMImage: "freebsd-amd64-130-stable-20211230", Notes: "FreeBSD 13.0; GCE VM, built from build/env/freebsd-amd64", SSHUsername: "gopher", }, "host-freebsd-arm-paulzhol": { IsReverse: true, ExpectNum: 1, Notes: "Raspberry Pi 3 Model B, FreeBSD 13.1-RELEASE with SCHED_4BSD", Owners: []*gophers.Person{gh("paulzhol")}, }, "host-freebsd-arm64-dmgk": { IsReverse: true, ExpectNum: 1, Notes: "AWS EC2 a1.large 2 vCPU 4GiB RAM, FreeBSD 12.1-STABLE", Owners: []*gophers.Person{gh("dmgk")}, }, "host-freebsd-riscv64-unmatched": { IsReverse: true, ExpectNum: 1, Notes: "SiFive HiFive Unmatched RISC-V board. 16 GB RAM. FreeBSD 13.1-RELEASE", Owners: []*gophers.Person{gh("mengzhuo")}, GoBootstrap: "none", // contains filtered or unexported fields }, "host-illumos-amd64-jclulow": { Notes: "SmartOS base64@19.1.0 zone", Owners: []*gophers.Person{gh("jclulow")}, IsReverse: true, ExpectNum: 1, SSHUsername: "gobuild", }, "host-ios-arm64-corellium-ios": { Notes: "Virtual iOS devices hosted by Zenly on Corellium; see issues 31722 and 40523", Owners: []*gophers.Person{gh("steeve"), gh("changkun")}, IsReverse: true, ExpectNum: 3, GoBootstrap: "none", // contains filtered or unexported fields }, "host-linux-amd64-alpine": { Notes: "Alpine container", ContainerImage: "linux-x86-alpine:latest", SSHUsername: "root", }, "host-linux-amd64-androidemu": { Notes: "Debian Bullseye w/ Android SDK + emulator (use nested virt)", ContainerImage: "android-amd64-emu:bff27c0c9263", KonletVMImage: "android-amd64-emu-bullseye", NestedVirt: true, SSHUsername: "root", }, "host-linux-amd64-bookworm": { Notes: "Debian Bookworm", ContainerImage: "linux-x86-bookworm:latest", SSHUsername: "root", }, "host-linux-amd64-bullseye": { Notes: "Debian Bullseye", ContainerImage: "linux-x86-bullseye:latest", SSHUsername: "root", }, "host-linux-amd64-bullseye-vmx": { Notes: "Debian Bullseye w/ Nested Virtualization (VMX CPU bit) enabled", ContainerImage: "linux-x86-bullseye:latest", NestedVirt: true, SSHUsername: "root", }, "host-linux-amd64-buster": { Notes: "Debian Buster", ContainerImage: "linux-x86-buster:latest", SSHUsername: "root", }, "host-linux-amd64-clang": { Notes: "Container with clang.", ContainerImage: "linux-x86-clang:latest", SSHUsername: "root", }, "host-linux-amd64-fedora": { Notes: "Fedora 30", ContainerImage: "linux-x86-fedora:latest", SSHUsername: "root", }, "host-linux-amd64-js-wasm-node18": { Notes: "Container with Node.js 18 for testing js/wasm.", ContainerImage: "js-wasm-node18:latest", SSHUsername: "root", }, "host-linux-amd64-localdev": { IsReverse: true, ExpectNum: 0, Notes: "for localhost development of buildlets/gomote/coordinator only", SSHUsername: os.Getenv("USER"), }, "host-linux-amd64-perf": { Notes: "Cascade Lake performance testing machines", ContainerImage: "linux-x86-bullseye:latest", SSHUsername: "root", CustomDeleteTimeout: 12 * time.Hour, // contains filtered or unexported fields }, "host-linux-amd64-s390x-cross": { Notes: "Container with s390x cross-compiler.", ContainerImage: "linux-s390x-cross:latest", }, "host-linux-amd64-sid": { Notes: "Debian sid, updated occasionally.", ContainerImage: "linux-x86-sid:latest", SSHUsername: "root", }, "host-linux-amd64-wasip1-wasm-wasmedge": { Notes: "Container with wasmedge for testing wasip1/wasm.", ContainerImage: "wasip1-wasm-wasmedge:latest", SSHUsername: "root", }, "host-linux-amd64-wasip1-wasm-wasmer": { Notes: "Container with wasmer for testing wasip1/wasm.", ContainerImage: "wasip1-wasm-wasmer:latest", SSHUsername: "root", }, "host-linux-amd64-wasip1-wasm-wasmtime": { Notes: "Container with wasmtime for testing wasip1/wasm.", ContainerImage: "wasip1-wasm-wasmtime:latest", SSHUsername: "root", }, "host-linux-amd64-wasip1-wasm-wazero": { Notes: "Container with Wazero for testing wasip1/wasm.", ContainerImage: "wasip1-wasm-wazero:latest", SSHUsername: "root", }, "host-linux-amd64-wsl": { Notes: "Windows 10 WSL2 Ubuntu", Owners: []*gophers.Person{gh("mengzhuo")}, IsReverse: true, ExpectNum: 2, }, "host-linux-arm-aws": { Notes: "Debian Buster, EC2 arm instance. See x/build/env/linux-arm/aws", VMImage: "ami-07409163bccd5ac4d", ContainerImage: "gobuilder-arm-aws:latest", IsEC2: true, SSHUsername: "root", // contains filtered or unexported fields }, "host-linux-arm64-bullseye": { Notes: "Debian Bullseye", ContainerImage: "linux-arm64-bullseye:latest", SSHUsername: "root", // contains filtered or unexported fields }, "host-linux-arm64-bullseye-high-disk": { Notes: "Debian Bullseye, larger boot disk size", ContainerImage: "linux-arm64-bullseye:latest", SSHUsername: "root", RootDriveSizeGB: 20, // contains filtered or unexported fields }, "host-linux-loong64-3a5000": { Notes: "Loongson 3A5000 Box hosted by Loongson; loong64 is the short name of LoongArch 64 bit version", Owners: []*gophers.Person{gh("abner-chenc")}, IsReverse: true, ExpectNum: 5, GoBootstrap: "none", // contains filtered or unexported fields }, "host-linux-mips64-rtrk": { Notes: "cavium,rhino_utm8 board hosted at RT-RK.com; quad-core cpu, 8GB of ram and 240GB ssd disks.", Owners: []*gophers.Person{gh("nrakovic")}, IsReverse: true, ExpectNum: 1, }, "host-linux-mips64le-rtrk": { Notes: "cavium,rhino_utm8 board hosted at RT-RK.com; quad-core cpu, 8GB of ram and 240GB ssd disks.", Owners: []*gophers.Person{gh("nrakovic")}, IsReverse: true, ExpectNum: 1, }, "host-linux-ppc64-sid": { Notes: "Debian sid; run by Go team on osuosl.org", Owners: []*gophers.Person{gh("pmur")}, IsReverse: true, ExpectNum: 5, SSHUsername: "root", HermeticReverse: true, }, "host-linux-ppc64-sid-power10": { Notes: "debian sid; run by Go team on osuosl.org; see x/build/env/linux-ppc64le/osuosl", Owners: []*gophers.Person{gh("pmur")}, IsReverse: true, ExpectNum: 5, SSHUsername: "root", HermeticReverse: true, // contains filtered or unexported fields }, "host-linux-ppc64le-osu": { Notes: "Ubuntu 20.04; run by Go team on osuosl.org; see x/build/env/linux-ppc64le/osuosl", Owners: []*gophers.Person{gh("pmur")}, IsReverse: true, ExpectNum: 5, SSHUsername: "root", HermeticReverse: true, }, "host-linux-ppc64le-power10-osu": { Notes: "Ubuntu 22.04; run by Go team on osuosl.org; see x/build/env/linux-ppc64le/osuosl", Owners: []*gophers.Person{gh("pmur")}, IsReverse: true, SSHUsername: "root", HermeticReverse: true, // contains filtered or unexported fields }, "host-linux-ppc64le-power9-osu": { Notes: "Ubuntu 20.04; run by Go team on osuosl.org; see x/build/env/linux-ppc64le/osuosl", Owners: []*gophers.Person{gh("pmur")}, IsReverse: true, SSHUsername: "root", HermeticReverse: true, // contains filtered or unexported fields }, "host-linux-riscv64-joelsing": { Notes: "SiFive HiFive Unleashed RISC-V board. 8 GB RAM, 4 cores.", IsReverse: true, ExpectNum: 1, Owners: []*gophers.Person{gh("4a6f656c")}, }, "host-linux-riscv64-unmatched": { Notes: "SiFive HiFive Unmatched RISC-V board. 16 GB RAM, 4 cores.", IsReverse: true, ExpectNum: 2, Owners: []*gophers.Person{gh("mengzhuo")}, }, "host-linux-s390x": { Notes: "run by IBM", Owners: []*gophers.Person{gh("Vishwanatha-HD"), gh("srinivas-pokala")}, IsReverse: true, ExpectNum: 2, }, "host-netbsd-386-9_3": { VMImage: "netbsd-i386-9-3-202211120320", Notes: "NetBSD 9.3; GCE VM is built from script in build/env/netbsd-386", SSHUsername: "root", // contains filtered or unexported fields }, "host-netbsd-amd64-9_3": { VMImage: "netbsd-amd64-9-3-202211120320v2", Notes: "NetBSD 9.3; GCE VM is built from script in build/env/netbsd-amd64", SSHUsername: "root", // contains filtered or unexported fields }, "host-netbsd-arm-bsiegert": { IsReverse: true, ExpectNum: 0, Owners: []*gophers.Person{gh("bsiegert")}, }, "host-netbsd-arm64-bsiegert": { IsReverse: true, ExpectNum: 0, Owners: []*gophers.Person{gh("bsiegert")}, }, "host-openbsd-386-72": { VMImage: "openbsd-386-72", Notes: "OpenBSD 7.2; GCE VM, built from build/env/openbsd-386", SSHUsername: "gopher", // contains filtered or unexported fields }, "host-openbsd-amd64-72": { VMImage: "openbsd-amd64-72", Notes: "OpenBSD 7.2; GCE VM, built from build/env/openbsd-amd64", SSHUsername: "gopher", // contains filtered or unexported fields }, "host-openbsd-arm-joelsing": { IsReverse: true, ExpectNum: 1, Owners: []*gophers.Person{gh("4a6f656c")}, }, "host-openbsd-arm64-joelsing": { IsReverse: true, ExpectNum: 1, Owners: []*gophers.Person{gh("4a6f656c")}, }, "host-openbsd-mips64-joelsing": { IsReverse: true, ExpectNum: 1, Owners: []*gophers.Person{gh("4a6f656c")}, }, "host-openbsd-ppc64-n2vi": { IsReverse: true, ExpectNum: 1, Owners: []*gophers.Person{gh("n2vi")}, Notes: "TalosII T2P9D01 (dual Power9 32GB) OpenBSD-current", GoBootstrap: "none", // contains filtered or unexported fields }, "host-openbsd-riscv64-joelsing": { IsReverse: true, ExpectNum: 1, Owners: []*gophers.Person{gh("4a6f656c")}, GoBootstrap: "none", // contains filtered or unexported fields }, "host-plan9-386-0intro": { IsReverse: true, ExpectNum: 1, Notes: "QEMU VM, Plan 9 from Bell Labs", Owners: []*gophers.Person{gh("0intro")}, }, "host-plan9-386-gce": { VMImage: "plan9-386-v7", Notes: "Plan 9 from 0intro; GCE VM, built from build/env/plan9-386", // contains filtered or unexported fields }, "host-plan9-amd64-0intro": { IsReverse: true, ExpectNum: 1, Notes: "QEMU VM, Plan 9 from Bell Labs, 9k kernel", Owners: []*gophers.Person{gh("0intro")}, }, "host-plan9-arm-0intro": { IsReverse: true, ExpectNum: 1, Notes: "Raspberry Pi 3 Model B, Plan 9 from Bell Labs", Owners: []*gophers.Person{gh("0intro")}, }, "host-solaris-oracle-amd64-oraclerel": { Notes: "Oracle Solaris amd64 Release System", HostArch: "solaris-amd64", Owners: []*gophers.Person{gh("rorth")}, IsReverse: true, ExpectNum: 1, }, "host-windows-amd64-2016": { VMImage: "windows-amd64-server-2016-v9", SSHUsername: "gopher", }, "host-windows-amd64-2016-big": { VMImage: "windows-amd64-server-2016-v9", SSHUsername: "gopher", // contains filtered or unexported fields }, "host-windows-arm64-zx2c4": { IsReverse: true, ExpectNum: 0, Owners: []*gophers.Person{gh("zx2c4")}, }, "host-windows11-arm64-azure": { Notes: "Azure windows 11 arm64 VMs", HostArch: "windows-arm64", IsReverse: true, ExpectNum: 0, }, }
Hosts contains the names and configs of all the types of buildlets. They can be VMs, containers, or dedicated machines.
Please keep table sorted by map key.
Functions ¶
func GorootFinal ¶
GorootFinal returns the default install location for releases for the given GOOS.
Types ¶
type BuildConfig ¶
type BuildConfig struct { // Name is the unique name of the builder, in the form of // "GOOS-GOARCH" or "GOOS-GOARCH-suffix". For example, // "darwin-386", "linux-386-387", "linux-amd64-race". Some // suffixes are well-known and carry special meaning, such as // "-race". Name string // HostType is the required key into the Hosts map, describing // the type of host this build will run on. // For example, "host-linux-amd64-bullseye". HostType string // KnownIssues is a slice of non-zero go.dev/issue/nnn numbers for a // builder that may fail due to a known issue, such as because it is a new // builder still in development/testing, or because the feature // or port that it's meant to test hasn't been added yet, etc. // // A non-zero value here means that failures on this builder should not // be considered a serious regression and don't need investigation beyond // what is already in scope of the listed issues. KnownIssues []int Notes string // notes for humans // CompileOnly indicates that tests should only be compiled but not run. // Note that this will not prevent the test binary from running for tests // for the main Go repo, so this flag is insufficient for disabling // tests in a cross-compiled setting. See #58297. // // For subrepo tests however, this flag is sufficient to ensure that test // binaries will only be built, not executed. CompileOnly bool // FlakyNet indicates that network tests are flaky on this builder. // The builder will try to run the tests anyway, but will ignore some of the // failures. FlakyNet bool // RunBench enables benchmarking of the toolchain using x/benchmarks. // This only applies when building x/benchmarks. RunBench bool // MinimumGoVersion optionally specifies the minimum Go version // this builder is allowed to use. It can be useful for skipping // builders that are too new and no longer support some supported // Go versions. It doesn't need to be set for builders that support // all supported Go versions. // // Note: This field currently has effect on trybot runs only. // // TODO: unexport this and make buildsRepoAtAll return false on too-old // of repos. The callers in coordinator will need updating. MinimumGoVersion types.MajorMinor // SkipSnapshot, if true, means to not fetch a tarball // snapshot of the world post-make.bash from the buildlet (and // thus to not write it to Google Cloud Storage). This is // incompatible with sharded tests, and should only be used // for very slow builders or networks, unable to transfer // the tarball in under ~5 minutes. SkipSnapshot bool // StopAfterMake causes the build to stop after the make // script completes, returning its result as the result of the // whole build. It does not run or compile any of the tests, // nor does it write a snapshot of the world to cloud // storage. StopAfterMake bool // InstallRacePackages controls which packages to "go install // -race <pkgs>" after running make.bash (or equivalent). If // the builder ends in "-race", the default if non-nil is just // "std". InstallRacePackages []string // GoDeps is a list of of git sha1 commits that must be in the // commit to be tested's history. If absent, this builder is // not run for that commit. GoDeps []string TestHostConf *HostConfig // override HostConfig for testing, at least for now // contains filtered or unexported fields }
A BuildConfig describes how to run a builder.
func TryBuildersForProject ¶
func TryBuildersForProject(proj, branch, goBranch string) []*BuildConfig
TryBuildersForProject returns the builders that should run as part of a TryBot set for the given project. The project argument is of the form "go", "net", "sys", etc. The branch is the branch of that project ("master", "release-branch.go1.12", etc) The goBranch is the branch of Go to use. If proj == "go", then branch == goBranch.
func (*BuildConfig) AllScript ¶
func (c *BuildConfig) AllScript() string
AllScript returns the relative path to the operating system's script to do the build and run its standard set of tests. Example values are "src/all.bash", "src/all.bat", "src/all.rc".
func (*BuildConfig) AllScriptArgs ¶
func (c *BuildConfig) AllScriptArgs() []string
AllScriptArgs returns the set of arguments that should be passed to the all.bash-equivalent script. Usually empty.
func (*BuildConfig) BuildsRepoPostSubmit ¶
func (c *BuildConfig) BuildsRepoPostSubmit(repo, branch, goBranch string) bool
BuildsRepoPostSubmit reports whether the build configuration type c should build the given repo ("go", "net", etc) and branch ("master", "release-branch.go1.12") as a post-submit build that shows up on https://build.golang.org/.
func (*BuildConfig) BuildsRepoTryBot ¶
func (c *BuildConfig) BuildsRepoTryBot(repo, branch, goBranch string) bool
BuildsRepoTryBot reports whether the build configuration type c should build the given repo ("go", "net", etc) and branch ("master", "release-branch.go1.12") as a trybot.
func (*BuildConfig) DistTestsExecTimeout ¶
func (c *BuildConfig) DistTestsExecTimeout(distTests []string) time.Duration
DistTestsExecTimeout returns how long the coordinator should wait for a cmd/dist test execution to run the provided dist test names.
The dist test names are expressed in the Go 1.20 format, even for newer Go versions. See go120DistTestNames.
func (*BuildConfig) Env ¶
func (c *BuildConfig) Env() []string
Env returns the environment variables this builder should run with.
func (*BuildConfig) FilePathJoin ¶
func (c *BuildConfig) FilePathJoin(x ...string) string
FilePathJoin is mostly like filepath.Join (without the cleaning) except it uses the path separator of c.GOOS instead of the host system's.
func (*BuildConfig) GOARCH ¶
func (c *BuildConfig) GOARCH() string
func (*BuildConfig) GOOS ¶
func (c *BuildConfig) GOOS() string
func (*BuildConfig) GoBootstrapURL ¶
func (c *BuildConfig) GoBootstrapURL(e *buildenv.Environment) string
GoBootstrapURL returns the URL of a built Go 1.4+ tar.gz for the build configuration type c, or empty string if there isn't one.
func (*BuildConfig) GoInstallRacePackages ¶
func (c *BuildConfig) GoInstallRacePackages() []string
func (*BuildConfig) GoTestTimeoutScale ¶
func (c *BuildConfig) GoTestTimeoutScale() int
GoTestTimeoutScale returns this builder's GO_TEST_TIMEOUT_SCALE value, or 1.
func (*BuildConfig) HostConfig ¶
func (c *BuildConfig) HostConfig() *HostConfig
HostConfig returns the host configuration of c.
func (*BuildConfig) IsContainer ¶
func (c *BuildConfig) IsContainer() bool
func (*BuildConfig) IsCrossCompileOnly ¶
func (c *BuildConfig) IsCrossCompileOnly() bool
IsCrossCompileOnly indicates that this builder configuration cross-compiles for some platform other than the host, and that it does not run any tests.
TODO(#58297): Remove this and make c.CompileOnly sufficient.
func (*BuildConfig) IsGCE ¶
func (c *BuildConfig) IsGCE() bool
func (*BuildConfig) IsLongTest ¶
func (c *BuildConfig) IsLongTest() bool
IsLongTest reports whether this is a longtest builder. A longtest builder runs tests without the -short flag.
A builder is considered to be a longtest builder if and only if it one of the components of the builder name is "longtest" (components are delimited by "-").
func (*BuildConfig) IsRace ¶
func (c *BuildConfig) IsRace() bool
IsRace reports whether this is a race builder. A race builder runs tests without the -short flag.
A builder is considered to be a race builder if and only if it one of the components of the builder name is "race" (components are delimited by "-").
func (*BuildConfig) IsRestricted ¶
func (c *BuildConfig) IsRestricted() bool
func (*BuildConfig) IsReverse ¶
func (c *BuildConfig) IsReverse() bool
func (*BuildConfig) IsTryOnly ¶
func (c *BuildConfig) IsTryOnly() bool
func (*BuildConfig) IsVM ¶
func (c *BuildConfig) IsVM() bool
func (*BuildConfig) MakeScript ¶
func (c *BuildConfig) MakeScript() string
MakeScript returns the relative path to the operating system's script to do the build. Example values are "src/make.bash", "src/make.bat", "src/make.rc".
func (*BuildConfig) MakeScriptArgs ¶
func (c *BuildConfig) MakeScriptArgs() []string
MakeScriptArgs returns the set of arguments that should be passed to the make.bash-equivalent script. Usually empty.
func (*BuildConfig) MatchesSlowBotTerm ¶
func (c *BuildConfig) MatchesSlowBotTerm(term string) bool
MatchesSlowBotTerm reports whether some provided term from a TRY=... comment on a Run-TryBot+1 vote on Gerrit should match this build config.
func (*BuildConfig) NumTestHelpers ¶
func (c *BuildConfig) NumTestHelpers(isTry bool) int
NumTestHelpers reports how many additional buildlets past the first one to help out with sharded tests.
isTry specifies whether it's for a pre-submit test run (a TryBot or SlowBot) where speed matters more.
func (*BuildConfig) OutboundNetworkAllowed ¶
func (c *BuildConfig) OutboundNetworkAllowed() bool
OutboundNetworkAllowed reports whether this builder should be allowed to make outbound network requests. This is only enforced on some builders. (Currently most Linux ones)
func (*BuildConfig) PrivateGoProxy ¶
func (c *BuildConfig) PrivateGoProxy() bool
PrivateGoProxy for builder has it's own Go proxy instead of proxy.golang.org
func (*BuildConfig) ShouldRunDistTest ¶
func (c *BuildConfig) ShouldRunDistTest(distTest string, isNormalTry bool) bool
ShouldRunDistTest reports whether the named cmd/dist test should be run for this build config. The dist test name is expressed in the Go 1.20 format, even for newer Go versions. See go120DistTestNames.
The isNormalTry parameter specifies whether this is for a normal TryBot build. It's false for SlowBot and post-submit builds.
In general, this returns true. When in normal trybot mode, some slow portable tests are only run on the fastest builder.
It's possible for individual builders to adjust this policy for their needs, though it is preferable to handle that by adjusting test skips in the tests instead of here. That has the advantage of being easier to maintain over time since both the test and its skips would be in one repository rather than two, and having effect when tests are run locally by developers.
func (*BuildConfig) TargetArch ¶
func (c *BuildConfig) TargetArch() string
TargetArch returns the build target architecture.
It starts from the host arch, then applies any environment variables that would override either GOOS, GOARCH, or GOARM.
type CosArch ¶
type CosArch string
CosArch defines the different COS images types used.
const ( // TODO(59418,59419): The kernel in COS release 105 likely breaks ASAN and MSAN for both // gcc and clang. Pin to 101, the previous release. CosArchAMD64 CosArch = "cos-101-lts" // COS image for AMD64 architecture CosArchARM64 = "cos-arm64-stable" // COS image for ARM64 architecture )
type HostConfig ¶
type HostConfig struct { // HostType is the unique name of this host config. It is also // the key in the Hosts map. HostType string // HostArch is a string identifying the host architecture, to decide which binaries to run on it. // If unset, it is derived in func init from the HostType // (for example, host-linux-amd64-foo has HostArch "linux-amd64"). // For clarity, the HostArch for 32-bit arm always ends in -5 or -7 // to specify the GOARM value; implicit HostArch always use -7. // (This specificity is necessary because there is no one value that // works on all 32-bit ARM chips on non-Linux operating systems.) // // If set explicitly, HostArch should have the form "GOOS-GOARCH-suffix", // where suffix is the GO$GOARCH setting (that is, GOARM for GOARCH=arm). // For example "openbsd-arm-5" for GOOS=openbsd GOARCH=arm GOARM=5. // // (See the BuildletBinaryURL and GoBootstrapURL methods.) HostArch string // GoBootstrap is the version of Go to use for bootstrap. // If unset, it is set in func init to GoBootstrap (the global constant). // // If GoBootstrap is set to "none", it means this buildlet is not given a new bootstrap // toolchain for each build, typically because it cannot download from // storage.googleapis.com. // // For bootstrap versions Go 1.21.0 and newer, // bootstrap Go builds for Windows (only) with that version must be in the buildlet bucket, // usually uploaded by 'genbootstrap -upload windows-*'. // However, as of 2024-08-16 all existing coordinator builders for Windows have migrated // to LUCI, so nothing needs to be done for Windows after all. // // (See the GoBootstrapURL method.) GoBootstrap string // Exactly 1 of these must be set (with the exception of EC2 instances). // An EC2 instance may run a container inside a VM. In that case, a VMImage // and ContainerImage will both be set. VMImage string // e.g. "openbsd-amd64-60" ContainerImage string // e.g. "linux-buildlet-std:latest" (suffix after "gcr.io/<PROJ>/") IsReverse bool // if true, only use the reverse buildlet pool RegularDisk bool // if true, use spinning disk instead of SSD MinCPUPlatform string // optional. e2 instances are not supported. see https://cloud.google.com/compute/docs/instances/specify-min-cpu-platform. // EC2 options IsEC2 bool // if true, the instance is configured to run on EC2 // GCE or EC2 options: // // CustomDeleteTimeout is an optional custom timeout after which the VM is forcibly destroyed and the build is retried. // Zero duration defers decision to internal/coordinator/pool package, which is enough for longtest post-submit builds. // (This is generally an internal implementation detail, currently left behind only for the -perf builder.) CustomDeleteTimeout time.Duration // Reverse options ExpectNum int // expected number of reverse buildlets of this type HermeticReverse bool // whether reverse buildlet has fresh env per conn GoogleReverse bool // whether this reverse builder is owned by Google // Container image options, if ContainerImage != "": NestedVirt bool // container requires VMX nested virtualization. e2 and n2d instances are not supported. KonletVMImage string // optional VM image (containing konlet) to use instead of default Owners []*gophers.Person // owners; empty means golang-dev Notes string // notes for humans SSHUsername string // username to ssh as, empty means not supported RootDriveSizeGB int64 // optional, GCE instance root size in base-2 GB. Default: default size for instance type. // contains filtered or unexported fields }
A HostConfig describes the available ways to obtain buildlets of different types. Some host configs can serve multiple builders. For example, a host config of "host-linux-amd64-bullseye" can serve linux-amd64, linux-amd64-race, linux-386, linux-386-387, etc.
func (*HostConfig) BuildletBinaryURL ¶
func (c *HostConfig) BuildletBinaryURL(e *buildenv.Environment) string
BuildletBinaryURL returns the public URL of this builder's buildlet.
func (*HostConfig) ContainerVMImage ¶
func (c *HostConfig) ContainerVMImage() string
ContainerVMImage returns the base VM name (not the fully qualified URL resource name of the VM) that starts the konlet program that pulls & runs a container. The empty string means that no particular VM image is required and the caller can run this container in any host.
This method is only applicable when c.IsContainer() is true.
func (*HostConfig) CosArchitecture ¶
func (hc *HostConfig) CosArchitecture() CosArch
CosArchitecture returns the COS architecture to use with the host. The default is CosArchAMD64.
func (*HostConfig) IsContainer ¶
func (c *HostConfig) IsContainer() bool
func (*HostConfig) IsGoogle ¶
func (c *HostConfig) IsGoogle() bool
IsGoogle reports whether this host is operated by Google, implying that we trust it to be secure and available.
func (*HostConfig) IsHermetic ¶
func (c *HostConfig) IsHermetic() bool
IsHermetic reports whether this host config gets a fresh environment (including /usr, /var, etc) for each execution. This is true for VMs, GKE, and reverse buildlets running their containers running in Docker, but false on some reverse buildlets.
func (*HostConfig) IsVM ¶
func (c *HostConfig) IsVM() bool
IsVM reports whether the instance running the job is ultimately a VM. Hosts where a VM is used only to initiate a container are considered a container, not a VM. EC2 instances may be configured to run in containers that are running on custom AMIs.
func (*HostConfig) MachineType ¶
func (c *HostConfig) MachineType() string
MachineType returns the AWS or GCE machine type to use for this builder.
func (*HostConfig) PoolName ¶
func (c *HostConfig) PoolName() string
IsEC2 returns true if the machine type is an EC2 arm64 type. PoolName returns a short summary of the builder's host type for the https://farmer.golang.org/builders page.