[Buildbot-devel] getting rid of mktap

Brian Warner warner-buildbot at lothar.com
Wed Apr 27 21:53:51 UTC 2005


FYI, in the next release (not the one today, but the one after that), I'm
probably going to get rid of buildbot.tap and the use of 'mktap' in favor of
a .tac file. The 'buildbot master' and 'buildbot slave' commands will write
this "buildbot.tac" file to the target directory instead of asking mktap to
create the buildbot.tap file, and the 'buildbot start' command will run
'twistd -y buildbot.tac' instead of the current 'twistd -f buildbot.tap'.

Twisted .tac files are short python fragments which just set up an
Application instance. When twistd is given a .tac file, it exec's the
fragment and then launches the Application object inside.

The bugs of the last few days result from the two-stage mktap process: mktap
instantiates the BuildMaster, then asks it to save itself to a pickle. Later,
twistd loads the saved pickle and tells the object to start running. There
were a couple of places where saving a BuildMaster instance that had never
actually been started caused problems.

I used .tap files initially because back then we stored the entire
buildmaster status in that .tap file. Now that we save things out to separate
changes.pck and builder.pck files, there is no long-term information kept in
the .tap file. The new buildbot.tac file will be about four lines long, and
has the benefit of being human-readable and editable, so if you want to
change any of it's parameters, you can just edit it and restart. This also
removes the need for the 'make tap' target in the convenience Makefile.

Also note that, if you need to run the buildmaster/slave under a different
reactor, you still have to tell twistd about it. By the time the .tac file is
loaded, it's too late to choose an alternate reactor.


cheers,
 -Brian




More information about the devel mailing list