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 | |
Justin Donnelly | e8d706c | 2020-11-16 17:17:36 | [diff] [blame] | 72 | Flaky tests that are disabled on trunk should also be disabled on any branches |
| 73 | with frequent failures of that test. If a trunk CL lands with no change other |
| 74 | than to disable one or more tests ([example](https://crrev.com/c/2507299)) and |
| 75 | it has an associated bug and the release manager is cc'd on the bug, you can and |
| 76 | should cherrypick it to the affected branch without requesting merge approval. |
| 77 | |
| 78 | On the other hand, if you believe that a flake was introduced by a cherry-pick |
| 79 | to the branch in question and is not flaky on trunk, you will need to create a |
| 80 | new CL to disable it only on the branch and go through the usual merge request |
| 81 | process. |
John Budorick | db5451c | 2020-03-10 20:44:18 | [diff] [blame] | 82 | |
Oksana Zhuravlova | df4ff8f6 | 2021-03-29 23:36:38 | [diff] [blame] | 83 | Note: there is little value in merging changes to the stable release |
| 84 | branch when the next milestone's stable release is less than a week away |
| 85 | (since there are usually no planned stable respins at that point). |
| 86 | You can find release dates on [chromiumdash][chromiumdash-schedule]. |
| 87 | |
John Budorick | db5451c | 2020-03-10 20:44:18 | [diff] [blame] | 88 | ### Landing changes |
| 89 | |
Takuto Ikuta | d33e6f5f | 2021-01-27 06:06:03 | [diff] [blame] | 90 | When you need to land a change to a branch, you'll need to go through [the same |
| 91 | merge approval process](./process/merge_request.md) as other cherry-picks (see |
| 92 | exception for flaky tests above). You should feel free to ping the relevant |
| 93 | release TPM as listed on [chromiumdash][chromiumdash-schedule]. |
John Budorick | db5451c | 2020-03-10 20:44:18 | [diff] [blame] | 94 | |
| 95 | ## Tools |
| 96 | |
| 97 | ### Sheriff-o-Matic |
| 98 | |
Carlos Knippschild | 05c9fd90 | 2020-05-04 15:44:58 | [diff] [blame] | 99 | Use the [branch SoM console][sheriff-o-matic] rather than the main chromium |
| 100 | console. |
John Budorick | db5451c | 2020-03-10 20:44:18 | [diff] [blame] | 101 | |
| 102 | ### Consoles |
| 103 | |
Carlos Knippschild | 05c9fd90 | 2020-05-04 15:44:58 | [diff] [blame] | 104 | Use the [beta][main-beta] and [stable][main-stable] branch consoles rather than |
| 105 | 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] | 106 | "Chromium M## Console" and can be found under the |
| 107 | [Chromium Project](https://ci.chromium.org/p/chromium). |
John Budorick | db5451c | 2020-03-10 20:44:18 | [diff] [blame] | 108 | |
Carlos Knippschild | 05c9fd90 | 2020-05-04 15:44:58 | [diff] [blame] | 109 | ### Monorail issues (crbug) |
| 110 | |
| 111 | Refer and use the |
| 112 | [Sheriff-Chrome-Release label](https://bugs.chromium.org/p/chromium/issues/list?q=label%3ASheriff-Chrome-Release) |
| 113 | to find and tag issues that are of importance to Branch sheriffs. |
| 114 | |
John Budorick | db5451c | 2020-03-10 20:44:18 | [diff] [blame] | 115 | ### Chromiumdash |
| 116 | |
| 117 | [chromiumdash][chromiumdash] can help you determine the branch number for a |
| 118 | particular milestone or channel, along with a host of other useful information: |
| 119 | |
| 120 | * [Branches][chromiumdash-branches] lists the branches for each milestone. |
| 121 | * [Releases][chromiumdash-releases] lists the builds currently shipping to |
| 122 | each channel, which can help map from channel to milestone or to branch. |
| 123 | * [Schedule][chromiumdash-schedule] lists the relevant dates for each |
| 124 | milestone and includes the release TPMs responsible for each milestone by |
| 125 | platform. |
| 126 | |
| 127 | ### Rotation |
| 128 | |
| 129 | The current branch sheriff is listed [here][rotation-home]. The configuration |
| 130 | and source of truth for the schedule lives [here][rotation-config]. To swap, |
| 131 | simply send a CL changing schedule at the bottom of the file. |
Oksana Zhuravlova | 730a30d1 | 2021-03-17 17:38:44 | [diff] [blame] | 132 | You can also use [Oncall Swapper](https://oncallswapper.corp.google.com/) |
| 133 | to find the swap and submit the CL for you. |
John Budorick | db5451c | 2020-03-10 20:44:18 | [diff] [blame] | 134 | |
| 135 | [chromiumdash]: https://chromiumdash.appspot.com |
| 136 | [chromiumdash-branches]: https://chromiumdash.appspot.com/branches |
| 137 | [chromiumdash-releases]: https://chromiumdash.appspot.com/releases |
| 138 | [chromiumdash-schedule]: https://chromiumdash.appspot.com/schedule |
John Budorick | 2920676 | 2020-03-25 16:44:14 | [diff] [blame] | 139 | [main-beta]: https://ci.chromium.org/p/chromium/g/main-m81/console |
| 140 | [main-stable]: https://ci.chromium.org/p/chromium/g/main-m80/console |
John Budorick | db5451c | 2020-03-10 20:44:18 | [diff] [blame] | 141 | [milestone-json]: https://goto.google.com/chrome-milestone-json |
| 142 | [rotation-home]: https://goto.google.com/chrome-branch-sheriff-amer-west |
| 143 | [rotation-config]: https://goto.google.com/chrome-branch-sheriff-amer-west-config |
| 144 | [sheriff-md]: /docs/sheriff.md |
| 145 | [sheriff-o-matic]: https://sheriff-o-matic.appspot.com/chrome_browser_release |