1Tree Sheriffs Documentation 2=========================== 3 4### Contents ### 5 6* [What does a sheriff do?](#what_is_a_sheriff) 7 + [Skia tree](#skia_tree) 8 + [AutoRollers](#autorollers) 9 + [Gold and Perf](#gold_and_perf) 10 + [Documentation](#sheriff_doc) 11* [View current and upcoming sheriffs](#view_current_upcoming_sheriffs) 12* [How to swap sheriff shifts](#how_to_swap) 13* [Tips for sheriffs](#tips) 14 + [When to file bugs](#when_to_file_bugs) 15 + [How to close or re-open the tree](#how_close_tree) 16 + [How to revert a CL](#how_to_revert) 17 + [What to do if DEPS roll fails to land](#deps_roll_failures) 18 + [How to rebaseline](#how_to_rebaseline) 19 20 21<a name="what_is_a_sheriff"></a> 22What does a sheriff do? 23----------------------- 24 25A sheriff keeps an eye on the tree, DEPS rolls, Gold tool and the Perf tool. 26 27Below is a brief summary of what the sheriff does for each task: 28 29<a name="skia_tree"></a> 30### Skia tree 31* Understand the [testing infrastructure](https://skia.org/dev/testing/automated_testing). 32* Start watching the [status page](https://status.skia.org) for bot breakages. 33* Track down people responsible for breakages and revert broken changes if there is no easy fix. You can use [blamer](#blamer) to help track down such changes. 34* Close and open the [tree](http://skia-tree-status.appspot.com). 35* Keep the builder comments on the [status page](https://status.skia.org) up to date. 36* File or follow up with [BreakingTheBuildbots bugs](https://bugs.chromium.org/p/skia/issues/list?q=label:BreakingTheBuildbots). See the tip on [when to file bugs](#when_to_file_bugs). 37* Read and update the [Ongoing Issues section](https://docs.google.com/document/d/1y2jUf4vXI0fwhu2TiCLVIfWC1JOxFcHXGw39y7i-y_I/edit#heading=h.tpualuc3p7z0) in the handoff doc. 38* (Optional) Document significant events that occurred during your sheriff shift in the [Weekly 39 Handoff Notes section](https://docs.google.com/document/d/1y2jUf4vXI0fwhu2TiCLVIfWC1JOxFcHXGw39y7i-y_I/edit#heading=h.y49irwbutzr) in the handoff doc. 40 41<a name="blamer"></a> 42### Blamer 43If you have Go installed, a command-line tool is available to search through 44git history and do text searches on the full patch text and the commit 45message. To install blamer run: 46 47 go get go.skia.org/infra/blamer/go/blamer 48 49Then run blamer from within a Skia checkout. For example, to search if the 50string "SkDevice" has appeared in the last 10 commits: 51 52 $ $GOPATH/bin/blamer --match SkDevice --num 10 53 54 commit ea70c4bb22394c8dcc29a369d3422a2b8f3b3e80 55 Author: robertphillips <robertphillips@google.com> 56 Date: Wed Jul 20 08:54:31 2016 -0700 57 58 Remove SkDevice::accessRenderTarget virtual 59 GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2167723002 60 61 Review-Url: https://codereview.chromium.org/2167723002 62 63<a name="autorollers"></a> 64### Autorollers 65* Ensure that all AutoRollers listed on the [status page](https://status.skia.org) are successfully landing. 66 67<a name="gold_and_perf"></a> 68### Gold and Perf 69* Pay attention for new [Perf](https://perf.skia.org/) and [Gold](https://gold.skia.org/) alerts (by clicking on the bell at the top right of the [status page](https://status.skia.org)). 70* The sheriff's duty here is to make sure that when developers introduce new images or new perf regressions, that they are aware of what happened, and they use these tools to take appropriate action. 71 72<a name="sheriff_doc"></a> 73### Documentation 74* Improve/update this documentation page for future sheriffs, especially the [Tips section](#tips). 75 76In general, sheriffs should have a strong bias towards actions that keep the tree green and then open; if a simple revert can fix the problem, the sheriff <b>should revert first and ask questions later</b>. 77 78 79<a name="view_current_upcoming_sheriffs"></a> 80View current and upcoming sheriffs 81---------------------------------- 82 83The list of sheriffs is specified in the [skia-tree-status web app](https://skia-tree-status.appspot.com/sheriff). The current sheriff is highlighted in green. 84The banner on the top of the [status page](https://status.skia.org) also displays the current sheriff. 85 86 87<a name="how_to_swap"></a> 88How to swap sheriff shifts 89-------------------------- 90 91If you need to swap shifts with someone (because you are out sick or on vacation), please get approval from the person you want to swap with. Then send an email to skiabot@google.com to have someone make the database change (or directly ping rmistry@). 92 93 94<a name="tips"></a> 95Tips for sheriffs 96----------------- 97 98<a name="when_to_file_bugs"></a> 99### When to file bugs 100 101Pay close attention to the "Failures" view in the [status page](https://status.skia.org). 102Look at all existing [BreakingTheBuildbots bugs](https://bug.skia.org/?q=label:BreakingTheBuildbots). If the list is kept up to date then it should accurately represent everything that is causing failures. If it does not, then please file/update bugs accordingly. 103 104 105<a name="how_close_tree"></a> 106### How to close or re-open the tree 107 1081. Go to [skia-tree-status.appspot.com](https://skia-tree-status.appspot.com). 1092. Change the status. 110 * To close the tree, include the word "closed" in the status. 111 * To open the tree, include the word "open" in the status. 112 * To caution the tree, include the word "caution" in the status. 113 114 115<a name="how_to_submit_when_tree_closed"></a> 116### How to submit when the tree is closed 117 118* Submit manually using the "git cl land" with the --bypass-hooks flag. 119* Add "No-Tree-Checks: true" to your CL description and use the CQ as usual. 120 121 122<a name="how_to_revert"></a> 123### How to revert a CL 124 125See the revert documentation [here](https://skia.org/dev/contrib/revert). 126 127 128<a name="deps_roll_failures"></a> 129### What to do if DEPS roll fails to land 130 131A common cause of DEPS roll failures are layout tests. Find the offending Skia CL by examining the commit hash range in the DEPS roll and revert (or talk to the commit author if they are available). If you do revert then keep an eye on the next DEPS roll to make sure it succeeds. 132 133If a Skia CL changes layout tests, but the new images look good, the tests need to be rebaselined. See [Rebaseline Layout Tests](#how_to_rebaseline). 134 135<a name="how_to_rebaseline"></a> 136### Rebaseline Layout Tests (i.e., add suppressions) 137 138* First create a Chromium bug: 139 * goto [crbug.com](https://crbug.com) 140 * Make sure you're logged in with your Chromium credentials 141 * Click “New Issue” 142 * Summary: “Skia image rebaseline” 143 * Description: 144 * DEPS roll #, 145 * Helpful message about what went wrong (e.g., “Changes to how lighting is scaled in Skia r#### changed the following images:”) 146 * Layout tests affected 147 * You should copy the list of affected from stdio of the failing bot 148 * Status: Assigned 149 * Owner: yourself 150 * cc: reed@, bsalomon@, robertphillips@ & developer responsible for changes 151 * Labels: OS-All & Cr-Blink-LayoutTests 152 * If it is filter related, cc senorblanco@ 153 154* (Dispreferred but faster) Edit [skia/skia_test_expectations.txt](https://chromium.googlesource.com/chromium/src/+/master/skia/skia_test_expectations.txt) 155 * Add # comment about what has changed (I usually paraphrase the crbug text) 156 * Add line(s) like the following after the comment: 157 * crbug.com/<bug#youjustcreated> foo/bar/test-name.html [ ImageOnlyFailure ] 158 * Note: this change is usually done in the DEPS roll patch itself 159 160* (Preferred but slower) Make a separate Blink patch by editing LayoutTests/TestExpectations 161 * Add # comment about what has changed (I usually paraphrase the crbug text) 162 * Add line(s) like the following after the comment: 163 * crbug.com/<bug#youjustcreated> foo/bar/test-name.html [ Skip ] # needs rebaseline 164 * Commit the patch you created and wait until it lands and rolls into Chrome 165 166* Retry the DEPS roll (for the 1st/dispreferred option this usually means just retrying the layout bots) 167* Make a Blink patch by editing LayoutTests/TestExpectations 168 * Add # comment about what has changed 169 * Add line(s) like the following after the comment: 170 * crbug.com/<bug#youjustcreated> foo/bar/test-name.html [ Skip ] # needs rebaseline 171 * (if you took the second option above you can just edit the existing line(s)) 172 173* If you took the first/dispreferred option above: 174 * Wait for the Blink patch to roll into Chrome 175 * Create a Chrome patch that removes your suppressions from skia/skia_test_expectations.txt 176 177 178