blob: a7234fb1b58db9429b4ef9057542f689a54169e5 [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
Justin Donnellye8d706c2020-11-16 17:17:3672Flaky tests that are disabled on trunk should also be disabled on any branches
73with frequent failures of that test. If a trunk CL lands with no change other
74than to disable one or more tests ([example](https://crrev.com/c/2507299)) and
75it has an associated bug and the release manager is cc'd on the bug, you can and
76should cherrypick it to the affected branch without requesting merge approval.
77
78On the other hand, if you believe that a flake was introduced by a cherry-pick
79to the branch in question and is not flaky on trunk, you will need to create a
80new CL to disable it only on the branch and go through the usual merge request
81process.
John Budorickdb5451c2020-03-10 20:44:1882
Oksana Zhuravlovadf4ff8f62021-03-29 23:36:3883Note: there is little value in merging changes to the stable release
84branch 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).
86You can find release dates on [chromiumdash][chromiumdash-schedule].
87
John Budorickdb5451c2020-03-10 20:44:1888### Landing changes
89
Takuto Ikutad33e6f5f2021-01-27 06:06:0390When you need to land a change to a branch, you'll need to go through [the same
91merge approval process](./process/merge_request.md) as other cherry-picks (see
92exception for flaky tests above). You should feel free to ping the relevant
93release TPM as listed on [chromiumdash][chromiumdash-schedule].
John Budorickdb5451c2020-03-10 20:44:1894
95## Tools
96
97### Sheriff-o-Matic
98
Carlos Knippschild05c9fd902020-05-04 15:44:5899Use the [branch SoM console][sheriff-o-matic] rather than the main chromium
100console.
John Budorickdb5451c2020-03-10 20:44:18101
102### Consoles
103
Carlos Knippschild05c9fd902020-05-04 15:44:58104Use the [beta][main-beta] and [stable][main-stable] branch consoles rather than
105the main console. A new console is created for each milestone. They are named
Eric Foo81d29a62020-04-01 01:08:50106"Chromium M## Console" and can be found under the
107[Chromium Project](https://ci.chromium.org/p/chromium).
John Budorickdb5451c2020-03-10 20:44:18108
Carlos Knippschild05c9fd902020-05-04 15:44:58109### Monorail issues (crbug)
110
111Refer and use the
112[Sheriff-Chrome-Release label](https://bugs.chromium.org/p/chromium/issues/list?q=label%3ASheriff-Chrome-Release)
113to find and tag issues that are of importance to Branch sheriffs.
114
John Budorickdb5451c2020-03-10 20:44:18115### Chromiumdash
116
117[chromiumdash][chromiumdash] can help you determine the branch number for a
118particular 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
129The current branch sheriff is listed [here][rotation-home]. The configuration
130and source of truth for the schedule lives [here][rotation-config]. To swap,
131simply send a CL changing schedule at the bottom of the file.
Oksana Zhuravlova730a30d12021-03-17 17:38:44132You can also use [Oncall Swapper](https://oncallswapper.corp.google.com/)
133to find the swap and submit the CL for you.
John Budorickdb5451c2020-03-10 20:44:18134
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 Budorick29206762020-03-25 16:44:14139[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 Budorickdb5451c2020-03-10 20:44:18141[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