blob: 1a9a449faf3dc801694dbf3ef569d238ded9f501 [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
26## Processes
27
28In general, you'll want to follow the same processes outlined in
29[//docs/sheriff.md][sheriff-md]. There are some differences, though.
30
31### Checkout
32
33You'll need to ensure that your checkout is configured to check out the branch
34heads. You can do so by running
35
36```
37 src $ gclient sync --with_branch_heads
38```
39
40> This only needs to be done once, though running it more than once won't hurt.
41
42Once you've done that, you'll be able to check out branches:
43
44```
45 src $ git checkout branch-heads/$BRANCH_NUMBER # e.g. branch-heads/4044 for M81
46 src $ gclient sync
47```
48
49To determine the appropriate branch number, you can either use
50[chromiumdash][#chromiumdash] or check [milestone.json][milestone-json] directly.
51
52### Flaky tests
53
54You should largely ignore flaky tests for the time being unless you have
55specific reason to believe that a flake was introduced by a cherry-pick to the
56branch in question. If a test is flaky on both trunk *and* a release branch,
57the trunk sheriffs should investigate it.
58
59### Landing changes
60
61When you need to land a change to a branch, you'll need to go through the same
62merge approval process as other cherry-picks. You should feel free to ping the
63relevant release TPM as listed on [chromiumdash][chromiumdash-schedule].
64
65## Tools
66
67### Sheriff-o-Matic
68
69Use the [branch SoM console][sheriff-o-matic] rather than the main chromium console.
70
71### Consoles
72
73Use the [beta][main-beta] and [stable][main-stable] branch consoles rather than the main console.
74
75### Chromiumdash
76
77[chromiumdash][chromiumdash] can help you determine the branch number for a
78particular milestone or channel, along with a host of other useful information:
79
80 * [Branches][chromiumdash-branches] lists the branches for each milestone.
81 * [Releases][chromiumdash-releases] lists the builds currently shipping to
82 each channel, which can help map from channel to milestone or to branch.
83 * [Schedule][chromiumdash-schedule] lists the relevant dates for each
84 milestone and includes the release TPMs responsible for each milestone by
85 platform.
86
87### Rotation
88
89The current branch sheriff is listed [here][rotation-home]. The configuration
90and source of truth for the schedule lives [here][rotation-config]. To swap,
91simply send a CL changing schedule at the bottom of the file.
92
93[chromiumdash]: https://chromiumdash.appspot.com
94[chromiumdash-branches]: https://chromiumdash.appspot.com/branches
95[chromiumdash-releases]: https://chromiumdash.appspot.com/releases
96[chromiumdash-schedule]: https://chromiumdash.appspot.com/schedule
97[main-beta]: https://ci.chromium.org/p/chromium/g/main-beta/console
98[main-stable]: https://ci.chromium.org/p/chromium/g/main-stable/console
99[milestone-json]: https://goto.google.com/chrome-milestone-json
100[rotation-home]: https://goto.google.com/chrome-branch-sheriff-amer-west
101[rotation-config]: https://goto.google.com/chrome-branch-sheriff-amer-west-config
102[sheriff-md]: /docs/sheriff.md
103[sheriff-o-matic]: https://sheriff-o-matic.appspot.com/chrome_browser_release