WebKit Early Warning System (EWS)
The WebKit Early Warning System is a designed to help catch build failures/test failures before patches are committed into WebKit. The EWS checks every patch posted for review on bugs.webkit.org using a system of queues, one for each port (Mac, Win, Chromium) as well as queues for Style as well as committer/reviewer flag compliance. Failing an EWS check results in a patch being marked as cq- and a comment being added to the bug. The WatchList support is also implemented as part of the EWS.
Modifying the Early Warning System
The EWS is part of webkitpy. The EWS bots are implemented as hidden webkit-patch commands, the server side is implemented in Google App Engine. All code changes go through the normal review system, and testing of webkitpy (including the EWS) is done by test-webkitpy.
Adding a new EWS Bot
- Preconditions: First ensure that the machine has all needed to build WebKit. So first build WebKit and run the tests and check that the machine can do that without problem.
Anyone can start a new EWS bot for an existing queue, but simply running "webkit-patch mac-ews", "win-ews" or whichever queue they would like to run.
The EWS system is designed to handle any number of EWS bots running per queue, and will distribute patches to idle bots accordingly.
We've had the most experience running EWS bots using git working copies (although SVN should also work in theory). It's helpful if you run the EWS bot as a bugs.webkit.org user with the EditBugs privilege so that it can leave comments on bugs. To give the bot some bugs.webkit.org credentials, add the following lines to your .git/config:
[bugzilla] username = email@example.com password = password123
Normally administrators run EWS bots using the start-queues.sh script found in the EWSTools package. Be very careful running it; note that it depends on symlinks in /mnt/git/
Adding a new EWS bot to the WebKitGTK+ queue
This an easy-to-follow step-by-step guide to add a new EWS to the WebKitGTK+ queue. Anyone can add an EWS, you don't need any special permission. You just need a computer where to run the EWS. Its not needed to run your EWS 24/7 (though if you can, better). You can configure your computer to execute the EWS only when you are away (for example)
- Clone the Webkit Git repo and setup the git-svn mirror as explained here https://trac.webkit.org/wiki/UsingGitWithWebKit#Checkout
- Install the system dependencies. Run the script:
- Install ccache:
sudo apt-get install ccache
- If you have more machines on your network, you can also setup icecc. Check: WebKitGTK/SpeedUpBuild
- Build the jhbuild modules needed to build WebKitGTK+. Run the script:
- Now build it manually to ensure that it builds as expected. Run the script:
Tools/Scripts/build-webkit --release --gtk
- Now create a new bugzilla account for the EWS (for security reasons is not a good idea to reuse your current bugzilla account for this)
- Save the new bugzilla credentials in the file $WEBKITREPO/.git/config:
$ cat .git/config ... [bugzilla] username = "firstname.lastname@example.org" password = "your-bugzilla-password-here"
- Get the script webkit-run-ews.sh . A good place for saving it would be the parent folder in which you have cloned the WebKit Git repo.
- Edit the variables on it.
- Run the script from a screen or tmux session.
- If everything worked as expected, you should see your EWS at: https://webkit-queues.webkit.org/queue-status/gtk-wk2-ews
Adding a new EWS Queue
Adding a new queue to the EWS (for a new port, or some new type of patch validation) requires both adding a new webkit-patch command to earlywarningsystem.py, as well as editing the server-side list of queues.
If you plan to add a new EWS Queue you should CC both abarth and eseidel on your patches.