John Budorick | db5451c | 2020-03-10 20:44:18 | [diff] [blame] | 1 | # Chromium Branch Sheriffing |
| 2 | |
| 3 | This document describes how to be a Chromium *branch* sheriff and how sheriffing |
| 4 | on a branch differs from sheriffing on trunk. For trunk sheriffing guidance, see |
| 5 | [//docs/sheriff.md][sheriff-md]. |
| 6 | |
| 7 | [TOC] |
| 8 | |
| 9 | ## Philosophy |
| 10 | |
| 11 | The goals of a branch sheriff are quite similar to those of a trunk sheriff. |
| 12 | Branch sheriffs need to ensure that: |
| 13 | |
| 14 | 1. **Compile failures get fixed**, because compile failures on branches block |
| 15 | all tests (both automated and manual) and consequently reduce our confidence |
| 16 | in the quality of what we're shipping, possibly to the point of blocking |
| 17 | releases. |
| 18 | 2. **Consistent test failures get repaired**, because they similarly reduce |
| 19 | our confidence in the quality of our code. |
| 20 | |
| 21 | **Communication** is important for sheriffs in general, but it's particularly |
| 22 | important for branch sheriffs. Over the course of your shift, you may need to |
| 23 | coordinate with trunk sheriffs, troopers, release TPMs, and others -- don't |
| 24 | hesitate to do so, particularly if you have questions. |
| 25 | |
Eric Foo | 81d29a6 | 2020-04-01 01:08:50 | [diff] [blame] | 26 | Points of contact (i.e. platform-specific sheriffs) can be found |
| 27 | [here](http://goto.google.com/chrome-branch-sheriffing#points-of-contact). |
| 28 | |
John Budorick | db5451c | 2020-03-10 20:44:18 | [diff] [blame] | 29 | ## Processes |
| 30 | |
| 31 | In general, you'll want to follow the same processes outlined in |
| 32 | [//docs/sheriff.md][sheriff-md]. There are some differences, though. |
| 33 | |
| 34 | ### Checkout |
| 35 | |
| 36 | You'll need to ensure that your checkout is configured to check out the branch |
| 37 | heads. You can do so by running |
| 38 | |
| 39 | ``` |
| 40 | src $ gclient sync --with_branch_heads |
| 41 | ``` |
| 42 | |
| 43 | > This only needs to be done once, though running it more than once won't hurt. |
| 44 | |
Justin Donnelly | 08274a3 | 2020-03-27 19:58:44 | [diff] [blame] | 45 | You may also need to run: |
| 46 | |
| 47 | ``` |
| 48 | src $ git fetch |
| 49 | ``` |
| 50 | |
John Budorick | db5451c | 2020-03-10 20:44:18 | [diff] [blame] | 51 | Once you've done that, you'll be able to check out branches: |
| 52 | |
| 53 | ``` |
| 54 | src $ git checkout branch-heads/$BRANCH_NUMBER # e.g. branch-heads/4044 for M81 |
| 55 | src $ gclient sync |
| 56 | ``` |
| 57 | |
| 58 | To determine the appropriate branch number, you can either use |
Carlos Knippschild | 05c9fd90 | 2020-05-04 15:44:58 | [diff] [blame^] | 59 | [chromiumdash](#chromiumdash) or check [milestone.json][milestone-json] |
| 60 | directly. |
John Budorick | db5451c | 2020-03-10 20:44:18 | [diff] [blame] | 61 | |
Eric Foo | 81d29a6 | 2020-04-01 01:08:50 | [diff] [blame] | 62 | ### Findit |
Carlos Knippschild | 05c9fd90 | 2020-05-04 15:44:58 | [diff] [blame^] | 63 | |
Eric Foo | 81d29a6 | 2020-04-01 01:08:50 | [diff] [blame] | 64 | As FindIt is not available on branches, one way to try to find culprits is using |
Carlos Knippschild | 05c9fd90 | 2020-05-04 15:44:58 | [diff] [blame^] | 65 | `git bisect` locally and upload changes to a gerrit CL and run the needed |
| 66 | trybots to check. This is especially useful when the errors are not reproducible |
| 67 | on your local builds or you don't have the required hardware to build the failed |
| 68 | tests. |
Eric Foo | 81d29a6 | 2020-04-01 01:08:50 | [diff] [blame] | 69 | |
John Budorick | db5451c | 2020-03-10 20:44:18 | [diff] [blame] | 70 | ### Flaky tests |
| 71 | |
| 72 | You should largely ignore flaky tests for the time being unless you have |
| 73 | specific reason to believe that a flake was introduced by a cherry-pick to the |
| 74 | branch in question. If a test is flaky on both trunk *and* a release branch, |
| 75 | the trunk sheriffs should investigate it. |
| 76 | |
| 77 | ### Landing changes |
| 78 | |
| 79 | When you need to land a change to a branch, you'll need to go through the same |
| 80 | merge approval process as other cherry-picks. You should feel free to ping the |
| 81 | relevant release TPM as listed on [chromiumdash][chromiumdash-schedule]. |
| 82 | |
| 83 | ## Tools |
| 84 | |
| 85 | ### Sheriff-o-Matic |
| 86 | |
Carlos Knippschild | 05c9fd90 | 2020-05-04 15:44:58 | [diff] [blame^] | 87 | Use the [branch SoM console][sheriff-o-matic] rather than the main chromium |
| 88 | console. |
John Budorick | db5451c | 2020-03-10 20:44:18 | [diff] [blame] | 89 | |
| 90 | ### Consoles |
| 91 | |
Carlos Knippschild | 05c9fd90 | 2020-05-04 15:44:58 | [diff] [blame^] | 92 | Use the [beta][main-beta] and [stable][main-stable] branch consoles rather than |
| 93 | the main console. A new console is created for each milestone. They are named |
Eric Foo | 81d29a6 | 2020-04-01 01:08:50 | [diff] [blame] | 94 | "Chromium M## Console" and can be found under the |
| 95 | [Chromium Project](https://ci.chromium.org/p/chromium). |
John Budorick | db5451c | 2020-03-10 20:44:18 | [diff] [blame] | 96 | |
Carlos Knippschild | 05c9fd90 | 2020-05-04 15:44:58 | [diff] [blame^] | 97 | ### Monorail issues (crbug) |
| 98 | |
| 99 | Refer and use the |
| 100 | [Sheriff-Chrome-Release label](https://bugs.chromium.org/p/chromium/issues/list?q=label%3ASheriff-Chrome-Release) |
| 101 | to find and tag issues that are of importance to Branch sheriffs. |
| 102 | |
John Budorick | db5451c | 2020-03-10 20:44:18 | [diff] [blame] | 103 | ### Chromiumdash |
| 104 | |
| 105 | [chromiumdash][chromiumdash] can help you determine the branch number for a |
| 106 | particular milestone or channel, along with a host of other useful information: |
| 107 | |
| 108 | * [Branches][chromiumdash-branches] lists the branches for each milestone. |
| 109 | * [Releases][chromiumdash-releases] lists the builds currently shipping to |
| 110 | each channel, which can help map from channel to milestone or to branch. |
| 111 | * [Schedule][chromiumdash-schedule] lists the relevant dates for each |
| 112 | milestone and includes the release TPMs responsible for each milestone by |
| 113 | platform. |
| 114 | |
| 115 | ### Rotation |
| 116 | |
| 117 | The current branch sheriff is listed [here][rotation-home]. The configuration |
| 118 | and source of truth for the schedule lives [here][rotation-config]. To swap, |
| 119 | simply send a CL changing schedule at the bottom of the file. |
| 120 | |
| 121 | [chromiumdash]: https://chromiumdash.appspot.com |
| 122 | [chromiumdash-branches]: https://chromiumdash.appspot.com/branches |
| 123 | [chromiumdash-releases]: https://chromiumdash.appspot.com/releases |
| 124 | [chromiumdash-schedule]: https://chromiumdash.appspot.com/schedule |
John Budorick | 2920676 | 2020-03-25 16:44:14 | [diff] [blame] | 125 | [main-beta]: https://ci.chromium.org/p/chromium/g/main-m81/console |
| 126 | [main-stable]: https://ci.chromium.org/p/chromium/g/main-m80/console |
John Budorick | db5451c | 2020-03-10 20:44:18 | [diff] [blame] | 127 | [milestone-json]: https://goto.google.com/chrome-milestone-json |
| 128 | [rotation-home]: https://goto.google.com/chrome-branch-sheriff-amer-west |
| 129 | [rotation-config]: https://goto.google.com/chrome-branch-sheriff-amer-west-config |
| 130 | [sheriff-md]: /docs/sheriff.md |
| 131 | [sheriff-o-matic]: https://sheriff-o-matic.appspot.com/chrome_browser_release |