blob: ad7eda67a4a0bad53c9ef4e512c98860212a9648 [file] [log] [blame]
David Spickettd90e09a2022-10-26 11:56:07 +01001LLVM Buildbot Monitor
2=====================
Renato Golin94cc1042016-04-26 11:02:23 +01003
David Spickettd90e09a2022-10-26 11:56:07 +01004This is to be left running on a server or desktop as monitoring for your buildbots.
5It purely reports the status of the builds. If you want hardware monitoring, look
6elsewhere.
Renato Golin94cc1042016-04-26 11:02:23 +01007
David Spickettd90e09a2022-10-26 11:56:07 +01008It supports Buildbot (as used by LLVM) and Buildkite (https://buildkite.com/, used by LLVM's
9libcxx project). It does not support LLVM Green Dragon (https://green.lab.llvm.org/green/).
Renato Golin662105b2016-06-10 12:47:43 +010010
David Spickettd90e09a2022-10-26 11:56:07 +010011Buildkite does require an API key to be available, see the script for how to do that
12and contact your Builkite org admin to get one.
Renato Golin662105b2016-06-10 12:47:43 +010013
David Spickettd90e09a2022-10-26 11:56:07 +010014Currently we have one monitor running at http://llvm.validation.linaro.org/.
15Bookmark this if you have a need to check bot status at a glance.
16
17JSON Format
18-----------
19
20The JSON file describes the bots we want to monitor and which master/build service
21they connect to.
22
23Buildbot JSON Format
24--------------------
Renato Golin662105b2016-06-10 12:47:43 +010025
26The base structure is a list of masters, which has a few properties and a list
David Spickettd90e09a2022-10-26 11:56:07 +010027of builder groups, which in turn also have some properties and a list of bots
28(which in Buildbot terms are actually called "Builders" but we ended up calling
29them bots here).
Renato Golin662105b2016-06-10 12:47:43 +010030
31Master properties:
32
David Spickettd90e09a2022-10-26 11:56:07 +010033 "name": Name of the master, which will appear as the section title.
34 "base_url": The base URL of the master, which will be used to make API calls.
35 For example for LLVM this might be "https://lab.llvm.org/buildbot".
36 "builder_url": The part of the URL that refers to the list of builders.
37 Will be added to base_url when making API calls.
38 "build_url": Part of the URL that refers to the list of builds. Added to base_url
39 when making API calls.
40 "ignore" : Set to "true" to hide the master from the page.
41 "builders": [ ...a list of builder groups as detailed below... ]
Renato Golin662105b2016-06-10 12:47:43 +010042
David Spickettd90e09a2022-10-26 11:56:07 +010043Builder group properties:
Renato Golin662105b2016-06-10 12:47:43 +010044
David Spickettd90e09a2022-10-26 11:56:07 +010045 "name": Name of this group. "fast bots", "self-hosting", etc. Used as the section title.
46 "ignore" : Set to "true" to hide this builder group from the page.
47 "bots": [ ...a list of bots as decribed below... ]
Renato Golin662105b2016-06-10 12:47:43 +010048
David Spickettd90e09a2022-10-26 11:56:07 +010049Bot properties:
Renato Golin662105b2016-06-10 12:47:43 +010050
David Spickettd90e09a2022-10-26 11:56:07 +010051 "name": The exact name of the buildbot. This will be used to build URLs for API calls.
52 "ignore": Set to "true" to ignore the status of this bot.
Renato Golin662105b2016-06-10 12:47:43 +010053
David Spickettd90e09a2022-10-26 11:56:07 +010054Notes on bots:
55 * Bots may be repeated across builder groups if they fall into multiple categories
56 (this does not slow down the monitor as results are cached).
57 * The same bot name on 2 different masters refers to 2 different bots.
Renato Golin662105b2016-06-10 12:47:43 +010058
David Spickettd90e09a2022-10-26 11:56:07 +010059Note that "ignore" has two different behaviours:
Renato Golin662105b2016-06-10 12:47:43 +010060
David Spickettd90e09a2022-10-26 11:56:07 +010061 * On masters and builder groups, it omits the entire section from the output.
62 * On bots it shows the bot but ignores their status. Meaning that an ignored bot failing
63 does not make the overall page status failed.
Renato Golin662105b2016-06-10 12:47:43 +010064
David Spickettd90e09a2022-10-26 11:56:07 +010065Buildkite JSON Format
66---------------------
Renato Golin662105b2016-06-10 12:47:43 +010067
David Spickettd90e09a2022-10-26 11:56:07 +010068The Buildkite format follows the Buildbot format closely with some differences.
69
70 * Since Buildkite is a centralised service the "name" is always "Buildkite".
71 * The "base_url" is always "https://www.buildkite.com".
72 * There is a new key "buildkite_org". This is used to find our particular bots
73 via the API.
74 * The "builder_url" and "build_url" keys are used to form clickable links,
75 and are always "builders" and "builds".
76 * Bots have an extra key "buildkite_pipeline" (explained below).
77
78When querying Buildkite we make a request like this:
79"show me the results of the pipeline <buildkite_pipeline> in the organisation <buildkite_org>"
80
81From there the script looks for the bot's name in the last finished build. After that
82all the processing is the same as the Buildbot results.
Renato Golin662105b2016-06-10 12:47:43 +010083
84HTML Page
85---------
86
David Spickettd90e09a2022-10-26 11:56:07 +010087The script will generate an HTML page. This page is separated into blocks:
88 * Masters which contain...
89 * Builder Groups which contain...
90 * Bots
Renato Golin662105b2016-06-10 12:47:43 +010091
David Spickettd90e09a2022-10-26 11:56:07 +010092The date is printed at the top of the page so you know when the results were generated.
Renato Golin662105b2016-06-10 12:47:43 +010093
David Spickettd90e09a2022-10-26 11:56:07 +010094Bots that are offline or partially fail to read via the API will show up with a message
95along the lines of "<bot name> is offline!". The page should still update correctly
96for the rest of the bots.
Renato Golin662105b2016-06-10 12:47:43 +010097
David Spickettd90e09a2022-10-26 11:56:07 +010098Each listed bot has these columns:
Renato Golin662105b2016-06-10 12:47:43 +010099
David Spickettd90e09a2022-10-26 11:56:07 +0100100 * "Buildbot": This shows the name and a link to the master's web interface for the bot.
101 * "Status": The status of the last finished build. PASS or FAIL (currently cancelled
102 is also treated as a failure).
103 * "T Since": The time since the last build finished. This is useful for spotting bots
104 that have gotten disconnected. If this time is greater than 24 hours, it will be shown
105 in red.
106 * "Duration": The length of the last build.
Antoine Moynault0cbe02e2023-06-21 08:13:57 +0000107 * "Latest": The build number of the last finished build, which itself will be a link
David Spickettd90e09a2022-10-26 11:56:07 +0100108 to the results page for that build.
David Spickettd90e09a2022-10-26 11:56:07 +0100109 * "Failing steps": The failed build steps, if it was a failed build.
David Spickettf8502432023-07-07 15:52:26 +0100110 * "Build In Progress": This will be "Yes" if there is a build currently running, and
111 the text will link to the build. Or "No" if there is not. If we cannot determine this,
112 it will be left blank and you should check the builder's status page instead.
Antoine Moynault0cbe02e2023-06-21 08:13:57 +0000113 * "1st Failing": The number of the first failed build, if the bot fails for several
114 builds.
115 * "Failing Since": The time since the first failed build finished. This is useful for
116 spotting bots that fail for a long time.
Renato Golin662105b2016-06-10 12:47:43 +0100117
David Spickettd90e09a2022-10-26 11:56:07 +0100118Note: "finished" here refers to the build ending be that by success, cancellation or
119failure.