WebKit gardening is the process of regularly incrementing webkit_revision in Chromium DEPS file, staying as close as possible to the tip of WebKit trunk, while ensuring that these updates don't bring regressions into the Chromium tree. A regression is a failure of any of the build steps on the Chromium waterfall.
The revision increment is commonly called a roll, though you are free to call it anything you'd like. The gardeners use Chromium canary bots, webkit waterfall, flakiness dashboard, and rebaseline as their tools. All Chromium engineers who are actively involved in WebKit development participate in WebKit gardening.
Tools
PrerequisitesA gardener should be both WebKit and Chromium committer. There's a gardening schedule. If you're in rotation, there will be an email notifying you of the upcoming stint. How to GardenAs a gardener, you directly contribute to the quality of Chromium. Any regressions you bring in may end up in released code. An innocent-looking single layout test failure may bring half of the Web to its knees. Don't bring the Web to its knees. You are the final line of defense. Here is a set of general rules, distilled from our collective gardening experiences:
Here's a typical gardening checklist:
Things That Can Go WrongGardening is tricky business. Some equated it to dancing on the minefield, or running in front of a speeding train -- figuratively, of course. Nevertheless, it's important to recognize that unexpected bad things will happen and be prepared. Here are a few known "hair-on-fire" situations and solutions to them:
Occasionally, your change may span both WebKit and Chromium. These types of patches are called two-sided, and whenever possible, try to avoid them. They're quite often a huge amount of trouble and usually take way more effort than what it'd usually take to split it up: Making a two sided patch a multi-step patch: Often a 2 sided patch can be done as an initial patch, the other side, and then a cleanup patch. For example, if I was changing a method in the WebKit API that looked like this: virtual void setItem(const WebString& key, const WebString& newValue, const WebURL& url, bool& quotaException, WebString& oldValue) = 0; And I want to change the bool& to a more general Result type, I can make the code look like this: virtual void setItem(const WebString& key, const WebString& newValue, const WebURL& url, Result& result, WebString& oldValue) { bool quotaException = false; setItem(key, newValue, url, quotaException, oldValue); result = quotaException ? ResultBlockedByQuota : ResultOK; } // FIXME: Remove soon (once Chrome has rolled past this revision). virtual void setItem(const WebString& key, const WebString& newValue, const WebURL& url, bool& quotaException, WebString& oldValue) { Result result; setItem(key, newValue, url, result, oldValue); quotaException = result != ResultOK; } Since the method started off as pure virtual, I know it must be implemented in Chromium. Thus I don't need to worry about an infinite recursion problem, even though these both call each other. Once this is landed and rolled in, I can then change which method Chromium uses. And, finally, I can then remove this little hack from WebKit. Every two sided patch is different and will likely need different tricks for different situations, but if you really give it a shot, you can often make your life much simpler. Landing a two sided patch: If you absolutely can't split up your patch, this is the procedure:
If you are in a time crunch and can't avoid the two sided patch, you're much better off doing a non-two-sided hack initially and then coming back and doing the two-sided patch later. |