John Budorick | 334ff28 | 2018-11-21 23:18:33 | [diff] [blame] | 1 | # Using the trybots |
| 2 | |
| 3 | [TOC] |
| 4 | |
| 5 | ## Overview |
| 6 | |
Orr Bernstein | c5104bd99 | 2022-12-22 15:39:21 | [diff] [blame] | 7 | The trybots let committers try uncommitted patches on multiple platforms in an |
| 8 | automated way. |
John Budorick | 334ff28 | 2018-11-21 23:18:33 | [diff] [blame] | 9 | |
Orr Bernstein | c5104bd99 | 2022-12-22 15:39:21 | [diff] [blame] | 10 | - Trybots include all platforms for which we currently build Chromium, though |
| 11 | they may not support all configurations built on CI. |
Orr Bernstein | abb9debd | 2022-12-22 20:33:22 | [diff] [blame] | 12 | - The commit queue (CQ) runs a subset of available trybots. See [here][1] for |
| 13 | more information. |
Ben Pastene | 434f7fbc | 2023-07-14 20:36:55 | [diff] [blame] | 14 | - Trybots can be manually invoked via `git cl try` or the "Choose Tryjobs" UI |
Orr Bernstein | c5104bd99 | 2022-12-22 15:39:21 | [diff] [blame] | 15 | in gerrit. |
Ben Pastene | 434f7fbc | 2023-07-14 20:36:55 | [diff] [blame] | 16 | - Custom trybots can be added to the list of builders triggered and checked by |
| 17 | the CQ via the `Cq-Include-Trybots` commit message footer. See [here][2] |
| 18 | for more information. |
Orr Bernstein | c5104bd99 | 2022-12-22 15:39:21 | [diff] [blame] | 19 | - Any committer can use the trybots. |
Ben Pastene | 434f7fbc | 2023-07-14 20:36:55 | [diff] [blame] | 20 | - Non-committers with tryjob access can also use the trybots. See [here][3] |
Orr Bernstein | c5104bd99 | 2022-12-22 15:39:21 | [diff] [blame] | 21 | for more information. |
| 22 | - External contributors without tryjob access can ask committers to run |
| 23 | tryjobs for them. |
John Budorick | 334ff28 | 2018-11-21 23:18:33 | [diff] [blame] | 24 | |
Stephen Martinis | aad14f0 | 2021-10-05 20:31:26 | [diff] [blame] | 25 | *** note |
Orr Bernstein | c5104bd99 | 2022-12-22 15:39:21 | [diff] [blame] | 26 | **Warning**: Please do not trigger more than ~5-10 tryjobs per builder |
| 27 | per hour. We don't have enough spare capacity for more than that, and we don't |
| 28 | have per-user quotas yet (https://crbug.com/1091070 to implement that). |
Stephen Martinis | aad14f0 | 2021-10-05 20:31:26 | [diff] [blame] | 29 | *** |
| 30 | |
John Budorick | 334ff28 | 2018-11-21 23:18:33 | [diff] [blame] | 31 | ## Workflow |
| 32 | |
Orr Bernstein | c5104bd99 | 2022-12-22 15:39:21 | [diff] [blame] | 33 | 1. Upload your change to gerrit via `git cl upload` |
| 34 | 2. Run trybots: |
John Budorick | 334ff28 | 2018-11-21 23:18:33 | [diff] [blame] | 35 | |
Orr Bernstein | c5104bd99 | 2022-12-22 15:39:21 | [diff] [blame] | 36 | * Run the default set of trybots by starting a CQ dry run, either by |
| 37 | setting CQ+1 on gerrit or by running `git cl try` with no arguments. |
Ben Pastene | 434f7fbc | 2023-07-14 20:36:55 | [diff] [blame] | 38 | * Manually run trybots of your choice by either the "Choose Tryjobs" |
| 39 | button in gerrit or providing arguments to `git cl try`: |
John Budorick | 334ff28 | 2018-11-21 23:18:33 | [diff] [blame] | 40 | |
Orr Bernstein | c5104bd99 | 2022-12-22 15:39:21 | [diff] [blame] | 41 | * specify bucket name with `-B/--bucket`. For chromium tryjobs, this |
| 42 | should always be `luci.chromium.try` |
| 43 | * specify bot names with `-b/--bot`. This can be specified more than |
| 44 | once. |
John Budorick | 334ff28 | 2018-11-21 23:18:33 | [diff] [blame] | 45 | |
| 46 | ### Examples |
| 47 | |
| 48 | Launching a CQ dry run: |
| 49 | |
| 50 | ```bash |
| 51 | $ git cl try |
| 52 | ``` |
| 53 | |
| 54 | Launching a particular trybot: |
| 55 | |
| 56 | ```bash |
Stephen Martinis | 089f5f0 | 2019-02-12 02:42:24 | [diff] [blame] | 57 | $ git cl try -B luci.chromium.try -b linux-rel |
John Budorick | 334ff28 | 2018-11-21 23:18:33 | [diff] [blame] | 58 | ``` |
| 59 | |
| 60 | Launching multiple trybots: |
| 61 | |
| 62 | ```bash |
| 63 | $ git cl try -B luci.chromium.try \ |
| 64 | -b android-binary-size \ |
| 65 | -b ios-simulator-full-configs \ |
| 66 | -b linux-blink-rel \ |
| 67 | -b win7-blink-rel |
| 68 | # etc |
| 69 | ``` |
| 70 | |
Robert Sesek | 823d8cf | 2020-07-28 20:27:59 | [diff] [blame] | 71 | ## Trying Changes in Dependencies |
| 72 | |
| 73 | It is also possible to run a Chromium try job with a pending CL in a separate |
| 74 | repository that is synced via DEPS. Normally DEPS files specify the SHA1 |
| 75 | revision hash of the dependency. But commits that are part of pending CLs are |
| 76 | not part of the default |
| 77 | [refspec](https://git-scm.com/book/en/v2/Git-Internals-The-Refspec) fetched when |
| 78 | gclient checks out the dependency. Instead, you can specify a symbolic reference |
| 79 | to your change, like `refs/changes/12/2277112/3`. To determine the ref to use, |
| 80 | click the "Download" button on the dependency CL in Gerrit, which will show it |
| 81 | as part of several git commands. Then edit the DEPS file in Chromium. |
| 82 | |
| 83 | If, for example, you wanted to test a pending V8 CL in Chromium, you would edit |
| 84 | the DEPS line, which may look like this: |
| 85 | |
| 86 | ``` |
| 87 | 'v8_revision': '50bc0b22b15da1410a1be6240a25a184d5896908', |
| 88 | ``` |
| 89 | |
| 90 | And change it to: |
| 91 | |
| 92 | ``` |
| 93 | 'v8_revision': 'refs/changes/12/2277112/3', |
| 94 | ``` |
| 95 | |
| 96 | When you run the try job, gclient will sync in your pending CL. Note that if |
| 97 | your pending CL is based on a revision that is either older or newer than the |
| 98 | revision specified in DEPS, the tryjob may fail. You can rebase your CL to be on |
| 99 | top of the same revision specified in the DEPS file to avoid this. |
| 100 | |
John Budorick | 334ff28 | 2018-11-21 23:18:33 | [diff] [blame] | 101 | ## Bugs? Feature requests? Questions? |
| 102 | |
Jonathan Lee | 666aeb4 | 2023-07-17 16:52:54 | [diff] [blame] | 103 | [File a trooper bug.] |
John Budorick | 334ff28 | 2018-11-21 23:18:33 | [diff] [blame] | 104 | |
| 105 | [1]: /docs/infra/cq.md |
Ben Pastene | 434f7fbc | 2023-07-14 20:36:55 | [diff] [blame] | 106 | [2]: /docs/contributing.md#cl-footer-reference |
| 107 | [3]: https://www.chromium.org/getting-involved/become-a-committer#TOC-Try-job-access |
Jonathan Lee | 666aeb4 | 2023-07-17 16:52:54 | [diff] [blame] | 108 | [File a trooper bug.]: https://g.co/bugatrooper |