• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1Tree Sheriffs Documentation
2===========================
3
4### Contents ###
5
6*   [What does a sheriff do?](#what_is_a_sheriff)
7    +   [Skia tree](#skia_tree)
8    +   [DEPS rolls](#deps_rolls)
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    +   [Compile bot failures automatically close the tree](#tree_closers)
17    +   [How to revert a CL](#how_to_revert)
18    +   [What to do if DEPS roll fails to land](#deps_roll_failures)
19    +   [How to rebaseline](#how_to_rebaseline)
20
21
22<a name="what_is_a_sheriff"></a>
23What does a sheriff do?
24-----------------------
25
26A sheriff keeps an eye on the tree, DEPS rolls, Gold tool and the Perf tool.
27
28Below is a brief summary of what the sheriff does for each task:
29
30<a name="skia_tree"></a>
31### Skia tree
32* Understand the [testing infrastructure](https://skia.org/dev/testing/automated_testing).
33* Start watching the [status page](https://status.skia.org) for bot breakages.
34* 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.
35* Close and open the [tree](http://skia-tree-status.appspot.com).
36* Keep the builder comments on the [status page](https://status.skia.org) up to date.
37* File or follow up with [BreakingTheBuildbots bugs](https://bug.skia.org/?q=label:BreakingTheBuildbots). See the tip on [when to file bugs](#when_to_file_bugs).
38
39<a name="blamer"></a>
40### Blamer
41If you have Go installed, a command-line tool is available to search through
42git history and do text searches on the full patch text and the commit
43message. To install blamer run:
44
45    go get go.skia.org/infra/blamer/go/blamer
46
47Then run blamer from within a Skia checkout. For example, to search if the
48string "SkDevice" has appeared in the last 10 commits:
49
50    $ $GOPATH/bin/blamer --match SkDevice --num 10
51
52    commit ea70c4bb22394c8dcc29a369d3422a2b8f3b3e80
53    Author: robertphillips <robertphillips@google.com>
54    Date:   Wed Jul 20 08:54:31 2016 -0700
55
56        Remove SkDevice::accessRenderTarget virtual
57        GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2167723002
58
59        Review-Url: https://codereview.chromium.org/2167723002
60
61<a name="deps_rolls"></a>
62### DEPS rolls
63* Ensure that [AutoRoll Bot](https://autoroll.skia.org)'s DEPS rolls land successfully.
64
65<a name="gold_and_perf"></a>
66### Gold and Perf
67* 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)).
68* 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.
69
70<a name="sheriff_doc"></a>
71### Documentation
72* Improve/update this documentation page for future sheriffs, especially the [Tips section](#tips).
73
74In 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>.
75
76
77<a name="view_current_upcoming_sheriffs"></a>
78View current and upcoming sheriffs
79----------------------------------
80
81The 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.
82The banner on the top of the [status page](https://status.skia.org) also displays the current sheriff.
83
84
85<a name="how_to_swap"></a>
86How to swap sheriff shifts
87--------------------------
88
89If 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@).
90
91
92<a name="tips"></a>
93Tips for sheriffs
94-----------------
95
96<a name="when_to_file_bugs"></a>
97### When to file bugs
98
99Pay close attention to the "Failures" view in the [status page](https://status.skia.org).
100Look 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.
101
102
103<a name="how_close_tree"></a>
104### How to close or re-open the tree
105
1061. Go to [skia-tree-status.appspot.com](https://skia-tree-status.appspot.com).
1072. Change the status.
108 *  To close the tree, include the word "closed" in the status.
109 * To open the tree, include the word "open" in the status.
110 * To caution the tree, include the word "caution" in the status.
111
112
113<a name="how_to_submit_when_tree_closed"></a>
114### How to submit when the tree is closed
115
116* Submit manually using the "git cl land" with the --bypass-hooks flag.
117* Add "No-Tree-Checks: true" to your CL description and use the CQ as usual.
118
119
120<a name="tree_closers"></a>
121### Compile bot failures automatically close the tree
122
123A failure of the build steps in all compile bots automatically closes the tree. Sheriffs will have to manually reopen the tree when they deem the problem fixed.
124
125Note: The tree is not closed automatically if the last run of the failed compile builder had the same failing step. The tree is also not closed if the tree was automatically closed less than 10 mins ago. If the tree is already closed then no action is taken.
126
127
128<a name="how_to_revert"></a>
129### How to revert a CL
130
131See the revert documentation [here](https://skia.org/dev/contrib/revert).
132
133
134<a name="deps_roll_failures"></a>
135### What to do if DEPS roll fails to land
136
137A 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.
138
139If 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).
140
141<a name="how_to_rebaseline"></a>
142### Rebaseline Layout Tests (i.e., add suppressions)
143
144* First create a Chromium bug:
145  * goto [crbug.com](https://crbug.com)
146  * Make sure you're logged in with your Chromium credentials
147  * Click “New Issue”
148  * Summary: “Skia image rebaseline”
149  * Description:
150      * DEPS roll #,
151      * Helpful message about what went wrong (e.g., “Changes to how lighting is scaled in Skia r#### changed the following images:”)
152      * Layout tests affected
153      * You should copy the list of affected from stdio of the failing bot
154  * Status: Assigned
155  * Owner: yourself
156  * cc: reed@, bsalomon@, robertphillips@ & developer responsible for changes
157  * Labels: OS-All & Cr-Blink-LayoutTests
158  * If it is filter related, cc senorblanco@
159
160* (Dispreferred but faster) Edit [skia/skia_test_expectations.txt](https://chromium.googlesource.com/chromium/src/+/master/skia/skia_test_expectations.txt)
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 [ ImageOnlyFailure ]
164  * Note: this change is usually done in the DEPS roll patch itself
165
166* (Preferred but slower) Make a separate Blink patch by editing LayoutTests/TestExpectations
167  * Add # comment about what has changed (I usually paraphrase the crbug text)
168  * Add line(s) like the following after the comment:
169      * crbug.com/<bug#youjustcreated> foo/bar/test-name.html [ NeedsManualRebaseline ]
170  * Commit the patch you created and wait until it lands and rolls into Chrome
171
172* Retry the DEPS roll (for the 1st/dispreferred option this usually means just retrying the layout bots)
173* Make a Blink patch by editing LayoutTests/TestExpectations
174  * Add # comment about what has changed
175  * Add line(s) like the following after the comment:
176      * crbug.com/<bug#youjustcreated> foo/bar/test-name.html [ NeedsRebaseline ]
177        * (if you took the second option above you can just edit the existing line(s))
178
179* If you took the first/dispreferred option above:
180  * Wait for the Blink patch to roll into Chrome
181  * Create a Chrome patch that removes your suppressions from skia/skia_test_expectations.txt
182
183
184