From warner at users.sourceforge.net Tue Jan 3 09:26:43 2006 From: warner at users.sourceforge.net (Brian Warner) Date: Tue, 03 Jan 2006 09:26:43 +0000 Subject: [Buildbot-commits] buildbot/buildbot/status builder.py,1.73,1.74 Message-ID: Update of /cvsroot/buildbot/buildbot/buildbot/status In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20675/buildbot/status Modified Files: builder.py Log Message: Revision: arch at buildbot.sf.net--2004/buildbot--dev--0--patch-452 Creator: Brian Warner fix a bug: config-file reload would half-clobber all Schedulers * buildbot/master.py (BuildMaster): remove the .schedulers attribute, replacing it with an allSchedulers() method that looks for all IService children that implement IScheduler. Having only one parent/child relationship means fewer opportunities for bugs. (BuildMaster.allSchedulers): new method (BuildMaster.loadConfig_Schedulers): update to use allSchedulers, also fix ugly bug that caused any config-file reload to half-forget about the earlier Schedulers, causing an exception when a Change arrived and was handed to a half-connected Scheduler. The exception was in scheduler.py line 54ish: self.parent.submitBuildSet(bs) exceptions.AttributeError: 'NoneType' object has no attribute 'submitBuildSet' (BuildMaster.addChange): update to use allSchedulers() * buildbot/scheduler.py (BaseScheduler.__implements__): fix this to work properly with twisted-1.3.0, where you must explicitly include the __implements__ from parent classes (BaseScheduler.__repr__): make it easier to distinguish distinct instances (BaseUpstreamScheduler.__implements__): same * buildbot/status/builder.py (Status.getSchedulers): update to use allSchedulers() * buildbot/test/test_run.py (Run.testMaster): same * buildbot/test/test_dependencies.py (Dependencies.findScheduler): same * buildbot/test/test_config.py (ConfigTest.testSchedulers): same, make sure Scheduler instances are left alone when an identical config file is reloaded (ConfigElements.testSchedulers): make sure Schedulers are properly comparable * Makefile (TRIALARGS): my local default Twisted version is now 2.1.0, update the trial arguments accordingly Index: builder.py =================================================================== RCS file: /cvsroot/buildbot/buildbot/buildbot/status/builder.py,v retrieving revision 1.73 retrieving revision 1.74 diff -u -d -r1.73 -r1.74 --- builder.py 27 Nov 2005 00:46:13 -0000 1.73 +++ builder.py 3 Jan 2006 09:26:41 -0000 1.74 @@ -1810,7 +1810,7 @@ def getSchedulers(self): - return self.botmaster.parent.schedulers + return self.botmaster.parent.allSchedulers() def getBuilderNames(self, categories=None): if categories == None: From warner at users.sourceforge.net Tue Jan 3 09:26:43 2006 From: warner at users.sourceforge.net (Brian Warner) Date: Tue, 03 Jan 2006 09:26:43 +0000 Subject: [Buildbot-commits] buildbot/buildbot/test test_dependencies.py,1.2,1.3 test_config.py,1.32,1.33 test_run.py,1.36,1.37 Message-ID: Update of /cvsroot/buildbot/buildbot/buildbot/test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20675/buildbot/test Modified Files: test_dependencies.py test_config.py test_run.py Log Message: Revision: arch at buildbot.sf.net--2004/buildbot--dev--0--patch-452 Creator: Brian Warner fix a bug: config-file reload would half-clobber all Schedulers * buildbot/master.py (BuildMaster): remove the .schedulers attribute, replacing it with an allSchedulers() method that looks for all IService children that implement IScheduler. Having only one parent/child relationship means fewer opportunities for bugs. (BuildMaster.allSchedulers): new method (BuildMaster.loadConfig_Schedulers): update to use allSchedulers, also fix ugly bug that caused any config-file reload to half-forget about the earlier Schedulers, causing an exception when a Change arrived and was handed to a half-connected Scheduler. The exception was in scheduler.py line 54ish: self.parent.submitBuildSet(bs) exceptions.AttributeError: 'NoneType' object has no attribute 'submitBuildSet' (BuildMaster.addChange): update to use allSchedulers() * buildbot/scheduler.py (BaseScheduler.__implements__): fix this to work properly with twisted-1.3.0, where you must explicitly include the __implements__ from parent classes (BaseScheduler.__repr__): make it easier to distinguish distinct instances (BaseUpstreamScheduler.__implements__): same * buildbot/status/builder.py (Status.getSchedulers): update to use allSchedulers() * buildbot/test/test_run.py (Run.testMaster): same * buildbot/test/test_dependencies.py (Dependencies.findScheduler): same * buildbot/test/test_config.py (ConfigTest.testSchedulers): same, make sure Scheduler instances are left alone when an identical config file is reloaded (ConfigElements.testSchedulers): make sure Schedulers are properly comparable * Makefile (TRIALARGS): my local default Twisted version is now 2.1.0, update the trial arguments accordingly Index: test_config.py =================================================================== RCS file: /cvsroot/buildbot/buildbot/buildbot/test/test_config.py,v retrieving revision 1.32 retrieving revision 1.33 diff -u -d -r1.32 -r1.33 --- test_config.py 25 Nov 2005 01:25:11 -0000 1.32 +++ test_config.py 3 Jan 2006 09:26:41 -0000 1.33 @@ -16,6 +16,7 @@ from buildbot.twcompat import providedBy, maybeWait from buildbot.master import BuildMaster from buildbot import scheduler +from buildbot import interfaces as ibb from twisted.application import service, internet from twisted.spread import pb from twisted.web.server import Site @@ -511,7 +512,7 @@ master = self.buildmaster master.loadChanges() master.loadConfig(emptyCfg) - self.failUnlessEqual(master.schedulers, []) + self.failUnlessEqual(master.allSchedulers(), []) self.schedulersCfg = \ """ @@ -565,8 +566,9 @@ d.addCallback(self._testSchedulers_4) return d def _testSchedulers_4(self, res): - self.failUnlessEqual(len(self.buildmaster.schedulers), 1) - s = self.buildmaster.schedulers[0] + sch = self.buildmaster.allSchedulers() + self.failUnlessEqual(len(sch), 1) + s = sch[0] self.failUnless(isinstance(s, scheduler.Scheduler)) self.failUnlessEqual(s.name, "full") self.failUnlessEqual(s.branch, None) @@ -579,17 +581,33 @@ c['schedulers'] = [s1, Dependent('downstream', s1, ['builder1'])] """ d = self.buildmaster.loadConfig(newcfg) - d.addCallback(self._testSchedulers_5) + d.addCallback(self._testSchedulers_5, newcfg) return d - def _testSchedulers_5(self, res): - self.failUnlessEqual(len(self.buildmaster.schedulers), 2) - s = self.buildmaster.schedulers[0] + def _testSchedulers_5(self, res, newcfg): + sch = self.buildmaster.allSchedulers() + self.failUnlessEqual(len(sch), 2) + s = sch[0] self.failUnless(isinstance(s, scheduler.Scheduler)) - s = self.buildmaster.schedulers[1] + s = sch[1] self.failUnless(isinstance(s, scheduler.Dependent)) self.failUnlessEqual(s.name, "downstream") self.failUnlessEqual(s.builderNames, ['builder1']) + # reloading the same config file should leave the schedulers in place + d = self.buildmaster.loadConfig(newcfg) + d.addCallback(self._testschedulers_6, sch) + return d + def _testschedulers_6(self, res, sch1): + sch2 = self.buildmaster.allSchedulers() + self.failUnlessEqual(len(sch2), 2) + sch1.sort() + sch2.sort() + self.failUnlessEqual(sch1, sch2) + self.failUnlessIdentical(sch1[0], sch2[0]) + self.failUnlessIdentical(sch1[1], sch2[1]) + self.failUnlessIdentical(sch1[0].parent, self.buildmaster) + self.failUnlessIdentical(sch1[1].parent, self.buildmaster) + def testBuilders(self): master = self.buildmaster @@ -828,6 +846,32 @@ master.loadConfig(lockCfg2c) self.failIfIdentical(b1, master.botmaster.builders["builder1"]) +class ConfigElements(unittest.TestCase): + # verify that ComparableMixin is working + def testSchedulers(self): + s1 = scheduler.Scheduler(name='quick', branch=None, + treeStableTimer=30, + builderNames=['quick']) + s2 = scheduler.Scheduler(name="all", branch=None, + treeStableTimer=5*60, + builderNames=["a", "b"]) + s3 = scheduler.Try_Userpass("try", ["a","b"], port=9989, + userpass=[("foo","bar")]) + s1a = scheduler.Scheduler(name='quick', branch=None, + treeStableTimer=30, + builderNames=['quick']) + s2a = scheduler.Scheduler(name="all", branch=None, + treeStableTimer=5*60, + builderNames=["a", "b"]) + s3a = scheduler.Try_Userpass("try", ["a","b"], port=9989, + userpass=[("foo","bar")]) + self.failUnless(s1 == s1) + self.failUnless(s1 == s1a) + self.failUnless(s1a in [s1, s2, s3]) + self.failUnless(s2a in [s1, s2, s3]) + self.failUnless(s3a in [s1, s2, s3]) + + class ConfigFileTest(unittest.TestCase): Index: test_dependencies.py =================================================================== RCS file: /cvsroot/buildbot/buildbot/buildbot/test/test_dependencies.py,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- test_dependencies.py 14 Oct 2005 19:32:55 -0000 1.2 +++ test_dependencies.py 3 Jan 2006 09:26:41 -0000 1.3 @@ -74,7 +74,7 @@ return maybeWait(d) def findScheduler(self, name): - for s in self.master.schedulers: + for s in self.master.allSchedulers(): if s.name == name: return s raise KeyError("No Scheduler named '%s'" % name) Index: test_run.py =================================================================== RCS file: /cvsroot/buildbot/buildbot/buildbot/test/test_run.py,v retrieving revision 1.36 retrieving revision 1.37 diff -u -d -r1.36 -r1.37 --- test_run.py 27 Nov 2005 00:46:13 -0000 1.36 +++ test_run.py 3 Jan 2006 09:26:41 -0000 1.37 @@ -92,7 +92,7 @@ c = changes.Change("bob", ["Makefile", "foo/bar.c"], "changed stuff") cm.addChange(c) # verify that the Scheduler is now waiting - s = m.schedulers[0] + s = m.allSchedulers()[0] self.failUnless(s.timer) # halting the service will also stop the timer d = defer.maybeDeferred(m.stopService) From warner at users.sourceforge.net Tue Jan 3 09:26:43 2006 From: warner at users.sourceforge.net (Brian Warner) Date: Tue, 03 Jan 2006 09:26:43 +0000 Subject: [Buildbot-commits] buildbot ChangeLog,1.564,1.565 Makefile,1.17,1.18 Message-ID: Update of /cvsroot/buildbot/buildbot In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20675 Modified Files: ChangeLog Makefile Log Message: Revision: arch at buildbot.sf.net--2004/buildbot--dev--0--patch-452 Creator: Brian Warner fix a bug: config-file reload would half-clobber all Schedulers * buildbot/master.py (BuildMaster): remove the .schedulers attribute, replacing it with an allSchedulers() method that looks for all IService children that implement IScheduler. Having only one parent/child relationship means fewer opportunities for bugs. (BuildMaster.allSchedulers): new method (BuildMaster.loadConfig_Schedulers): update to use allSchedulers, also fix ugly bug that caused any config-file reload to half-forget about the earlier Schedulers, causing an exception when a Change arrived and was handed to a half-connected Scheduler. The exception was in scheduler.py line 54ish: self.parent.submitBuildSet(bs) exceptions.AttributeError: 'NoneType' object has no attribute 'submitBuildSet' (BuildMaster.addChange): update to use allSchedulers() * buildbot/scheduler.py (BaseScheduler.__implements__): fix this to work properly with twisted-1.3.0, where you must explicitly include the __implements__ from parent classes (BaseScheduler.__repr__): make it easier to distinguish distinct instances (BaseUpstreamScheduler.__implements__): same * buildbot/status/builder.py (Status.getSchedulers): update to use allSchedulers() * buildbot/test/test_run.py (Run.testMaster): same * buildbot/test/test_dependencies.py (Dependencies.findScheduler): same * buildbot/test/test_config.py (ConfigTest.testSchedulers): same, make sure Scheduler instances are left alone when an identical config file is reloaded (ConfigElements.testSchedulers): make sure Schedulers are properly comparable * Makefile (TRIALARGS): my local default Twisted version is now 2.1.0, update the trial arguments accordingly Index: ChangeLog =================================================================== RCS file: /cvsroot/buildbot/buildbot/ChangeLog,v retrieving revision 1.564 retrieving revision 1.565 diff -u -d -r1.564 -r1.565 --- ChangeLog 22 Dec 2005 21:00:01 -0000 1.564 +++ ChangeLog 3 Jan 2006 09:26:41 -0000 1.565 @@ -1,3 +1,40 @@ +2006-01-03 Brian Warner + + * buildbot/master.py (BuildMaster): remove the .schedulers + attribute, replacing it with an allSchedulers() method that looks + for all IService children that implement IScheduler. Having only + one parent/child relationship means fewer opportunities for bugs. + (BuildMaster.allSchedulers): new method + (BuildMaster.loadConfig_Schedulers): update to use allSchedulers, + also fix ugly bug that caused any config-file reload to + half-forget about the earlier Schedulers, causing an exception + when a Change arrived and was handed to a half-connected + Scheduler. The exception was in scheduler.py line 54ish: + self.parent.submitBuildSet(bs) + exceptions.AttributeError: 'NoneType' object has no attribute + 'submitBuildSet' + (BuildMaster.addChange): update to use allSchedulers() + + * buildbot/scheduler.py (BaseScheduler.__implements__): fix this + to work properly with twisted-1.3.0, where you must explicitly + include the __implements__ from parent classes + (BaseScheduler.__repr__): make it easier to distinguish distinct + instances + (BaseUpstreamScheduler.__implements__): same + + * buildbot/status/builder.py (Status.getSchedulers): update to + use allSchedulers() + * buildbot/test/test_run.py (Run.testMaster): same + * buildbot/test/test_dependencies.py (Dependencies.findScheduler): same + * buildbot/test/test_config.py (ConfigTest.testSchedulers): same, + make sure Scheduler instances are left alone when an identical + config file is reloaded + (ConfigElements.testSchedulers): make sure Schedulers are properly + comparable + + * Makefile (TRIALARGS): my local default Twisted version is now + 2.1.0, update the trial arguments accordingly + 2005-12-22 Brian Warner * docs/examples/twisted_master.cfg: merge changes from pyr: add Index: Makefile =================================================================== RCS file: /cvsroot/buildbot/buildbot/Makefile,v retrieving revision 1.17 retrieving revision 1.18 diff -u -d -r1.17 -r1.18 --- Makefile 25 Nov 2005 00:36:41 -0000 1.17 +++ Makefile 3 Jan 2006 09:26:41 -0000 1.18 @@ -3,7 +3,7 @@ # process a little bit. This Makefile is not included in the source tarball. BBBASE = $(PWD) -TRIALARGS=-v +TRIALARGS= ifdef SVN T=~/stuff/python/twisted/Twisted TRIALARGS=--reporter=verbose @@ -12,6 +12,7 @@ endif ifdef T13 T=~/stuff/python/twisted/Twisted-1.3.0 +TRIALARGS=-v endif PP = PYTHONPATH=$(BBBASE):$(T) From warner at users.sourceforge.net Tue Jan 3 09:26:43 2006 From: warner at users.sourceforge.net (Brian Warner) Date: Tue, 03 Jan 2006 09:26:43 +0000 Subject: [Buildbot-commits] buildbot/buildbot scheduler.py,1.12,1.13 master.py,1.89,1.90 Message-ID: Update of /cvsroot/buildbot/buildbot/buildbot In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20675/buildbot Modified Files: scheduler.py master.py Log Message: Revision: arch at buildbot.sf.net--2004/buildbot--dev--0--patch-452 Creator: Brian Warner fix a bug: config-file reload would half-clobber all Schedulers * buildbot/master.py (BuildMaster): remove the .schedulers attribute, replacing it with an allSchedulers() method that looks for all IService children that implement IScheduler. Having only one parent/child relationship means fewer opportunities for bugs. (BuildMaster.allSchedulers): new method (BuildMaster.loadConfig_Schedulers): update to use allSchedulers, also fix ugly bug that caused any config-file reload to half-forget about the earlier Schedulers, causing an exception when a Change arrived and was handed to a half-connected Scheduler. The exception was in scheduler.py line 54ish: self.parent.submitBuildSet(bs) exceptions.AttributeError: 'NoneType' object has no attribute 'submitBuildSet' (BuildMaster.addChange): update to use allSchedulers() * buildbot/scheduler.py (BaseScheduler.__implements__): fix this to work properly with twisted-1.3.0, where you must explicitly include the __implements__ from parent classes (BaseScheduler.__repr__): make it easier to distinguish distinct instances (BaseUpstreamScheduler.__implements__): same * buildbot/status/builder.py (Status.getSchedulers): update to use allSchedulers() * buildbot/test/test_run.py (Run.testMaster): same * buildbot/test/test_dependencies.py (Dependencies.findScheduler): same * buildbot/test/test_config.py (ConfigTest.testSchedulers): same, make sure Scheduler instances are left alone when an identical config file is reloaded (ConfigElements.testSchedulers): make sure Schedulers are properly comparable * Makefile (TRIALARGS): my local default Twisted version is now 2.1.0, update the trial arguments accordingly Index: master.py =================================================================== RCS file: /cvsroot/buildbot/buildbot/buildbot/master.py,v retrieving revision 1.89 retrieving revision 1.90 diff -u -d -r1.89 -r1.90 --- master.py 26 Nov 2005 02:14:31 -0000 1.89 +++ master.py 3 Jan 2006 09:26:40 -0000 1.90 @@ -591,7 +591,6 @@ self.statusTargets = [] - self.schedulers = [] self.bots = [] # this ChangeMaster is a dummy, only used by tests. In the real # buildmaster, where the BuildMaster instance is activated @@ -752,8 +751,7 @@ # Schedulers are service.MultiServices and thus iterable. assert type(schedulers) in (list, tuple) for s in schedulers: - assert (interfaces.IScheduler(s, None) - or interfaces.IUpstreamScheduler(s, None)) + assert interfaces.IScheduler(s, None) assert type(status) in (list, tuple) for s in status: assert interfaces.IStatusReceiver(s, None) @@ -907,14 +905,22 @@ d.addCallback(addNewOnes) return d + def allSchedulers(self): + # TODO: when twisted-1.3 compatibility is dropped, switch to the + # providedBy form, because it's faster (no actual adapter lookup) + return [child for child in self + #if interfaces.IScheduler.providedBy(child)] + if interfaces.IScheduler(child, None)] + + def loadConfig_Schedulers(self, newschedulers): - old = [s for s in self.schedulers if s not in newschedulers] - [self.schedulers.remove(s) for s in old] - dl = [defer.maybeDeferred(s.disownServiceParent) for s in old] + oldschedulers = self.allSchedulers() + removed = [s for s in oldschedulers if s not in newschedulers] + added = [s for s in newschedulers if s not in oldschedulers] + dl = [defer.maybeDeferred(s.disownServiceParent) for s in removed] def addNewOnes(res): - [s.setServiceParent(self) - for s in newschedulers if s not in self.schedulers] - self.schedulers = newschedulers + for s in added: + s.setServiceParent(self) d = defer.DeferredList(dl, fireOnOneErrback=1) d.addCallback(addNewOnes) return d @@ -1004,7 +1010,7 @@ def addChange(self, change): - for s in self.schedulers: + for s in self.allSchedulers(): s.addChange(change) def submitBuildSet(self, bs): Index: scheduler.py =================================================================== RCS file: /cvsroot/buildbot/buildbot/buildbot/scheduler.py,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- scheduler.py 22 Dec 2005 21:00:01 -0000 1.12 +++ scheduler.py 3 Jan 2006 09:26:40 -0000 1.13 @@ -21,14 +21,16 @@ if implements: implements(interfaces.IScheduler) else: - __implements__ = interfaces.IScheduler, + __implements__ = (interfaces.IScheduler, + service.MultiService.__implements__) def __init__(self, name): service.MultiService.__init__(self) self.name = name def __repr__(self): - return "" % self.name + # TODO: why can't id() return a positive number? %d is ugly. + return "" % (self.name, id(self)) def submit(self, bs): self.parent.submitBuildSet(bs) @@ -40,7 +42,8 @@ if implements: implements(interfaces.IUpstreamScheduler) else: - __implements__ = interfaces.IUpstreamScheduler, + __implements__ = (interfaces.IUpstreamScheduler, + BaseScheduler.__implements__) def __init__(self, name): BaseScheduler.__init__(self, name) From warner at users.sourceforge.net Thu Jan 12 22:56:50 2006 From: warner at users.sourceforge.net (Brian Warner) Date: Thu, 12 Jan 2006 22:56:50 +0000 Subject: [Buildbot-commits] site index.html,1.52,1.53 Message-ID: Update of /cvsroot/buildbot/site In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13445 Modified Files: index.html Log Message: add the python.org buildbot, and mention the openidenabled.com one (although it doesn't seem to be publically-visible) Index: index.html =================================================================== RCS file: /cvsroot/buildbot/site/index.html,v retrieving revision 1.52 retrieving revision 1.53 diff -u -d -r1.52 -r1.53 --- index.html 25 Dec 2005 22:35:24 -0000 1.52 +++ index.html 12 Jan 2006 22:56:48 -0000 1.53 @@ -161,6 +161,16 @@ like) is using a buildbot to track the status of Zope3. +
  • Kevin Turner reports that JanRain, Inc. is using a buildbot for their + multi-language OpenID + libraries.
  • + +
  • Python, the language that the + Buildbot is written in, has recently set up its own Buildbot. Guido van Rossum + mentioned it in his blog.
  • +
  • install a Buildbot today and get your name added here!
  • @@ -183,5 +193,5 @@ align="right" /> -Last modified: Sun Dec 25 14:33:55 PST 2005 +Last modified: Thu Jan 12 14:53:03 PST 2006 From warner at users.sourceforge.net Fri Jan 13 08:34:30 2006 From: warner at users.sourceforge.net (Brian Warner) Date: Fri, 13 Jan 2006 08:34:30 +0000 Subject: [Buildbot-commits] buildbot/buildbot/status client.py,1.24,1.25 html.py,1.78,1.79 Message-ID: Update of /cvsroot/buildbot/buildbot/buildbot/status In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28379/buildbot/status Modified Files: client.py html.py Log Message: Revision: arch at buildbot.sf.net--2004/buildbot--dev--0--patch-454 Creator: Brian Warner all port= args now accept a strports string: slaveport, Waterfall, etc * buildbot/master.py (Manhole.__init__): let port= be a strports specification string, but handle a regular int for backwards compatibility. This allows "tcp:12345:interface=127.0.0.1" to be used in master.cfg to limit connections to just the local host. (BuildMaster.loadConfig): same for c['slavePortnum'] * buildbot/scheduler.py (Try_Userpass.__init__): same * buildbot/status/client.py (PBListener.__init__): same * buildbot/status/html.py (Waterfall.__init__): same, for both http_port and distrib_port. Include backwards-compatibility checks so distrib_port can be a filename string and still mean unix:/foo * docs/buildbot.texinfo (Setting the slaveport): document it (Debug options): same (HTML Waterfall): same (PBListener): same (try): same * buildbot/test/test_config.py (ConfigTest): test it * buildbot/master.py (BuildMaster.loadConfig): wait for the slaveport's disownServiceParent deferred to fire before opening the new one. Fixes an annoying bug in the unit tests. Index: client.py =================================================================== RCS file: /cvsroot/buildbot/buildbot/buildbot/status/client.py,v retrieving revision 1.24 retrieving revision 1.25 diff -u -d -r1.24 -r1.25 --- client.py 14 Oct 2005 19:42:40 -0000 1.24 +++ client.py 13 Jan 2006 08:34:28 -0000 1.25 @@ -4,7 +4,7 @@ from twisted.python import log, components from twisted.python.failure import Failure from twisted.internet import defer, reactor -from twisted.application import service, internet +from twisted.application import service, strports from twisted.cred import portal, checkers from buildbot import util, interfaces @@ -546,6 +546,8 @@ def __init__(self, port, user="statusClient", passwd="clientpw"): base.StatusReceiverMultiService.__init__(self) + if type(port) is int: + port = "tcp:%d" % port self.port = port self.cred = (user, passwd) p = portal.Portal(self) @@ -553,7 +555,7 @@ c.addUser(user, passwd) p.registerChecker(c) f = pb.PBServerFactory(p) - s = internet.TCPServer(port, f) + s = strports.service(port, f) s.setServiceParent(self) def setServiceParent(self, parent): Index: html.py =================================================================== RCS file: /cvsroot/buildbot/buildbot/buildbot/status/html.py,v retrieving revision 1.78 retrieving revision 1.79 diff -u -d -r1.78 -r1.79 --- html.py 23 Nov 2005 08:01:23 -0000 1.78 +++ html.py 13 Jan 2006 08:34:28 -0000 1.79 @@ -11,7 +11,7 @@ from twisted.web import static, html, server, distrib from twisted.web.error import NoResource from twisted.web.util import Redirect, DeferredResource -from twisted.application import internet +from twisted.application import strports from twisted.spread import pb from buildbot.twcompat import implements, Interface @@ -1633,24 +1633,37 @@ categories=None, css=buildbot_css, favicon=buildbot_icon): """To have the buildbot run its own web server, pass a port number to C{http_port}. To have it run a web.distrib server - - @type http_port: int - @param http_port: the TCP port number on which the buildbot should - run its own web server, with the Waterfall display - as the root page - @type distrib_port: string or int + @type http_port: int or L{twisted.application.strports} string + @param http_port: a strports specification describing which port the + buildbot should use for its web server, with the + Waterfall display as the root page. For backwards + compatibility this can also be an int. Use + 'tcp:8000' to listen on that port, or + 'tcp:12345:interface=127.0.0.1' if you only want + local processes to connect to it (perhaps because + you are using an HTTP reverse proxy to make the + buildbot available to the outside world, and do not + want to make the raw port visible). + + @type distrib_port: int or L{twisted.application.strports} string @param distrib_port: Use this if you want to publish the Waterfall page using web.distrib instead. The most common - case is to provide a string that is a pathname - to the unix socket on which the publisher should - listen (C{os.path.expanduser(~/.twistd-web-pb)} - will match the default settings of a standard + case is to provide a string that is an absolute + pathname to the unix socket on which the + publisher should listen + (C{os.path.expanduser(~/.twistd-web-pb)} will + match the default settings of a standard twisted.web 'personal web server'). Another possibility is to pass an integer, which means the publisher should listen on a TCP socket, allowing the web server to be on a different - machine entirely. + machine entirely. Both forms are provided for + backwards compatibility; the preferred form is a + strports specification like + 'unix:/home/buildbot/.twistd-web-pb'. Providing + a non-absolute pathname will probably confuse + the strports parser. @type allowForce: bool @param allowForce: if True, present a 'Force Build' button on the @@ -1670,7 +1683,14 @@ """ base.StatusReceiverMultiService.__init__(self) assert allowForce in (True, False) # TODO: implement others + if type(http_port) is int: + http_port = "tcp:%d" % http_port self.http_port = http_port + if distrib_port is not None: + if type(distrib_port) is int: + distrib_port = "tcp:%d" % distrib_port + if distrib_port[0] in "/~.": # pathnames + distrib_port = "unix:%s" % distrib_port self.distrib_port = distrib_port self.allowForce = allowForce self.categories = categories @@ -1705,12 +1725,9 @@ self.site = server.Site(sr) if self.http_port is not None: - s = internet.TCPServer(self.http_port, self.site) + s = strports.service(self.http_port, self.site) s.setServiceParent(self) if self.distrib_port is not None: f = pb.PBServerFactory(distrib.ResourcePublisher(self.site)) - if type(self.distrib_port) == int: - s = internet.TCPServer(self.distrib_port, f) - else: - s = internet.UNIXServer(self.distrib_port, f) + s = strports.service(self.distrib_port, f) s.setServiceParent(self) From warner at users.sourceforge.net Fri Jan 13 08:34:30 2006 From: warner at users.sourceforge.net (Brian Warner) Date: Fri, 13 Jan 2006 08:34:30 +0000 Subject: [Buildbot-commits] buildbot/buildbot scheduler.py,1.13,1.14 master.py,1.90,1.91 Message-ID: Update of /cvsroot/buildbot/buildbot/buildbot In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28379/buildbot Modified Files: scheduler.py master.py Log Message: Revision: arch at buildbot.sf.net--2004/buildbot--dev--0--patch-454 Creator: Brian Warner all port= args now accept a strports string: slaveport, Waterfall, etc * buildbot/master.py (Manhole.__init__): let port= be a strports specification string, but handle a regular int for backwards compatibility. This allows "tcp:12345:interface=127.0.0.1" to be used in master.cfg to limit connections to just the local host. (BuildMaster.loadConfig): same for c['slavePortnum'] * buildbot/scheduler.py (Try_Userpass.__init__): same * buildbot/status/client.py (PBListener.__init__): same * buildbot/status/html.py (Waterfall.__init__): same, for both http_port and distrib_port. Include backwards-compatibility checks so distrib_port can be a filename string and still mean unix:/foo * docs/buildbot.texinfo (Setting the slaveport): document it (Debug options): same (HTML Waterfall): same (PBListener): same (try): same * buildbot/test/test_config.py (ConfigTest): test it * buildbot/master.py (BuildMaster.loadConfig): wait for the slaveport's disownServiceParent deferred to fire before opening the new one. Fixes an annoying bug in the unit tests. Index: master.py =================================================================== RCS file: /cvsroot/buildbot/buildbot/buildbot/master.py,v retrieving revision 1.90 retrieving revision 1.91 diff -u -d -r1.90 -r1.91 --- master.py 3 Jan 2006 09:26:40 -0000 1.90 +++ master.py 13 Jan 2006 08:34:28 -0000 1.91 @@ -15,7 +15,7 @@ from twisted.internet import defer, reactor from twisted.spread import pb from twisted.cred import portal, checkers -from twisted.application import service, internet +from twisted.application import service, strports from twisted.persisted import styles from twisted.manhole import telnet @@ -429,17 +429,19 @@ def __init__(self, port, username, password): service.MultiService.__init__(self) + if type(port) is int: + port = "tcp:%d" % port self.port = port self.username = username self.password = password self.f = f = telnet.ShellFactory() f.username = username f.password = password - p = internet.TCPServer(port, f) - p.setServiceParent(self) + s = strports.service(port, f) + s.setServiceParent(self) def startService(self): - log.msg("Manhole listening on port %d" % self.port) + log.msg("Manhole listening on port %s" % self.port) service.MultiService.startService(self) master = self.parent self.f.namespace['master'] = master @@ -809,6 +811,10 @@ else: locks[l.name] = l + # slavePortnum supposed to be a strports specification + if type(slavePortnum) is int: + slavePortnum = "tcp:%d" % slavePortnum + # now we're committed to implementing the new configuration, so do # it atomically # TODO: actually, this is spread across a couple of Deferreds, so it @@ -855,17 +861,20 @@ # self.slavePort if self.slavePortnum != slavePortnum: if self.slavePort: - d.addCallback(lambda res: self.slavePort.disownServiceParent()) - self.slavePort = None + def closeSlavePort(res): + d1 = self.slavePort.disownServiceParent() + self.slavePort = None + return d1 + d.addCallback(closeSlavePort) if slavePortnum is not None: def openSlavePort(res): - self.slavePort = internet.TCPServer(slavePortnum, - self.slaveFactory) + self.slavePort = strports.service(slavePortnum, + self.slaveFactory) self.slavePort.setServiceParent(self) d.addCallback(openSlavePort) - log.msg("BuildMaster listening on port %d" % slavePortnum) + log.msg("BuildMaster listening on port %s" % slavePortnum) self.slavePortnum = slavePortnum - + log.msg("configuration update started") d.addCallback(lambda res: log.msg("configuration update complete")) self.readConfig = True # TODO: consider not setting this until the Index: scheduler.py =================================================================== RCS file: /cvsroot/buildbot/buildbot/buildbot/scheduler.py,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -r1.13 -r1.14 --- scheduler.py 3 Jan 2006 09:26:40 -0000 1.13 +++ scheduler.py 13 Jan 2006 08:34:28 -0000 1.14 @@ -3,7 +3,7 @@ import time, os.path from twisted.internet import reactor -from twisted.application import service, internet +from twisted.application import service, internet, strports from twisted.python import log from twisted.protocols import basic from twisted.cred import portal, checkers @@ -624,6 +624,8 @@ def __init__(self, name, builderNames, port, userpass): TryBase.__init__(self, name, builderNames) + if type(port) is int: + port = "tcp:%d" % port self.port = port self.userpass = userpass c = checkers.InMemoryUsernamePasswordDatabaseDontUse() @@ -633,7 +635,7 @@ p = portal.Portal(self) p.registerChecker(c) f = pb.PBServerFactory(p) - s = internet.TCPServer(port, f) + s = strports.service(port, f) s.setServiceParent(self) def getPort(self): From warner at users.sourceforge.net Fri Jan 13 08:34:31 2006 From: warner at users.sourceforge.net (Brian Warner) Date: Fri, 13 Jan 2006 08:34:31 +0000 Subject: [Buildbot-commits] buildbot ChangeLog,1.565,1.566 Message-ID: Update of /cvsroot/buildbot/buildbot In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28379 Modified Files: ChangeLog Log Message: Revision: arch at buildbot.sf.net--2004/buildbot--dev--0--patch-454 Creator: Brian Warner all port= args now accept a strports string: slaveport, Waterfall, etc * buildbot/master.py (Manhole.__init__): let port= be a strports specification string, but handle a regular int for backwards compatibility. This allows "tcp:12345:interface=127.0.0.1" to be used in master.cfg to limit connections to just the local host. (BuildMaster.loadConfig): same for c['slavePortnum'] * buildbot/scheduler.py (Try_Userpass.__init__): same * buildbot/status/client.py (PBListener.__init__): same * buildbot/status/html.py (Waterfall.__init__): same, for both http_port and distrib_port. Include backwards-compatibility checks so distrib_port can be a filename string and still mean unix:/foo * docs/buildbot.texinfo (Setting the slaveport): document it (Debug options): same (HTML Waterfall): same (PBListener): same (try): same * buildbot/test/test_config.py (ConfigTest): test it * buildbot/master.py (BuildMaster.loadConfig): wait for the slaveport's disownServiceParent deferred to fire before opening the new one. Fixes an annoying bug in the unit tests. Index: ChangeLog =================================================================== RCS file: /cvsroot/buildbot/buildbot/ChangeLog,v retrieving revision 1.565 retrieving revision 1.566 diff -u -d -r1.565 -r1.566 --- ChangeLog 3 Jan 2006 09:26:41 -0000 1.565 +++ ChangeLog 13 Jan 2006 08:34:29 -0000 1.566 @@ -1,3 +1,26 @@ +2006-01-12 Brian Warner + + * buildbot/master.py (Manhole.__init__): let port= be a strports + specification string, but handle a regular int for backwards + compatibility. This allows "tcp:12345:interface=127.0.0.1" to be + used in master.cfg to limit connections to just the local host. + (BuildMaster.loadConfig): same for c['slavePortnum'] + * buildbot/scheduler.py (Try_Userpass.__init__): same + * buildbot/status/client.py (PBListener.__init__): same + * buildbot/status/html.py (Waterfall.__init__): same, for both + http_port and distrib_port. Include backwards-compatibility checks + so distrib_port can be a filename string and still mean unix:/foo + * docs/buildbot.texinfo (Setting the slaveport): document it + (Debug options): same + (HTML Waterfall): same + (PBListener): same + (try): same + * buildbot/test/test_config.py (ConfigTest): test it + + * buildbot/master.py (BuildMaster.loadConfig): wait for the + slaveport's disownServiceParent deferred to fire before opening + the new one. Fixes an annoying bug in the unit tests. + 2006-01-03 Brian Warner * buildbot/master.py (BuildMaster): remove the .schedulers From warner at users.sourceforge.net Fri Jan 13 08:34:31 2006 From: warner at users.sourceforge.net (Brian Warner) Date: Fri, 13 Jan 2006 08:34:31 +0000 Subject: [Buildbot-commits] buildbot/buildbot/test test_config.py,1.33,1.34 Message-ID: Update of /cvsroot/buildbot/buildbot/buildbot/test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28379/buildbot/test Modified Files: test_config.py Log Message: Revision: arch at buildbot.sf.net--2004/buildbot--dev--0--patch-454 Creator: Brian Warner all port= args now accept a strports string: slaveport, Waterfall, etc * buildbot/master.py (Manhole.__init__): let port= be a strports specification string, but handle a regular int for backwards compatibility. This allows "tcp:12345:interface=127.0.0.1" to be used in master.cfg to limit connections to just the local host. (BuildMaster.loadConfig): same for c['slavePortnum'] * buildbot/scheduler.py (Try_Userpass.__init__): same * buildbot/status/client.py (PBListener.__init__): same * buildbot/status/html.py (Waterfall.__init__): same, for both http_port and distrib_port. Include backwards-compatibility checks so distrib_port can be a filename string and still mean unix:/foo * docs/buildbot.texinfo (Setting the slaveport): document it (Debug options): same (HTML Waterfall): same (PBListener): same (try): same * buildbot/test/test_config.py (ConfigTest): test it * buildbot/master.py (BuildMaster.loadConfig): wait for the slaveport's disownServiceParent deferred to fire before opening the new one. Fixes an annoying bug in the unit tests. Index: test_config.py =================================================================== RCS file: /cvsroot/buildbot/buildbot/buildbot/test/test_config.py,v retrieving revision 1.33 retrieving revision 1.34 diff -u -d -r1.33 -r1.34 --- test_config.py 3 Jan 2006 09:26:41 -0000 1.33 +++ test_config.py 13 Jan 2006 08:34:29 -0000 1.34 @@ -112,6 +112,12 @@ c['status'] = [html.Waterfall(http_port=9981)] """ +webCfg3 = emptyCfg + \ +""" +from buildbot.status import html +c['status'] = [html.Waterfall(http_port='tcp:9981:interface=127.0.0.1')] +""" + webNameCfg1 = emptyCfg + \ """ from buildbot.status import html @@ -121,7 +127,7 @@ webNameCfg2 = emptyCfg + \ """ from buildbot.status import html -c['status'] = [html.Waterfall(distrib_port='bar.socket')] +c['status'] = [html.Waterfall(distrib_port='./bar.socket')] """ debugPasswordCfg = emptyCfg + \ @@ -396,7 +402,7 @@ master.loadConfig(emptyCfg) # note: this doesn't actually start listening, because the app # hasn't been started running - self.failUnlessEqual(master.slavePortnum, 9999) + self.failUnlessEqual(master.slavePortnum, "tcp:9999") self.checkPorts(master, [(9999, pb.PBServerFactory)]) self.failUnlessEqual(list(master.change_svc), []) self.failUnlessEqual(master.botmaster.builders, {}) @@ -412,19 +418,19 @@ master.loadChanges() master.loadConfig(emptyCfg) - self.failUnlessEqual(master.slavePortnum, 9999) + self.failUnlessEqual(master.slavePortnum, "tcp:9999") ports = self.checkPorts(master, [(9999, pb.PBServerFactory)]) p = ports[0] master.loadConfig(emptyCfg) - self.failUnlessEqual(master.slavePortnum, 9999) + self.failUnlessEqual(master.slavePortnum, "tcp:9999") ports = self.checkPorts(master, [(9999, pb.PBServerFactory)]) self.failUnlessIdentical(p, ports[0], "the slave port was changed even " + \ "though the configuration was not") master.loadConfig(emptyCfg + "c['slavePortnum'] = 9000\n") - self.failUnlessEqual(master.slavePortnum, 9000) + self.failUnlessEqual(master.slavePortnum, "tcp:9000") ports = self.checkPorts(master, [(9000, pb.PBServerFactory)]) self.failIf(p is ports[0], "slave port was unchanged but configuration was changed") @@ -738,8 +744,14 @@ ports = self.checkPorts(self.buildmaster, [(9999, pb.PBServerFactory), (9981, Site)]) self.failIf(p is ports[1], - "web port was unchanged but configuration was changed") - + "configuration was changed but web port was unchanged") + d = self.buildmaster.loadConfig(webCfg3) # 9981 on only localhost + d.addCallback(self._testWebPortnum_4, ports[1]) + return d + def _testWebPortnum_4(self, res, p): + ports = self.checkPorts(self.buildmaster, [(9999, pb.PBServerFactory), + (9981, Site)]) + self.failUnlessEqual(ports[1].kwargs['interface'], "127.0.0.1") d = self.buildmaster.loadConfig(emptyCfg) d.addCallback(lambda res: self.checkPorts(self.buildmaster, @@ -780,7 +792,7 @@ def _testWebPathname_3(self, res, f): self.checkPorts(self.buildmaster, [(9999, pb.PBServerFactory), - ('bar.socket', pb.PBServerFactory)]) + ('./bar.socket', pb.PBServerFactory)]) self.failIf(f is self.UNIXports(self.buildmaster)[0].args[1], "web factory was unchanged but configuration was changed") @@ -883,11 +895,11 @@ m = BuildMaster("test_cf") m.loadTheConfigFile() - self.failUnlessEqual(m.slavePortnum, 9999) + self.failUnlessEqual(m.slavePortnum, "tcp:9999") m = BuildMaster("test_cf", "alternate.cfg") m.loadTheConfigFile() - self.failUnlessEqual(m.slavePortnum, 9000) + self.failUnlessEqual(m.slavePortnum, "tcp:9000") class MyTarget(base.StatusReceiverMultiService): From warner at users.sourceforge.net Fri Jan 13 08:34:31 2006 From: warner at users.sourceforge.net (Brian Warner) Date: Fri, 13 Jan 2006 08:34:31 +0000 Subject: [Buildbot-commits] buildbot/docs buildbot.texinfo,1.32,1.33 Message-ID: Update of /cvsroot/buildbot/buildbot/docs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28379/docs Modified Files: buildbot.texinfo Log Message: Revision: arch at buildbot.sf.net--2004/buildbot--dev--0--patch-454 Creator: Brian Warner all port= args now accept a strports string: slaveport, Waterfall, etc * buildbot/master.py (Manhole.__init__): let port= be a strports specification string, but handle a regular int for backwards compatibility. This allows "tcp:12345:interface=127.0.0.1" to be used in master.cfg to limit connections to just the local host. (BuildMaster.loadConfig): same for c['slavePortnum'] * buildbot/scheduler.py (Try_Userpass.__init__): same * buildbot/status/client.py (PBListener.__init__): same * buildbot/status/html.py (Waterfall.__init__): same, for both http_port and distrib_port. Include backwards-compatibility checks so distrib_port can be a filename string and still mean unix:/foo * docs/buildbot.texinfo (Setting the slaveport): document it (Debug options): same (HTML Waterfall): same (PBListener): same (try): same * buildbot/test/test_config.py (ConfigTest): test it * buildbot/master.py (BuildMaster.loadConfig): wait for the slaveport's disownServiceParent deferred to fire before opening the new one. Fixes an annoying bug in the unit tests. Index: buildbot.texinfo =================================================================== RCS file: /cvsroot/buildbot/buildbot/docs/buildbot.texinfo,v retrieving revision 1.32 retrieving revision 1.33 diff -u -d -r1.32 -r1.33 --- buildbot.texinfo 27 Nov 2005 03:58:48 -0000 1.32 +++ buildbot.texinfo 13 Jan 2006 08:34:28 -0000 1.33 @@ -1855,6 +1855,21 @@ c['slavePortnum'] = 10000 @end example + at code{c['slavePortnum']} is a @emph{strports} specification string, +defined in the @code{twisted.application.strports} module (try + at command{pydoc twisted.application.strports} to get documentation on +the format). This means that you can have the buildmaster listen on a +localhost-only port by doing: + + at example +c['slavePortnum'] = "tcp:10000:interface=127.0.0.1" + at end example + +This might be useful if you only run buildslaves on the same machine, +and they are all configured to contact the buildmaster at + at code{localhost:10000}. + + @node Buildslave Specifiers, Defining Builders, Setting the slaveport, Configuration @section Buildslave Specifiers @@ -2019,11 +2034,21 @@ account (including the ability to modify and delete files), so it should not be enabled with a weak or easily guessable password. +The @code{Manhole} instance can be configured to listen on a specific +port. You may wish to have this listening port bind to the loopback +interface (sometimes known as ``lo0'', ``localhost'', or 127.0.0.1) to +restrict access to clients which are running on the same host. + @example from buildbot.master import Manhole -c['manhole'] = Manhole(9999, "admin", "password") +c['manhole'] = Manhole("tcp:9999:interface=127.0.0.1", "admin", "password") @end example +To have the @code{Manhole} listen on all interfaces, use + at code{"tcp:9999"}. This port specification uses + at code{twisted.application.strports}, so you can make it listen on SSL +or even UNIX-domain sockets if you want. + @node Getting Source Code Changes, Build Process, Configuration, Top @chapter Getting Source Code Changes @@ -3548,12 +3573,20 @@ This display provides detailed information about all steps of all recent builds, and provides hyperlinks to look at individual build logs and source changes. If the @code{http_port} argument is provided, -it represents the TCP port number on which the web server should -listen. If instead @code{distrib_port} is provided, a twisted.web -distributed server will be started either on a TCP port (if - at code{distrib_port} is an int) or more likely on a UNIX socket (if - at code{distrib_port} is a string). The HTML page can have a favicon and -custom CSS: see the docstring for details. +it provides a strports specification for the port that the web server +should listen on. This can be a simple port number, or a string like + at code{tcp:8080:interface=127.0.0.1} (to limit connections to the +loopback interface, and therefore to clients running on the same +host)@footnote{It may even be possible to provide SSL access by using +a specification like + at code{"ssl:12345:privateKey=mykey.pen:certKey=cert.pem"}, but this is +completely untested}. + +If instead (or in addition) you provide the @code{distrib_port} +argument, a twisted.web distributed server will be started either on a +TCP port (if @code{distrib_port} is like @code{"tcp:12345"}) or more +likely on a UNIX socket (if @code{distrib_port} is like + at code{"unix:/path/to/socket"}). The @code{distrib_port} option means that, on a host with a suitably-configured twisted-web server, you do not need to consume a @@ -3563,11 +3596,14 @@ listening on a UNIX socket at @code{~username/.twisted-web-pb}. On such a system, it is convenient to create a dedicated @code{buildbot} user, then set @code{distrib_port} to - at code{os.path.expanduser("~/.twistd-web-pb")}. This configuration will -make the HTML status page available at @code{http://host/~buildbot/} . -Suitable URL remapping can make it appear at - at code{http://host/buildbot/}, and the right virtual host setup can -even place it at @code{http://buildbot.host/} . + at code{"unix:"+os.path.expanduser("~/.twistd-web-pb")}. This +configuration will make the HTML status page available at + at code{http://host/~buildbot/} . Suitable URL remapping can make it +appear at @code{http://host/buildbot/}, and the right virtual host +setup can even place it at @code{http://buildbot.host/} . + +In addition, the HTML page can have a favicon and custom CSS: see the +docstring for details. @node IRC Bot, PBListener, HTML Waterfall, Status Delivery @subsection IRC Bot @@ -3645,7 +3681,8 @@ This sets up a PB listener on the given TCP port, to which a PB-based status client can connect and retrieve status information. - at code{buildbot statusgui} is an example of such a status client. + at code{buildbot statusgui} is an example of such a status client. The + at code{port} argument can also be a strports specification string. @node Command-line tool, Resources, Status Delivery, Top @chapter Command-line tool @@ -3900,6 +3937,10 @@ c['schedulers'] = [s] @end example +Like most places in the buildbot, the @code{port} argument takes a +strports specification. See @code{twisted.application.strports} for +details. + @heading locating the master From warner at users.sourceforge.net Thu Jan 19 01:33:00 2006 From: warner at users.sourceforge.net (Brian Warner) Date: Thu, 19 Jan 2006 01:33:00 +0000 Subject: [Buildbot-commits] buildbot ChangeLog,1.566,1.567 Message-ID: Update of /cvsroot/buildbot/buildbot In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20956 Modified Files: ChangeLog Log Message: Revision: arch at buildbot.sf.net--2004/buildbot--dev--0--patch-456 Creator: Brian Warner update twisted_master.cfg * docs/examples/twisted_master.cfg: update to match the Twisted buildbot: remove python2.2, switch to exarkun's buildslaves, disable the .deb builder until we figure out how to build twisted .debs from SVN, add some ktrace debugging to the OS-X build process and remove the qt build, remove threadless builders, change freebsd builder to use landonf's buildslave. Index: ChangeLog =================================================================== RCS file: /cvsroot/buildbot/buildbot/ChangeLog,v retrieving revision 1.566 retrieving revision 1.567 diff -u -d -r1.566 -r1.567 --- ChangeLog 13 Jan 2006 08:34:29 -0000 1.566 +++ ChangeLog 19 Jan 2006 01:32:58 -0000 1.567 @@ -1,3 +1,12 @@ +2006-01-18 Brian Warner + + * docs/examples/twisted_master.cfg: update to match the Twisted + buildbot: remove python2.2, switch to exarkun's buildslaves, + disable the .deb builder until we figure out how to build twisted + .debs from SVN, add some ktrace debugging to the OS-X build + process and remove the qt build, remove threadless builders, + change freebsd builder to use landonf's buildslave. + 2006-01-12 Brian Warner * buildbot/master.py (Manhole.__init__): let port= be a strports From warner at users.sourceforge.net Thu Jan 19 01:33:00 2006 From: warner at users.sourceforge.net (Brian Warner) Date: Thu, 19 Jan 2006 01:33:00 +0000 Subject: [Buildbot-commits] buildbot/docs/examples twisted_master.cfg,1.39,1.40 Message-ID: Update of /cvsroot/buildbot/buildbot/docs/examples In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20956/docs/examples Modified Files: twisted_master.cfg Log Message: Revision: arch at buildbot.sf.net--2004/buildbot--dev--0--patch-456 Creator: Brian Warner update twisted_master.cfg * docs/examples/twisted_master.cfg: update to match the Twisted buildbot: remove python2.2, switch to exarkun's buildslaves, disable the .deb builder until we figure out how to build twisted .debs from SVN, add some ktrace debugging to the OS-X build process and remove the qt build, remove threadless builders, change freebsd builder to use landonf's buildslave. Index: twisted_master.cfg =================================================================== RCS file: /cvsroot/buildbot/buildbot/docs/examples/twisted_master.cfg,v retrieving revision 1.39 retrieving revision 1.40 diff -u -d -r1.39 -r1.40 --- twisted_master.cfg 22 Dec 2005 21:00:01 -0000 1.39 +++ twisted_master.cfg 19 Jan 2006 01:32:58 -0000 1.40 @@ -76,29 +76,21 @@ builders = [] + b1 = {'name': "quick", 'slavename': "bot1", 'builddir': "quick", 'factory': QuickTwistedBuildFactory(source_update, - python=["python2.2", "python2.3"]), + python=["python2.3", "python2.4"]), } builders.append(b1) -b22 = {'name': "full-2.2", - 'slavename': "bot-exarkun", - 'builddir': "full2.2", - 'factory': FullTwistedBuildFactory(source_copy, - python="python2.2", - processDocs=0), - } -builders.append(b22) - b23compile_opts = [ "-Wignore::PendingDeprecationWarning:distutils.command.build_py", "-Wignore::PendingDeprecationWarning:distutils.command.build_ext", ] b23 = {'name': "full-2.3", - 'slavename': "bot1", + 'slavename': "bot-exarkun-boson", 'builddir': "full2.3", 'factory': FullTwistedBuildFactory(source_copy, python=["python2.3", "-Wall"], @@ -114,7 +106,7 @@ "-Wignore::PendingDeprecationWarning:distutils.command.build_ext", ] b24 = {'name': "full-2.4", - 'slavename': "bot-exarkun", + 'slavenames': ["bot-exarkun"], 'builddir': "full2.4", 'factory': FullTwistedBuildFactory(source_copy, python=["python2.4", "-Wall"], @@ -124,14 +116,14 @@ } builders.append(b24) -b3 = {'name': "debuild", - 'slavename': "bot2", - 'builddir': "debuild", - 'factory': TwistedDebsBuildFactory(source_export, - python="python2.2"), - } # debuild is offline while we figure out how to build 2.0 .debs from SVN -#builders.append(b3) +# b3 = {'name': "debuild", +# 'slavename': "bot2", +# 'builddir': "debuild", +# 'factory': TwistedDebsBuildFactory(source_export, +# python="python2.4"), +# } +# builders.append(b3) reactors = ['gtk2', 'gtk', 'qt', 'poll'] b4 = {'name': "reactors", @@ -143,20 +135,20 @@ } builders.append(b4) - -b23osx = {'name': "OS-X", +jf = TwistedReactorsBuildFactory(source_copy, + python="python2.4", reactors=["default"]) +jf.steps.insert(0, s(step.ShellCommand, workdir=".", + command=["ktrace", "rm", "-rf", "Twisted"])) +b24osx = {'name': "OS-X", 'slavename': "bot-jerub", 'builddir': "OSX-full2.4", - 'factory': TwistedReactorsBuildFactory(source_copy, - python="python2.4", - reactors=["default", - "qt", - # "cf", - # "threadedselect", - ], - ), +# 'factory': TwistedReactorsBuildFactory(source_copy, +# python="python2.4", +# reactors=["default"], +# ), + 'factory': jf, } -builders.append(b23osx) +builders.append(b24osx) b24w32_select = { 'name': "win32-select", @@ -194,24 +186,25 @@ builders.append(b24w32_iocp) -b23bsd = {'name': "freebsd", - 'slavename': "bot-suszko", - 'builddir': "bsd-full2.2", - 'factory': TwistedReactorsBuildFactory(source_copy, - python="python2.3", - reactors=["default", - "kqueue", - ]), - } -#builders.append(b23bsd) +b23freebsd = {'name': "freebsd", + 'slavename': "bot-landonf", + 'builddir': "freebsd-full2.3", + 'factory': + TwistedReactorsBuildFactory(source_copy, + python="python2.3", + reactors=["default", + "kqueue", + ]), + } +builders.append(b23freebsd) -b24threadless = {'name': 'threadless', - 'slavename': 'bot-threadless', - 'builddir': 'debian-threadless-2.4', - 'factory': TwistedReactorsBuildFactory(source_copy, - python='python', - reactors=['default'])} -#builders.append(b24threadless) +# b24threadless = {'name': 'threadless', +# 'slavename': 'bot-threadless', +# 'builddir': 'debian-threadless-2.4', +# 'factory': TwistedReactorsBuildFactory(source_copy, +# python='python', +# reactors=['default'])} +# builders.append(b24threadless) c['builders'] = builders From warner at users.sourceforge.net Mon Jan 23 21:17:31 2006 From: warner at users.sourceforge.net (Brian Warner) Date: Mon, 23 Jan 2006 21:17:31 +0000 Subject: [Buildbot-commits] buildbot ChangeLog,1.567,1.568 NEWS,1.50,1.51 Message-ID: Update of /cvsroot/buildbot/buildbot In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30967 Modified Files: ChangeLog NEWS Log Message: Revision: arch at buildbot.sf.net--2004/buildbot--dev--0--patch-458 Creator: Brian Warner update NEWS in preparation for upcoming release * NEWS: update in preparation for upcoming release Index: ChangeLog =================================================================== RCS file: /cvsroot/buildbot/buildbot/ChangeLog,v retrieving revision 1.567 retrieving revision 1.568 diff -u -d -r1.567 -r1.568 --- ChangeLog 19 Jan 2006 01:32:58 -0000 1.567 +++ ChangeLog 23 Jan 2006 21:17:29 -0000 1.568 @@ -1,3 +1,7 @@ +2006-01-23 Brian Warner + + * NEWS: update in preparation for upcoming release + 2006-01-18 Brian Warner * docs/examples/twisted_master.cfg: update to match the Twisted Index: NEWS =================================================================== RCS file: /cvsroot/buildbot/buildbot/NEWS,v retrieving revision 1.50 retrieving revision 1.51 diff -u -d -r1.50 -r1.51 --- NEWS 27 Nov 2005 01:34:31 -0000 1.50 +++ NEWS 23 Jan 2006 21:17:29 -0000 1.51 @@ -1,5 +1,40 @@ User visible changes in Buildbot. +* Release x.x.x (x) + +** new features + +*** all TCP port numbers in config file now accept a strports string + +Sometimes it is useful to restrict certain TCP ports that the buildmaster +listens on to use specific network interfaces. In particular, if the +buildmaster and SVN repository live on the same machine, you may want to +restrict the PBChangeSource to only listen on the loopback interface, +insuring that no external entities can inject Changes into the buildbot. +Likewise, if you are using something like Apache's reverse-proxy feature to +provide access to the buildmaster's HTML status page, you might want to hide +the real Waterfall port by having it only bind to the loopback interface. + +To accomplish this, use a string like "tcp:12345:interface=127.0.0.1" instead +of a number like 12345. These strings are called "strports specification +strings", and are documented in twisted's twisted.application.strports module +(you can probably type 'pydoc twisted.application.strports' to see this +documentation). Pretty much everywhere the buildbot takes a port number will +now accept a strports spec, and any bare numbers are translated into TCP port +numbers (listening on all network interfaces) for compatibility. + +** bug fixes + +The 0.7.1 release had a bug whereby reloading the config file could break all +configured Schedulers, causing them to raise an exception when new changes +arrived but not actually schedule a new build. This has been fixed. + +Fixed a bug which caused the AnyBranchScheduler to explode when branch==None. +Thanks to Kevin Turner for the catch. I also think I fixed a bug whereby the +TryScheduler would explode when it was given a Change (which it is supposed +to simply ignore). + + * Release 0.7.1 (26 Nov 2005) ** new features From warner at users.sourceforge.net Mon Jan 23 23:03:29 2006 From: warner at users.sourceforge.net (Brian Warner) Date: Mon, 23 Jan 2006 23:03:29 +0000 Subject: [Buildbot-commits] buildbot ChangeLog,1.568,1.569 Message-ID: Update of /cvsroot/buildbot/buildbot In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11310 Modified Files: ChangeLog Log Message: Revision: arch at buildbot.sf.net--2004/buildbot--dev--0--patch-460 Creator: Brian Warner allow spaces and slashes in Builder names (and their URLs) * buildbot/status/builder.py: urllib.quote() all URLs that include Builder names, so that builders can include characters like '/' and ' ' without completely breaking the resulting HTML. Thanks to Kevin Turner for the patch. * buildbot/status/html.py: same * buildbot/test/test_web.py (GetURL.testBuild): match changes Index: ChangeLog =================================================================== RCS file: /cvsroot/buildbot/buildbot/ChangeLog,v retrieving revision 1.568 retrieving revision 1.569 diff -u -d -r1.568 -r1.569 --- ChangeLog 23 Jan 2006 21:17:29 -0000 1.568 +++ ChangeLog 23 Jan 2006 23:03:27 -0000 1.569 @@ -1,5 +1,12 @@ 2006-01-23 Brian Warner + * buildbot/status/builder.py: urllib.quote() all URLs that include + Builder names, so that builders can include characters like '/' + and ' ' without completely breaking the resulting HTML. Thanks to + Kevin Turner for the patch. + * buildbot/status/html.py: same + * buildbot/test/test_web.py (GetURL.testBuild): match changes + * NEWS: update in preparation for upcoming release 2006-01-18 Brian Warner From warner at users.sourceforge.net Mon Jan 23 23:03:29 2006 From: warner at users.sourceforge.net (Brian Warner) Date: Mon, 23 Jan 2006 23:03:29 +0000 Subject: [Buildbot-commits] buildbot/buildbot/test test_web.py,1.25,1.26 Message-ID: Update of /cvsroot/buildbot/buildbot/buildbot/test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11310/buildbot/test Modified Files: test_web.py Log Message: Revision: arch at buildbot.sf.net--2004/buildbot--dev--0--patch-460 Creator: Brian Warner allow spaces and slashes in Builder names (and their URLs) * buildbot/status/builder.py: urllib.quote() all URLs that include Builder names, so that builders can include characters like '/' and ' ' without completely breaking the resulting HTML. Thanks to Kevin Turner for the patch. * buildbot/status/html.py: same * buildbot/test/test_web.py (GetURL.testBuild): match changes Index: test_web.py =================================================================== RCS file: /cvsroot/buildbot/buildbot/buildbot/test/test_web.py,v retrieving revision 1.25 retrieving revision 1.26 diff -u -d -r1.25 -r1.26 --- test_web.py 5 Nov 2005 21:06:15 -0000 1.25 +++ test_web.py 23 Jan 2006 23:03:27 -0000 1.26 @@ -342,10 +342,10 @@ self.assertURLEqual(build, "b1/builds/0") # no page for builder.getEvent(-1) step = build.getSteps()[0] - self.assertURLEqual(step, "b1/builds/0/step-remote dummy") + self.assertURLEqual(step, "b1/builds/0/step-remote%20dummy") # maybe page for build.getTestResults? self.assertURLEqual(step.getLogs()[0], - "b1/builds/0/step-remote dummy/0") + "b1/builds/0/step-remote%20dummy/0") From warner at users.sourceforge.net Mon Jan 23 23:03:29 2006 From: warner at users.sourceforge.net (Brian Warner) Date: Mon, 23 Jan 2006 23:03:29 +0000 Subject: [Buildbot-commits] buildbot/buildbot/status html.py,1.79,1.80 builder.py,1.74,1.75 Message-ID: Update of /cvsroot/buildbot/buildbot/buildbot/status In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11310/buildbot/status Modified Files: html.py builder.py Log Message: Revision: arch at buildbot.sf.net--2004/buildbot--dev--0--patch-460 Creator: Brian Warner allow spaces and slashes in Builder names (and their URLs) * buildbot/status/builder.py: urllib.quote() all URLs that include Builder names, so that builders can include characters like '/' and ' ' without completely breaking the resulting HTML. Thanks to Kevin Turner for the patch. * buildbot/status/html.py: same * buildbot/test/test_web.py (GetURL.testBuild): match changes Index: builder.py =================================================================== RCS file: /cvsroot/buildbot/buildbot/buildbot/status/builder.py,v retrieving revision 1.74 retrieving revision 1.75 diff -u -d -r1.74 -r1.75 --- builder.py 3 Jan 2006 09:26:41 -0000 1.74 +++ builder.py 23 Jan 2006 23:03:26 -0000 1.75 @@ -7,7 +7,7 @@ from twisted.internet import reactor, defer from twisted.protocols import basic -import time, os, os.path, shutil, sys, re +import time, os, os.path, shutil, sys, re, urllib try: import cPickle as pickle except ImportError: @@ -1762,21 +1762,23 @@ pass if providedBy(thing, interfaces.IBuilderStatus): builder = thing - return prefix + builder.getName() + return prefix + urllib.quote(builder.getName(), safe='') if providedBy(thing, interfaces.IBuildStatus): build = thing builder = build.getBuilder() - return "%s%s/builds/%d" % (prefix, - builder.getName(), - build.getNumber()) + return "%s%s/builds/%d" % ( + prefix, + urllib.quote(builder.getName(), safe=''), + build.getNumber()) if providedBy(thing, interfaces.IBuildStepStatus): step = thing build = step.getBuild() builder = build.getBuilder() - return "%s%s/builds/%d/%s" % (prefix, - builder.getName(), - build.getNumber(), - "step-" + step.getName()) + return "%s%s/builds/%d/%s" % ( + prefix, + urllib.quote(builder.getName(), safe=''), + build.getNumber(), + "step-" + urllib.quote(step.getName(), safe='')) # IBuildSetStatus # IBuildRequestStatus # ISlaveStatus @@ -1802,11 +1804,12 @@ break else: return None - return "%s%s/builds/%d/%s/%d" % (prefix, - builder.getName(), - build.getNumber(), - "step-" + step.getName(), - lognum) + return "%s%s/builds/%d/%s/%d" % ( + prefix, + urllib.quote(builder.getName(), safe=''), + build.getNumber(), + "step-" + urllib.quote(step.getName(), safe=''), + lognum) def getSchedulers(self): Index: html.py =================================================================== RCS file: /cvsroot/buildbot/buildbot/buildbot/status/html.py,v retrieving revision 1.79 retrieving revision 1.80 diff -u -d -r1.79 -r1.80 --- html.py 13 Jan 2006 08:34:28 -0000 1.79 +++ html.py 23 Jan 2006 23:03:26 -0000 1.80 @@ -220,6 +220,11 @@ "
      \n") for num in range(len(logs)): if logs[num].hasContents(): + # FIXME: If the step name has a / in it, this is broken + # either way. If we quote it but say '/'s are safe, + # it chops up the step name. If we quote it and '/'s + # are not safe, it escapes the / that separates the + # step name from the log number. data += '
    • %s
    • \n' % \ (urllib.quote(request.childLink("%d" % num)), html.escape(logs[num].getName())) @@ -321,7 +326,7 @@ data += ("

      Build %s:#%d

      \n" "

      Reason:

      \n%s\n" % (self.status.getURLForThing(b.getBuilder()), - urllib.quote(b.getBuilder().getName()), b.getNumber(), + b.getBuilder().getName(), b.getNumber(), html.escape(b.getReason()))) branch, revision, patch = b.getSourceStamp() @@ -912,8 +917,8 @@ b = self.original name = b.getBuilder().getName() number = b.getNumber() - url = "%s/builds/%d" % (name, number) - text = 'Build %d' % (urllib.quote(url), number) + url = "%s/builds/%d" % (urllib.quote(name, safe=''), number) + text = 'Build %d' % (url, number) color = "yellow" class_ = "start" if b.isFinished() and not b.getSteps(): @@ -933,9 +938,10 @@ def getBox(self): b = self.original.getBuild() - urlbase = "%s/builds/%d/step-%s" % (b.getBuilder().getName(), - b.getNumber(), - self.original.getName()) + urlbase = "%s/builds/%d/step-%s" % ( + urllib.quote(b.getBuilder().getName(), safe=''), + b.getNumber(), + urllib.quote(self.original.getName(), safe='')) text = self.original.getText() if text is None: log.msg("getText() gave None", urlbase) @@ -945,7 +951,7 @@ for num in range(len(logs)): name = logs[num].getName() if logs[num].hasContents(): - url = urllib.quote("%s/%d" % (urlbase, num)) + url = "%s/%d" % (urlbase, num) text.append("%s" % (url, html.escape(name))) else: text.append(html.escape(name)) @@ -1122,12 +1128,12 @@ data += td("time (%s)" % TZ, align="center", class_="Time") name = changeNames[0] data += td( - "%s" % (urllib.quote(name), name), + "%s" % (urllib.quote(name, safe=''), name), align="center", class_="Change") for name in builderNames: data += td( #"%s" % (request.childLink(name), name), - "%s" % (urllib.quote(name), name), + "%s" % (urllib.quote(name, safe=''), name), align="center", class_="Builder") data += " \n" From warner at users.sourceforge.net Tue Jan 24 01:58:24 2006 From: warner at users.sourceforge.net (Brian Warner) Date: Tue, 24 Jan 2006 01:58:24 +0000 Subject: [Buildbot-commits] site index.html,1.53,1.54 Message-ID: Update of /cvsroot/buildbot/site In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15444 Modified Files: index.html Log Message: add KDE and WebKit buildbots Index: index.html =================================================================== RCS file: /cvsroot/buildbot/site/index.html,v retrieving revision 1.53 retrieving revision 1.54 diff -u -d -r1.53 -r1.54 --- index.html 12 Jan 2006 22:56:48 -0000 1.53 +++ index.html 24 Jan 2006 01:58:21 -0000 1.54 @@ -171,6 +171,14 @@ mentioned it in his blog. +
    • The KDE + Project has a buildbot, working on their unstable code branch.
    • + +
    • The OpenDarwin WebKit component + (which includes the HTML renderer used by the Safari browser in OS-X) has a + buildbot too.
    • +
    • install a Buildbot today and get your name added here!
    @@ -193,5 +201,5 @@ align="right" /> -Last modified: Thu Jan 12 14:53:03 PST 2006 +Last modified: Mon Jan 23 17:58:08 PST 2006