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 | |
| 26 | ## Processes |
| 27 | |
| 28 | In 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 | |
| 33 | You'll need to ensure that your checkout is configured to check out the branch |
| 34 | heads. 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 | |
| 42 | Once 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 | |
| 49 | To determine the appropriate branch number, you can either use |
| 50 | [chromiumdash][#chromiumdash] or check [milestone.json][milestone-json] directly. |
| 51 | |
| 52 | ### Flaky tests |
| 53 | |
| 54 | You should largely ignore flaky tests for the time being unless you have |
| 55 | specific reason to believe that a flake was introduced by a cherry-pick to the |
| 56 | branch in question. If a test is flaky on both trunk *and* a release branch, |
| 57 | the trunk sheriffs should investigate it. |
| 58 | |
| 59 | ### Landing changes |
| 60 | |
| 61 | When you need to land a change to a branch, you'll need to go through the same |
| 62 | merge approval process as other cherry-picks. You should feel free to ping the |
| 63 | relevant release TPM as listed on [chromiumdash][chromiumdash-schedule]. |
| 64 | |
| 65 | ## Tools |
| 66 | |
| 67 | ### Sheriff-o-Matic |
| 68 | |
| 69 | Use the [branch SoM console][sheriff-o-matic] rather than the main chromium console. |
| 70 | |
| 71 | ### Consoles |
| 72 | |
| 73 | Use 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 |
| 78 | particular 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 | |
| 89 | The current branch sheriff is listed [here][rotation-home]. The configuration |
| 90 | and source of truth for the schedule lives [here][rotation-config]. To swap, |
| 91 | simply 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 |