David Spickett | d90e09a | 2022-10-26 11:56:07 +0100 | [diff] [blame] | 1 | LLVM Buildbot Monitor |
| 2 | ===================== |
Renato Golin | 94cc104 | 2016-04-26 11:02:23 +0100 | [diff] [blame] | 3 | |
David Spickett | d90e09a | 2022-10-26 11:56:07 +0100 | [diff] [blame] | 4 | This is to be left running on a server or desktop as monitoring for your buildbots. |
| 5 | It purely reports the status of the builds. If you want hardware monitoring, look |
| 6 | elsewhere. |
Renato Golin | 94cc104 | 2016-04-26 11:02:23 +0100 | [diff] [blame] | 7 | |
David Spickett | d90e09a | 2022-10-26 11:56:07 +0100 | [diff] [blame] | 8 | It supports Buildbot (as used by LLVM) and Buildkite (https://buildkite.com/, used by LLVM's |
| 9 | libcxx project). It does not support LLVM Green Dragon (https://green.lab.llvm.org/green/). |
Renato Golin | 662105b | 2016-06-10 12:47:43 +0100 | [diff] [blame] | 10 | |
David Spickett | d90e09a | 2022-10-26 11:56:07 +0100 | [diff] [blame] | 11 | Buildkite does require an API key to be available, see the script for how to do that |
| 12 | and contact your Builkite org admin to get one. |
Renato Golin | 662105b | 2016-06-10 12:47:43 +0100 | [diff] [blame] | 13 | |
David Spickett | d90e09a | 2022-10-26 11:56:07 +0100 | [diff] [blame] | 14 | Currently we have one monitor running at http://llvm.validation.linaro.org/. |
| 15 | Bookmark this if you have a need to check bot status at a glance. |
| 16 | |
| 17 | JSON Format |
| 18 | ----------- |
| 19 | |
| 20 | The JSON file describes the bots we want to monitor and which master/build service |
| 21 | they connect to. |
| 22 | |
| 23 | Buildbot JSON Format |
| 24 | -------------------- |
Renato Golin | 662105b | 2016-06-10 12:47:43 +0100 | [diff] [blame] | 25 | |
| 26 | The base structure is a list of masters, which has a few properties and a list |
David Spickett | d90e09a | 2022-10-26 11:56:07 +0100 | [diff] [blame] | 27 | of 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 |
| 29 | them bots here). |
Renato Golin | 662105b | 2016-06-10 12:47:43 +0100 | [diff] [blame] | 30 | |
| 31 | Master properties: |
| 32 | |
David Spickett | d90e09a | 2022-10-26 11:56:07 +0100 | [diff] [blame] | 33 | "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 Golin | 662105b | 2016-06-10 12:47:43 +0100 | [diff] [blame] | 42 | |
David Spickett | d90e09a | 2022-10-26 11:56:07 +0100 | [diff] [blame] | 43 | Builder group properties: |
Renato Golin | 662105b | 2016-06-10 12:47:43 +0100 | [diff] [blame] | 44 | |
David Spickett | d90e09a | 2022-10-26 11:56:07 +0100 | [diff] [blame] | 45 | "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 Golin | 662105b | 2016-06-10 12:47:43 +0100 | [diff] [blame] | 48 | |
David Spickett | d90e09a | 2022-10-26 11:56:07 +0100 | [diff] [blame] | 49 | Bot properties: |
Renato Golin | 662105b | 2016-06-10 12:47:43 +0100 | [diff] [blame] | 50 | |
David Spickett | d90e09a | 2022-10-26 11:56:07 +0100 | [diff] [blame] | 51 | "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 Golin | 662105b | 2016-06-10 12:47:43 +0100 | [diff] [blame] | 53 | |
David Spickett | d90e09a | 2022-10-26 11:56:07 +0100 | [diff] [blame] | 54 | Notes 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 Golin | 662105b | 2016-06-10 12:47:43 +0100 | [diff] [blame] | 58 | |
David Spickett | d90e09a | 2022-10-26 11:56:07 +0100 | [diff] [blame] | 59 | Note that "ignore" has two different behaviours: |
Renato Golin | 662105b | 2016-06-10 12:47:43 +0100 | [diff] [blame] | 60 | |
David Spickett | d90e09a | 2022-10-26 11:56:07 +0100 | [diff] [blame] | 61 | * 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 Golin | 662105b | 2016-06-10 12:47:43 +0100 | [diff] [blame] | 64 | |
David Spickett | d90e09a | 2022-10-26 11:56:07 +0100 | [diff] [blame] | 65 | Buildkite JSON Format |
| 66 | --------------------- |
Renato Golin | 662105b | 2016-06-10 12:47:43 +0100 | [diff] [blame] | 67 | |
David Spickett | d90e09a | 2022-10-26 11:56:07 +0100 | [diff] [blame] | 68 | The 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 | |
| 78 | When querying Buildkite we make a request like this: |
| 79 | "show me the results of the pipeline <buildkite_pipeline> in the organisation <buildkite_org>" |
| 80 | |
| 81 | From there the script looks for the bot's name in the last finished build. After that |
| 82 | all the processing is the same as the Buildbot results. |
Renato Golin | 662105b | 2016-06-10 12:47:43 +0100 | [diff] [blame] | 83 | |
| 84 | HTML Page |
| 85 | --------- |
| 86 | |
David Spickett | d90e09a | 2022-10-26 11:56:07 +0100 | [diff] [blame] | 87 | The script will generate an HTML page. This page is separated into blocks: |
| 88 | * Masters which contain... |
| 89 | * Builder Groups which contain... |
| 90 | * Bots |
Renato Golin | 662105b | 2016-06-10 12:47:43 +0100 | [diff] [blame] | 91 | |
David Spickett | d90e09a | 2022-10-26 11:56:07 +0100 | [diff] [blame] | 92 | The date is printed at the top of the page so you know when the results were generated. |
Renato Golin | 662105b | 2016-06-10 12:47:43 +0100 | [diff] [blame] | 93 | |
David Spickett | d90e09a | 2022-10-26 11:56:07 +0100 | [diff] [blame] | 94 | Bots that are offline or partially fail to read via the API will show up with a message |
| 95 | along the lines of "<bot name> is offline!". The page should still update correctly |
| 96 | for the rest of the bots. |
Renato Golin | 662105b | 2016-06-10 12:47:43 +0100 | [diff] [blame] | 97 | |
David Spickett | d90e09a | 2022-10-26 11:56:07 +0100 | [diff] [blame] | 98 | Each listed bot has these columns: |
Renato Golin | 662105b | 2016-06-10 12:47:43 +0100 | [diff] [blame] | 99 | |
David Spickett | d90e09a | 2022-10-26 11:56:07 +0100 | [diff] [blame] | 100 | * "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 Moynault | 0cbe02e | 2023-06-21 08:13:57 +0000 | [diff] [blame] | 107 | * "Latest": The build number of the last finished build, which itself will be a link |
David Spickett | d90e09a | 2022-10-26 11:56:07 +0100 | [diff] [blame] | 108 | to the results page for that build. |
David Spickett | d90e09a | 2022-10-26 11:56:07 +0100 | [diff] [blame] | 109 | * "Failing steps": The failed build steps, if it was a failed build. |
David Spickett | f850243 | 2023-07-07 15:52:26 +0100 | [diff] [blame^] | 110 | * "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 Moynault | 0cbe02e | 2023-06-21 08:13:57 +0000 | [diff] [blame] | 113 | * "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 Golin | 662105b | 2016-06-10 12:47:43 +0100 | [diff] [blame] | 117 | |
David Spickett | d90e09a | 2022-10-26 11:56:07 +0100 | [diff] [blame] | 118 | Note: "finished" here refers to the build ending be that by success, cancellation or |
| 119 | failure. |