blob: 62b1d8a3886948975ebd156276b76899d257ff4c [file] [log] [blame] [view]
John Budorickdb5451c2020-03-10 20:44:181# Chromium Branch Sheriffing
2
3This document describes how to be a Chromium *branch* sheriff and how sheriffing
4on 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
11The goals of a branch sheriff are quite similar to those of a trunk sheriff.
12Branch sheriffs need to ensure that:
13
141. **Compile failures get fixed**, because compile failures on branches block
15all tests (both automated and manual) and consequently reduce our confidence
16in the quality of what we're shipping, possibly to the point of blocking
17releases.
182. **Consistent test failures get repaired**, because they similarly reduce
19our confidence in the quality of our code.
20
21**Communication** is important for sheriffs in general, but it's particularly
22important for branch sheriffs. Over the course of your shift, you may need to
23coordinate with trunk sheriffs, troopers, release TPMs, and others -- don't
24hesitate to do so, particularly if you have questions.
25
Eric Foo81d29a62020-04-01 01:08:5026Points of contact (i.e. platform-specific sheriffs) can be found
27[here](http://goto.google.com/chrome-branch-sheriffing#points-of-contact).
28
John Budorickdb5451c2020-03-10 20:44:1829## Processes
30
31In 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
36You'll need to ensure that your checkout is configured to check out the branch
37heads. 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 Donnelly08274a32020-03-27 19:58:4445You may also need to run:
46
47```
48 src $ git fetch
49```
50
John Budorickdb5451c2020-03-10 20:44:1851Once 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
58To determine the appropriate branch number, you can either use
Carlos Knippschild05c9fd902020-05-04 15:44:5859[chromiumdash](#chromiumdash) or check [milestone.json][milestone-json]
60directly.
John Budorickdb5451c2020-03-10 20:44:1861
Eric Foo81d29a62020-04-01 01:08:5062### Findit
Carlos Knippschild05c9fd902020-05-04 15:44:5863
Eric Foo81d29a62020-04-01 01:08:5064As FindIt is not available on branches, one way to try to find culprits is using
Carlos Knippschild05c9fd902020-05-04 15:44:5865`git bisect` locally and upload changes to a gerrit CL and run the needed
66trybots to check. This is especially useful when the errors are not reproducible
67on your local builds or you don't have the required hardware to build the failed
68tests.
Eric Foo81d29a62020-04-01 01:08:5069
John Budorickdb5451c2020-03-10 20:44:1870### Flaky tests
71
72You should largely ignore flaky tests for the time being unless you have
73specific reason to believe that a flake was introduced by a cherry-pick to the
74branch in question. If a test is flaky on both trunk *and* a release branch,
75the trunk sheriffs should investigate it.
76
77### Landing changes
78
79When you need to land a change to a branch, you'll need to go through the same
80merge approval process as other cherry-picks. You should feel free to ping the
81relevant release TPM as listed on [chromiumdash][chromiumdash-schedule].
82
83## Tools
84
85### Sheriff-o-Matic
86
Carlos Knippschild05c9fd902020-05-04 15:44:5887Use the [branch SoM console][sheriff-o-matic] rather than the main chromium
88console.
John Budorickdb5451c2020-03-10 20:44:1889
90### Consoles
91
Carlos Knippschild05c9fd902020-05-04 15:44:5892Use the [beta][main-beta] and [stable][main-stable] branch consoles rather than
93the main console. A new console is created for each milestone. They are named
Eric Foo81d29a62020-04-01 01:08:5094"Chromium M## Console" and can be found under the
95[Chromium Project](https://ci.chromium.org/p/chromium).
John Budorickdb5451c2020-03-10 20:44:1896
Carlos Knippschild05c9fd902020-05-04 15:44:5897### Monorail issues (crbug)
98
99Refer and use the
100[Sheriff-Chrome-Release label](https://bugs.chromium.org/p/chromium/issues/list?q=label%3ASheriff-Chrome-Release)
101to find and tag issues that are of importance to Branch sheriffs.
102
John Budorickdb5451c2020-03-10 20:44:18103### Chromiumdash
104
105[chromiumdash][chromiumdash] can help you determine the branch number for a
106particular 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
117The current branch sheriff is listed [here][rotation-home]. The configuration
118and source of truth for the schedule lives [here][rotation-config]. To swap,
119simply 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 Budorick29206762020-03-25 16:44:14125[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 Budorickdb5451c2020-03-10 20:44:18127[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