The Go build system supports “SlowBots”, which are a way to configure the TryBots (pre-submit builders) to add additional builders into the set of build configurations that TryBots normally run.
Normally TryBots only run things that are fast and elastically provisioned. That is, TryBots run tests for ports that are available on Google Cloud where we have tons of capacity and can spin up many VMs at will, sharding out test execution widely so the TryBots complete in 5-10 minutes.
But sometimes that‘s not enough. SlowBots let you say that you’re cool waiting a long time until some specific set of builders becomes available. (There is often only one physical machine for some configurations, and often backlogged with work, and that builder might be slow too.)
Click “Choose Tryjobs” under the commit message and a dialog will appear.
The dialog will ask you to click checkboxes for the builds you would like to run against your CL.
Select the builds you would like to run, and click the “Add” button in the dialog. Then, set the Commit-Queue
= +1
label as usual. This will add builders to the tryjob set in an advisory role.
To block submission on new tryjobs reference them in the commit message using the Cq-Include-Trybots
line generated in the “Choose Tryjobs” dialog. Once the commit message is updated, set the Commit-Queue
= +1
label again. The Cq-Include-Trybots
line should be right next to the Change-Id
line without whitespace, like so:
Each build's name roughly indicates what it will do, but below is some more detail:
x_$REPO
where $REPO
is some module like golang.org/x/$REPO
(such as x_review-gotip-linux-amd64
). This build will run tests in that repository. If the CL is for the main Go repository, it will test the current HEAD
of $REPO
against that version of Go.x_$REPO
(like gotip-linux-amd64
), they are testing the main Go repository (including the standard library and toolchain).gotip
or go1.21
. The former builds against the master
branch of the main Go repository, while the latter builds against the HEAD
of the corresponding release branch. If the CL is for $REPO
, then $REPO
's tests will be run against HEAD
of the corresponding main Go repository branch.GOOS
and GOARCH
) to test against.gotip-linux-amd64-longtest-race
. Below is a list of some of the modifications and what they mean:longtest
runs the full suite of tests for the corresponding platform and repository.race
runs tests under the race detector.misccompile
will cross-compile all packages (including test packages) for all supported platforms as a smoke test. The platform for these builds is just the “host” platform for the cross-compilation.There are currently a lot more possible builds listed than what's actually supported or valid.
Here are some general guidelines for which SlowBots will work as expected:
golang.org/x/$REPO
repositories, then all the x_$REPO-.*
builders will work as expected. Other builds will fail.master
branch, then every build with a name containing gotip
will work as expected (x_tools-gotip-linux-amd64
, gotip-windows-amd64
, etc.). If you have a CL for the release-branch.go1.21
branch, then every build with a name containing go1.21
will work as expected (x_tools-go1.21-linux-amd64
, go1.21-windows-amd64
, etc.).TODO: Apply these guidelines as filters automatically.
We're currently in the middle of a migration to a new open-source CI system created by the Chromium project called LUCI. The above instructions describe how to run SlowBots on LUCI, but not all ports have been migrated to LUCI yet. In the interim, these ports are still available on the old infrastructure. Below are instructions on how to use SlowBots on the old infrastructure.
Run-TryBot
= +1
instead of Commit-Queue
= +1
.TRY=ppc64le, freebsd, netbsd-386, ios, linux-arm64-packet
... where the terms after TRY=
are either:
GOOS
(picks best one)GOARCH
(picks best one)GOOS-GOARCH
(picks best one)specific-builder-name
(you specify it explicitly by its exact name; see the full list at https://farmer.golang.org/builders)For the main Go repository, the terms after TRY=
can also be:
x/repo
, where repo
is one of the golang.org/x repositories whose tests should be executed. This runs a default builder for the given repo (linux-amd64
as of writing).x/repo@builder
, where repo
is as above, and builder
is a builder name from the builder list. This runs the specified builder for the given repo. For example, x/sys@linux-arm64-aws
.When running TryBots again later, the most recent TRY=
comment on the current patchset is used. To turn it off set TRY=
with an empty string after the equals sign. If the current patchset doesn't have a TRY=
comment, the most recent TRY=
comment is used.
TRY=
comments are ignored if they're not on the same comment that started the TryBotsgit-codereview mail
tool‘s -trybot
flag doesn’t support this yet, so use the web UI.Run-TryBot+1
vote and re-doing it won‘t re-start the TryBot set, so it won’t look at your TRY= line, until the next run when it‘s done. (But you’ll need to delete the TryBot-Result somehow: manually, rebasing, uploading new version)TRY=
token, it‘ll just ignore it and won’t report an error.all
alias. That’s kinda intentional, to prevent overuse that might cause the SlowBots to get even slower for everybody. But we might add it later anyway. See golang.org/issue/34501#issuecomment-544585711.