Skip to content

Commit 7c72e02

Browse files
Update buildbot doc
1 parent b3bbf54 commit 7c72e02

File tree

1 file changed

+64
-58
lines changed

1 file changed

+64
-58
lines changed

testing/buildbots.rst

Lines changed: 64 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ branches <devcycle>`, Python has a set of dedicated machines (called *buildbots*
1111
or *build workers*) used for continuous integration. They span a number of
1212
hardware/operating system combinations. Furthermore, each machine hosts
1313
several *builders*, one per active branch: when a new change is pushed
14-
to this branch on the public `GitHub repository <https://github.com/python/cpython>`__, all corresponding builders
15-
will schedule a new build to be run as soon as possible.
14+
to this branch on the public `GitHub repository <https://github.com/python/cpython>`__,
15+
all corresponding builders will schedule a new build to be run as soon as possible.
1616

1717
The build steps run by the buildbots are the following:
1818

@@ -21,11 +21,12 @@ The build steps run by the buildbots are the following:
2121
* Run the test suite using :ref:`strenuous settings <strenuous_testing>`
2222
* Clean up the build tree
2323

24-
It is your responsibility, as a core developer, to check the automatic
25-
build results after you push a change to the repository. It is therefore
26-
important that you get acquainted with the way these results are presented,
24+
It is the responsibility of core team members to check the automatic
25+
build results after they push a change to the repository. It is therefore
26+
important that they are acquainted with the way these results are presented,
2727
and how various kinds of failures can be explained and diagnosed.
2828

29+
2930
In case of trouble
3031
==================
3132

@@ -36,6 +37,7 @@ need assistance with the buildbots, a good way to get help is to either:
3637
worker owners are subscribed; or
3738
* contact the release manager of the branch you have issues with.
3839

40+
3941
Buildbot failures on pull requests
4042
==================================
4143

@@ -48,6 +50,7 @@ after each commit. In particular, reference leaks builds take several hours to
4850
complete so they are done periodically. This is why it's important for you to
4951
be able to check the results yourself, too.
5052

53+
5154
Triggering on pull requests
5255
===========================
5356

@@ -83,38 +86,30 @@ The ``!buildbot`` comment will also only run buildbots on the most recent
8386
commit. To trigger the buildbots again on a later commit, you will have to
8487
repeat the comment.
8588

89+
8690
Checking results of automatic builds
8791
====================================
8892

89-
There are three ways of visualizing recent build results:
90-
91-
* The Web interface for each branch at https://www.python.org/dev/buildbot/,
92-
where the so-called "waterfall" view presents a vertical rundown of recent
93-
builds for each builder. When interested in one build, you'll have to
94-
click on it to know which commits it corresponds to. Note that
95-
the buildbot web pages are often slow to load, be patient.
96-
97-
* The command-line ``bbreport.py`` client, which you can get from
98-
https://code.google.com/archive/p/bbreport. Installing it is trivial: just add
99-
the directory containing ``bbreport.py`` to your system path so that
100-
you can run it from any filesystem location. For example, if you want
101-
to display the latest build results on the development ("main") branch,
102-
type::
93+
The Web interface at https://buildbot.python.org/#/ has several ways of
94+
visualizing recent build results:
10395

104-
bbreport.py -q 3.x
96+
* A `Waterfall View <https://buildbot.python.org/#/waterfall>`_
97+
that presents a vertical rundown of recent builds for each builder.
98+
When interested in one build, you'll have to
99+
click on it to know which commits it corresponds to.
105100

106-
* The buildbot "console" interface at https://buildbot.python.org/all/
107-
This works best on a wide, high resolution
101+
* A `Console View <https://buildbot.python.org/#/console>`_,
102+
this works best on a wide, high resolution
108103
monitor. Clicking on the colored circles will allow you to open a new page
109104
containing whatever information about that particular build is of interest to
110105
you. You can also access builder information by clicking on the builder
111106
status bubbles in the top line.
112107

