Friday, September 23, 2011
Twisted's BuildBot master configuration
Wednesday, September 7, 2011
Pre-trunk Testing
Twisted uses BuildBot for continuous integration - for testing every revision to ensure it passes the full test suite. BuildBot automatically runs the test suite on each version of Python and each operating system supported by Twisted. As of today, that's 22 different configurations, plus another 16 configurations where Twisted is known not to work completely but where we are workings towards full support.
This works very well for identifying regressions and for finding problems with new functionality on platforms a developer may not have considered. However, because Twisted prefers to keep trunk@HEAD completely working and the test suite fully passing on all platforms, if BuildBot identifies a problem with a trunk revision, we revert it completely. Then the problems with it can be addressed and another attempt made. This also works, but it has a couple shortcomings. Someone actually has to do the revert, which is a little bit of work. Also, someone might check out trunk@HEAD before the change is reverted, giving them a non-working version of Twisted. It's nice to be able to avoid both of these things.
The solution generally applied is to test the change before applying it to trunk. BuildBot can do this too, in a couple different ways. The way we use for Twisted development is to have BuildBot run the test suite on all those supported configurations on a branch of Twisted, rather than on trunk. Since the change is checked in to a branch, instead of to trunk, it avoids the needed to revert anything and it avoids offering broken code to people.
This approach involves a tiny custom tool to convince BuildBot to run the necessary builds. Normally BuildBot just watches for trunk commits and starts builds automatically. Since in this case we want the trunk commit to happen after we see that all the builds will succeed, we use force-builds.py to have BuildBot perform the builds before it sees the trunk commit.
For a long time, force-builds.py needed a hard-coded list of supported platforms on which to trigger builds. Recently I fixed this by having it retrieve that list from the BuildBot master, which already knows which platforms are supported. Publishing this information is done with a minor hack to master.cfg:
supportedList = list(
builder['name']
for builder
in builders
if builder['category'] == 'supported')
path = 'public_html/supported-builders.txt'
supportedListFile = file(path, 'w')
supportedListFile.write('\n'.join(supportedList) + '\n')
supportedListFile.close()
The resulting file is publicly available from the master's web server, so force-builds.py can download it on-demand and then force a build on each supported builder. When the developer sees all of these builds have succeeded, he or she can be more confident that there aren't going to be any surprises when the change is actually applied to trunk.
Wednesday, August 10, 2011
New Buildbot!
And far to the East where strife sired shadowsJean-Paul and I had some hardware adventures a couple weekends ago. As these things usually are, it was harrowing - but perhaps less so than it might have been. By combining, in approximately equal parts, some unused components which have been ripening in the back of a closet in JP's apartment and some newly acquired materiels from the local vendor everyone (well, we, at least) loves to hate, and with only a few false starts involving incorrect memory channel configurations, Twisted now has the use of a somewhat hefty new computer, visible here in its new home, the undisclosed subterranean location that hosts all of Twisted's buildbot machines:
Abaelnorn.localdid rise and approach the light.
Out cameillidan.localover once fair meadows,
And in defeat left his people weeping for their plight.
-kabuto.local's A Record
Don't ask my why it glows blue; it is my understanding that this is simply the fashion these days.
With enough cores and gigabytes of memory so that I have trouble counting them all, this machine should serve us well hosting many a build slave. It has already taken over the duties of several older slaves, including those of a couple Windows slaves, care of kvm (the machine itself is running Ubuntu Lucid (10.04) of course). The very nice network it is attached to means that remotely interacting with these is now only minimally unpleasant.
The machine is also translating PyPy (in a respectable 34 minutes) once a week so we can continue to test Twisted against the latest development versions of the PyPy runtime.
Tuesday, July 5, 2011
Volunteers needed for Twisted project jobs
To everyone who contributes to the Twisted project in some way, thank you!
Twisted project jobs
A small group of dedicated Twisted developers have been doing maintenance work over the years that we'd like to start distributing across more of the community. These tasks include:- maintaining Buildbot buildslaves
- maintaining the Twisted Speed Center
- maintaining our Trac instance
- maintaining version control mirrors
Twisted Matrix Labs high scores
Are you competitive? Need a little extra incentive to contribute? I challenge you to get to the top of the monthly Twisted Matrix Labs high scores list:
Tuesday, May 31, 2011
May Sprint Report
#4813 - provide permissions accessor for filepath
#5053 - Add Gzip support to web client
#5088 - cfreactor cannot be imported
#5063 - When TLS transport is in writeBlockedOnRead=True mode, data is buffered in memory but producer APIs are not respected
#5095 - twisted.protocols.tls should flush all of the bio data, rather than just 2**15 bytes
Monday, May 16, 2011
Evennia: Event-Driven Online Gaming with Twisted and Django
Whereas traditional MUD servers only speak telnet, Evennia additionally comes with its own browser-based client and allows for expanding with custom game protocols in any combination. ... All of this is straightforward to implement and maintain thanks to Twisted!
Evennia also combines Twisted with Django, providing a comprehensive real-world case study of melding these two popular systems. As Griatch puts it, Twisted and Django "work beautifully together".
To find out more about how Twisted was the perfect fit for this massively multi-player platform and why the Evennia team chose Twisted, check out the success story.
Sunday, April 3, 2011
Twisted 11.0.0 released!
On behalf of Twisted Matrix Laboratories, I am honored to announce the release of Twisted 11.0.0.
Highlights include:
- a new templating system in Twisted Web, "twisted.web.template", derived from Divmod Nevow.
- improved behavior of subprocess spawning on FreeBSD.
- the 'twistd mail' plugin now uses the endpoints API, providing a more consistent command line and compatibility with endpoint plugins.
- twisted.plugin no longer emits a confusing traceback when it can't write a cache file.
and numerous other bugfixes and documentation improvements. For more information, see the NEWS file.
Download it now from:
or install the 'Twisted' package from PyPI.
Many thanks to Glyph Lefkowitz and Jean-Paul Calderone for sanity-checking the pre-releases and release, and to the enthusiastic PyCon 2011 sprinters who annihilated dozens of tickets. Thanks to *everyone* who contributed tickets, patches, documentation, reviews, buildbots, feedback, and assistance to fellow users and developers leading up to this release. It is truly a group effort.
<http://twistedmatrix.com/highscores/?time=2011-03-01>
is a testament to how much work was done in March alone.