xref: /aosp_15_r20/external/skia/site/docs/dev/gardening/_index.md (revision c8dee2aa9b3f27cf6c858bd81872bdeb2c07ed17)
1---
2title: 'Skia Gardener Documentation'
3linkTitle: 'Skia Gardener Documentation'
4
5weight: 8
6---
7
8### Contents
9
10- [What does a Skia Gardener do?](#what_is_a_skia_gardener)
11  - [Skia tree](#skia_tree)
12  - [Triage](#triage)
13  - [Blamer](#blamer)
14  - [AutoRollers](#autorollers)
15  - [Gold and Perf](#gold_and_perf)
16  - [Documentation](#skia_gardener_doc)
17- [Preparing for your rotation](#preparations)
18  - [Useful bookmarks](#useful_bookmarks)
19  - [Chat rooms](#chat_rooms)
20- [View current and upcoming rotations](#view_current_upcoming_rotations)
21- [How to swap rotation shifts](#how_to_swap)
22- [Tips for Skia Gardeners](#tips)
23  - [When to file bugs](#when_to_file_bugs)
24  - [How to close or re-open the tree](#how_close_tree)
25  - [How to revert a CL](#how_to_revert)
26  - [What to do if DEPS roll fails to land](#deps_roll_failures)
27  - [How to rebaseline](#how_to_rebaseline)
28
29<a name="what_is_a_skia_gardener"></a>
30
31## What does a Skia Gardener do?
32
33---
34
35A Skia Gardener keeps an eye on the tree, DEPS rolls, Gold tool, the Perf tool,
36and triages Chrome bugs.
37
38Below is a brief summary of what the gardener does for each task:
39
40<a name="skia_tree"></a>
41
42### Skia tree
43
44- Understand the
45  [testing infrastructure](https://skia.org/docs/dev/testing/automated_testing).
46- Start watching the [status page](https://status.skia.org) for bot breakages.
47- Track down people responsible for breakages and revert broken changes if there
48  is no easy fix. You can use [blamer](#blamer) to help track down such changes.
49   - For clean reverts, you need to add "Rubber Stamper" if the author isn't around to +1
50     the change. See [go/rubber-stamper-user-guide](http://go/rubber-stamper-user-guide) for more.
51   - For dirty reverts, you can use [go/skia-break-glass](http://go/skia-break-glass) to
52     move quickly.
53- Close and open the [tree](http://tree-status.skia.org).
54- Keep the builder comments on the [status page](https://status.skia.org) up to
55  date.
56- File or follow up with
57  [BreakingTheBuildbots bugs](https://bugs.chromium.org/p/skia/issues/list?q=label:BreakingTheBuildbots).
58  See the tip on [when to file bugs](#when_to_file_bugs).
59- Read and update the
60  [Ongoing Issues section](https://docs.google.com/document/d/1y2jUf4vXI0fwhu2TiCLVIfWC1JOxFcHXGw39y7i-y_I/edit#heading=h.tpualuc3p7z0)
61  in the handoff doc.
62- (Optional) Document significant events that occurred during your shift in the
63  [Weekly Handoff Notes section](https://docs.google.com/document/d/1y2jUf4vXI0fwhu2TiCLVIfWC1JOxFcHXGw39y7i-y_I/edit#heading=h.y49irwbutzr)
64  in the handoff doc.
65
66<a name="triage"></a>
67
68### Triage
69
70You should triage Chromium, Skia, and OSS-fuzz bugs that show up under "Untriaged Bugs" on
71the [status page](https://status.skia.org). The Android Gardener will triage the
72untriaged Android Bugs. For a more detailed view of bugs see
73[Skia Bugs Central](https://bugs-central.skia.org/).
74
75To access the oss-fuzz bugs, see [go/skia-fuzz](http://go/skia-fuzz).
76
77<a name="blamer"></a>
78
79### Blamer
80
81If you have Go installed, a command-line tool is available to search through git
82history and do text searches on the full patch text and the commit message. To
83install blamer run:
84
85    go get go.skia.org/infra/blamer/go/blamer
86
87Then run blamer from within a Skia checkout. For example, to search if the
88string "SkDevice" has appeared in the last 10 commits:
89
90    $ $GOPATH/bin/blamer --match SkDevice --num 10
91
92    commit ea70c4bb22394c8dcc29a369d3422a2b8f3b3e80
93    Author: robertphillips <[email protected]>
94    Date:   Wed Jul 20 08:54:31 2016 -0700
95
96        Remove SkDevice::accessRenderTarget virtual
97        GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2167723002
98
99        Review-Url: https://codereview.chromium.org/2167723002
100
101<a name="autorollers"></a>
102
103### Autorollers
104
105- Ensure that all AutoRollers listed on the
106  [status page](https://status.skia.org) are successfully landing.
107
108<a name="gold_and_perf"></a>
109
110### Gold and Perf
111
112- Pay attention for new [Perf](https://perf.skia.org/) and
113  [Gold](https://gold.skia.org/) alerts (by clicking on the bell at the top
114  right of the [status page](https://status.skia.org)).
115- The gardener's duty here is to make sure that when developers introduce new
116  images or new perf regressions, that they are aware of what happened, and they
117  use these tools to take appropriate action.
118
119<a name="skia_gardener_doc"></a>
120
121### Documentation
122
123- Improve/update this documentation page for future gardeners, especially the
124  [Tips section](#tips).
125
126In general, gardeners should have a strong bias towards actions that keep the
127tree green and then open; if a simple revert can fix the problem, the gardener
128<b>should revert first and ask questions later</b>.
129
130<a name="preparations"></a>
131
132## Preparing for your rotation
133
134---
135
136<a name="useful_bookmarks"></a>
137
138### Useful bookmarks
139
140- [The Chromium main console](https://ci.chromium.org/p/chromium/g/main/console).
141- [The Flutter engine console](https://ci.chromium.org/p/flutter/g/engine/console).
142- [Skia client search](http://go/skia-client-search),
143  a tool for searching the codebases of all skia clients at once. See //tools/skia-client-search.html
144  for the public version.
145
146<a name="chat_rooms"></a>
147
148### Chat rooms
149
150- [Flutter Engine Sherriff](https://chat.google.com/room/AAAAm69vf-M) room to
151  watch for Flutter issues that are caused by Skia bugs or need assistance from
152  our team.
153
154<a name="view_current_upcoming_rotations"></a>
155
156## View current and upcoming rotations
157
158---
159
160The list of Skia Gardeners is specified
161[here](http://go/skia-gardener-rotation). The
162gardeners widget on the [status page](https://status.skia.org) also displays the
163current gardeners.
164
165<a name="how_to_swap"></a>
166
167## How to swap rotation shifts
168
169---
170
171If you need to swap shifts with someone (because you are out sick or on
172vacation), please get approval from the person you want to swap with and
173directly make the swap via the
174[rotations page](http://go/skia-gardener-rotation).
175
176<a name="tips"></a>
177
178## Tips for Skia Gardeners
179
180---
181
182<a name="when_to_file_bugs"></a>
183
184### When to file bugs
185
186Pay close attention to the "Failures" view in the
187[status page](https://status.skia.org). Look at all existing
188[BreakingTheBuildbots bugs](https://bug.skia.org/?q=label:BreakingTheBuildbots).
189If the list is kept up to date then it should accurately represent everything
190that is causing failures. If it does not, then please file/update bugs
191accordingly.
192
193<a name="how_close_tree"></a>
194
195### How to close or re-open the tree
196
1971. Go to [tree-status.skia.org](https://tree-status.skia.org).
1982. Change the status.
199
200- To close the tree, include the word "closed" in the status.
201- To open the tree, include the word "open" in the status.
202- To caution the tree, include the word "caution" in the status.
203
204<a name="how_to_submit_when_tree_closed"></a>
205
206### How to submit when the tree is closed
207
208- Submit manually using the "git cl land" with the --bypass-hooks flag.
209- Add "No-Tree-Checks: true" to your CL description and use the CQ as usual.
210
211<a name="how_to_revert"></a>
212
213### How to revert a CL
214
215See the revert documentation [here](https://skia.org/docs/dev/contrib/revert).
216
217<a name="deps_roll_failures"></a>
218
219### What to do if DEPS roll fails to land
220
221A common cause of DEPS roll failures are layout tests. Find the offending Skia
222CL by examining the commit hash range in the DEPS roll and revert (or talk to
223the commit author if they are available). If you do revert then keep an eye on
224the next DEPS roll to make sure it succeeds.
225
226If a Skia CL changes layout tests, but the new images look good, the tests need
227to be rebaselined. See [Rebaseline Layout Tests](#how_to_rebaseline).
228
229<a name="how_to_rebaseline"></a>
230
231### Rebaseline Layout Tests (i.e., add suppressions)
232
233- First create a Chromium bug:
234
235  - goto [crbug.com](https://crbug.com)
236  - Make sure you're logged in with your Chromium credentials
237  - Click “New Issue”
238  - Summary: “Skia image rebaseline”
239  - Description:
240    - DEPS roll #,
241    - Helpful message about what went wrong (e.g., “Changes to how lighting is
242      scaled in Skia r#### changed the following images:”)
243    - Layout tests affected
244    - You should copy the list of affected from stdio of the failing bot
245  - Status: Assigned
246  - Owner: yourself
247  - cc: bsalomon@, robertphillips@ & developer responsible for changes
248  - Labels: OS-All & Cr-Blink-LayoutTests
249  - If it is filter related, cc senorblanco@
250
251- (Dispreferred but faster) Edit
252  [skia/skia_test_expectations.txt](https://chromium.googlesource.com/chromium/+/refs/heads/trunk/skia/skia_test_expectations.txt)
253
254  - Add # comment about what has changed (I usually paraphrase the crbug text)
255  - Add line(s) like the following after the comment:
256    - crbug.com/<bug#youjustcreated> foo/bar/test-name.html [ ImageOnlyFailure ]
257  - Note: this change is usually done in the DEPS roll patch itself
258
259- (Preferred but slower) Make a separate Blink patch by editing
260  LayoutTests/TestExpectations
261
262  - Add # comment about what has changed (I usually paraphrase the crbug text)
263  - Add line(s) like the following after the comment:
264    - crbug.com/<bug#youjustcreated> foo/bar/test-name.html [ Skip ] # needs
265      rebaseline
266  - Commit the patch you created and wait until it lands and rolls into Chrome
267
268- Retry the DEPS roll (for the 1st/dispreferred option this usually means just
269  retrying the layout bots)
270- Make a Blink patch by editing LayoutTests/TestExpectations
271
272  - Add # comment about what has changed
273  - Add line(s) like the following after the comment:
274    - crbug.com/<bug#youjustcreated> foo/bar/test-name.html [ Skip ] # needs
275      rebaseline
276      - (if you took the second option above you can just edit the existing
277        line(s))
278
279- If you took the first/dispreferred option above:
280  - Wait for the Blink patch to roll into Chrome
281  - Create a Chrome patch that removes your suppressions from
282    skia/skia_test_expectations.txt
283