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. A typical CL to the main Go repo usually wants builders starting with gotip-
. See below for more details about the options.
Once you select the builds you would like to run, there are two ways to trigger the test runs:
Cq-Include-Trybots
git footer displayed in the dialog to the last paragraph of the commit message. For CL sent via github, it is OK to appear anywhere in the description of github PR. Once a patch set with the updated commit message is uploaded, vote Commit-Queue+1
as usual. The additional builds are treated just like the default TryBots: failures will block submission and send email notifications, and the builds will automatically run on subsequent patch set (as long as the Cq-Include-Trybots
line remains). Note that the Cq-Include-Trybots
git footer will not be used if it's not in the last paragraph of the commit message. That is, it must be right next to the Change-Id
line without empty lines (see screenshot below).Commit-Queue+1
vote). These are completely one-off advisory builds only. Status and results will appear in the “Checks” section (seen screenshot below), but failing results will not block submission or send an email notification. These builds will not automatically run again when a new patch set is uploaded.As a reviewer, you cannot edit commit messages. If a CL you are reviewing should run SlowBots, we recommend the following workflow:
Cq-Include-Trybots
line from the dialog to the commit message.(2) will provide immediate feedback from the results of the tests without waiting for the owner to upload a new patch set, while (3) will ensure that the tests continue running on future patch sets and block submission.
Note: https://crbug.com/40287467 tracks improvements to this process in LUCI to reduce toil.
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.