113-
If you like IRC, having an IRC client open to the #python-dev-notifs channel on
114-
irc.libera.chat is useful. Any time a builder changes state (last build
115-
passed and this one didn't, or vice versa), a message is posted to the channel.
116-
Keeping an eye on the channel after pushing a commits is a simple way to get
117-
notified that there is something you should look in to.
108+
* A `Release Status Dashboard <https://buildbot.python.org/#/release_status>`_
109+
that shows the status of stable buildbots for each active branch,
110+
summarizing whether the builds are ready for release.
111+
112+
Note that the buildbot web pages are often slow to load, be patient.
118113

119114
Some buildbots are much faster than others. Over time, you will learn which
120115
ones produce the quickest results after a build, and which ones take the
@@ -124,20 +119,24 @@ Also, when several commits are pushed in a quick succession in the same
124119
branch, it often happens that a single build is scheduled for all these
125120
commits.
126121

122+
127123
Stability
128124
=========
129125

130-
A subset of the buildbots are marked "stable". They are taken into account
131-
when making a new release. The rule is that all stable builders must be free of
126+
A subset of the buildbots are marked as
127+
`"stable" <https://buildbot.python.org/#/builders?tags=%2Bstable>`_.
128+
They are taken into account when making a new release.
129+
The rule is that all stable builders must be free of
132130
persistent failures when the release is cut. It is absolutely **vital**
133-
that core developers fix any issue they introduce on the stable buildbots,
131+
that core team members fix any issue they introduce on the stable buildbots,
134132
as soon as possible.
135133

136134
This does not mean that other builders' test results can be taken lightly,
137135
either. Some of them are known for having platform-specific issues that
138136
prevent some tests from succeeding (or even terminating at all), but
139137
introducing additional failures should generally not be an option.
140138

139+
141140
Flags-dependent failures
142141
========================
143142

@@ -148,12 +147,13 @@ or to Python itself. To reproduce, make sure you use the same flags as the
148147
buildbots: they can be found out simply by clicking the **stdio** link for
149148
the failing build's tests. For example::
150149

151-
./python.exe -Wd -E -bb ./Lib/test/regrtest.py -uall -rwW
150+
./python.exe -W error -E -bb ./Lib/test/regrtest.py -uall -rwW
152151

153152
.. note::
154153
Running ``Lib/test/regrtest.py`` is exactly equivalent to running
155154
``-m test``.
156155

156+
157157
Ordering-dependent failures
158158
===========================
159159

@@ -170,58 +170,64 @@ run, and check the beginning of the test output proper.
170170
Let's assume, for the sake of example, that the output starts with:
171171

172172
.. code-block:: none
173-
:emphasize-lines: 6
174-
175-
./python -Wd -E -bb Lib/test/regrtest.py -uall -rwW
176-
== CPython 3.3a0 (default:22ae2b002865, Mar 30 2011, 13:58:40) [GCC 4.4.5]
177-
== Linux-2.6.36-gentoo-r5-x86_64-AMD_Athlon-tm-_64_X2_Dual_Core_Processor_4400+-with-gentoo-1.12.14 little-endian
178-
== /home/buildbot/buildarea/3.x.ochtman-gentoo-amd64/build/build/test_python_29628
179-
Testing with flags: sys.flags(debug=0, inspect=0, interactive=0, optimize=0, dont_write_bytecode=0, no_user_site=0, no_site=0, ignore_environment=1, verbose=0, bytes_warning=2, quiet=0)
180-
Using random seed 2613169
181-
[ 1/353] test_augassign
182-
[ 2/353] test_functools
173+
:emphasize-lines: 9
174+
175+
./python -u -W error -bb -E -m test --slow-ci --timeout=2400 -j2 -u-cpu,-urlfetch,-network --junit-xml test-results.xml -j4 --dont-add-python-opts
176+
== CPython 3.15.0a6+ (heads/main:d625f7da33b, Feb 13 2026, 17:27:29) [GCC 12.2.0]
177+
== Linux-6.12.20+rpt-rpi-v8-aarch64-with-glibc2.36 little-endian
178+
== Python build: release
179+
== cwd: /home/stan/buildarea/3.x.stan-raspbian.nondebug/build/build/test_python_worker_181905æ
180+
== CPU count: 4
181+
== encodings: locale=ISO-8859-1 FS=utf-8
182+
== resources: all,-cpu,-network,-urlfetch
183+
Using random seed: 1000348774
184+
0:00:00 load avg: 3.34 Run 500 tests in parallel using 4 worker processes (timeout: 40 min, worker timeout: 45 min)
185+
0:00:01 load avg: 3.34 [ 1/500] test_colorsys passed
186+
0:00:01 load avg: 3.34 [ 2/500] test_float passed
183187
184188
You can reproduce the exact same order using::
185189

186-
./python -Wd -E -bb -m test -uall -rwW --randseed 2613169
190+
./python -W error -E -bb -m test -uall -rwW --randseed 1000348774
187191

188192
It will run the following sequence (trimmed for brevity):
189193

190194
.. code-block:: none
191195
192-
[ 1/353] test_augassign
193-
[ 2/353] test_functools
194-
[ 3/353] test_bool
195-
[ 4/353] test_contains
196-
[ 5/353] test_compileall
197-
[ 6/353] test_unicode
196+
[ 1/500] test_colorsys
197+
[ 2/500] test_float
198+
[ 3/500] test.test_io.test_memoryio
199+
[ 4/500] test_profile
200+
[ 5/500] test_picklebuffer
201+
[ 6/500] test_zipimport
202+
[ 7/500] test_devpoll
203+
...
198204
199205
If this is enough to reproduce the failure on your setup, you can then
200206
bisect the test sequence to look for the specific interference causing the
201207
failure. Copy and paste the test sequence in a text file, then use the
202208
``--fromfile`` (or ``-f``) option of the test runner to run the exact
203209
sequence recorded in that text file::
204210

205-
./python -Wd -E -bb -m test -uall -rwW --fromfile mytestsequence.txt
211+
./python -W error -E -bb -m test -uall -rwW --fromfile mytestsequence.txt
206212

207-
In the example sequence above, if ``test_unicode`` had failed, you would
213+
In the example sequence above, if ``test_zipimport`` had failed, you would
208214
first test the following sequence:
209215

210216
.. code-block:: none
211217
212-
[ 1/353] test_augassign
213-
[ 2/353] test_functools
214-
[ 3/353] test_bool
215-
[ 6/353] test_unicode
218+
[ 1/500] test_colorsys
219+
[ 2/500] test_float
220+
[ 3/500] test.test_io.test_memoryio
221+
[ 6/500] test_zipimport
216222
217223
And, if it succeeds, the following one instead (which, hopefully, shall
218224
fail):
219225

220226
.. code-block:: none
221227
222-
[ 4/353] test_contains
223-
[ 5/353] test_compileall
224-
[ 6/353] test_unicode
228+
[ 4/500] test_profile
229+
[ 5/500] test_picklebuffer
230+
[ 6/500] test_zipimport
225231
226232
Then, recursively, narrow down the search until you get a single pair of
227233
tests which triggers the failure. It is very rare that such an interference
@@ -243,7 +249,7 @@ not reach a perfect level of reproducibility. Some of them will sometimes
243249
display spurious failures, depending on various conditions. Here are common
244250
offenders:
245251

246-
* Network-related tests, such as ``test_poplib``, ``test_urllibnet``, etc.
252+
* Network-related tests, such as ``test_poplib``, ``test_urllibnet``, and so on.
247253
Their failures can stem from adverse network conditions, or imperfect
248254
thread synchronization in the test code, which often has to run a
249255
server in a separate thread.

0 commit comments

Comments
 (0)