From warner at users.sourceforge.net Sat Nov 5 21:06:17 2005 From: warner at users.sourceforge.net (Brian Warner) Date: Sat, 05 Nov 2005 21:06:17 +0000 Subject: [Buildbot-commits] buildbot/buildbot interfaces.py,1.37,1.38 Message-ID: Update of /cvsroot/buildbot/buildbot/buildbot In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17285/buildbot Modified Files: interfaces.py Log Message: Revision: arch at buildbot.sf.net--2004/buildbot--dev--0--patch-408 Creator: Brian Warner add resubmit-build, change Step URLs * buildbot/interfaces.py (IBuilderControl.resubmitBuild): new method, takes an IBuildStatus and rebuilds it. It might make more sense to add this to IBuildControl instead, but that instance goes away completely once the build has finished, and resubmitting builds can take place weeks later. * buildbot/process/builder.py (BuilderControl.resubmitBuild): same * buildbot/status/html.py (StatusResourceBuild): also stash an IBuilderControl so we can use resubmitBuild. (StatusResourceBuild.body): render "resubmit" button if we can. Also add hrefs for each BuildStep (StatusResourceBuild.rebuild): add action for "resubmit" button (StatusResourceBuilder.getChild): give it an IBuilderControl * buildbot/status/builder.py (Status.getURLForThing): change the URL for BuildSteps to have a "step-" prefix, so the magic URLs that live as targets of buttons like "stop" and "rebuild" can't collide with them. * buildbot/status/builder.py (Status.getURLForThing): same * buildbot/status/html.py (StatusResourceBuild.getChild): same (StepBox.getBox): same * buildbot/test/test_web.py (GetURL): same (Logfile): same * buildbot/process/step.py (SVN.__init__): put svnurl/baseURL exclusivity checks after Source.__init__ upcall, so misspelled arguments will be reported more usefully (Darcs.__init__): same Index: interfaces.py =================================================================== RCS file: /cvsroot/buildbot/buildbot/buildbot/interfaces.py,v retrieving revision 1.37 retrieving revision 1.38 diff -u -d -r1.37 -r1.38 --- interfaces.py 24 Oct 2005 21:39:52 -0000 1.37 +++ interfaces.py 5 Nov 2005 21:06:14 -0000 1.38 @@ -833,6 +833,12 @@ that a slave will eventually connect. This method is appropriate for use by things like the web-page 'Force Build' button.""" + def resubmitBuild(buildStatus, reason=""): + """Rebuild something we've already built before. This submits a + BuildRequest to our Builder using the same SourceStamp as the earlier + build. This has no effect (but may eventually raise an exception) if + this Build has not yet finished.""" + def getPendingBuilds(): """Return a list of L{IBuildRequestControl} objects for this Builder. Each one corresponds to a pending build that has not yet started (due From warner at users.sourceforge.net Sat Nov 5 21:06:17 2005 From: warner at users.sourceforge.net (Brian Warner) Date: Sat, 05 Nov 2005 21:06:17 +0000 Subject: [Buildbot-commits] buildbot ChangeLog,1.542,1.543 Message-ID: Update of /cvsroot/buildbot/buildbot In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17285 Modified Files: ChangeLog Log Message: Revision: arch at buildbot.sf.net--2004/buildbot--dev--0--patch-408 Creator: Brian Warner add resubmit-build, change Step URLs * buildbot/interfaces.py (IBuilderControl.resubmitBuild): new method, takes an IBuildStatus and rebuilds it. It might make more sense to add this to IBuildControl instead, but that instance goes away completely once the build has finished, and resubmitting builds can take place weeks later. * buildbot/process/builder.py (BuilderControl.resubmitBuild): same * buildbot/status/html.py (StatusResourceBuild): also stash an IBuilderControl so we can use resubmitBuild. (StatusResourceBuild.body): render "resubmit" button if we can. Also add hrefs for each BuildStep (StatusResourceBuild.rebuild): add action for "resubmit" button (StatusResourceBuilder.getChild): give it an IBuilderControl * buildbot/status/builder.py (Status.getURLForThing): change the URL for BuildSteps to have a "step-" prefix, so the magic URLs that live as targets of buttons like "stop" and "rebuild" can't collide with them. * buildbot/status/builder.py (Status.getURLForThing): same * buildbot/status/html.py (StatusResourceBuild.getChild): same (StepBox.getBox): same * buildbot/test/test_web.py (GetURL): same (Logfile): same * buildbot/process/step.py (SVN.__init__): put svnurl/baseURL exclusivity checks after Source.__init__ upcall, so misspelled arguments will be reported more usefully (Darcs.__init__): same Index: ChangeLog =================================================================== RCS file: /cvsroot/buildbot/buildbot/ChangeLog,v retrieving revision 1.542 retrieving revision 1.543 diff -u -d -r1.542 -r1.543 --- ChangeLog 30 Oct 2005 01:10:42 -0000 1.542 +++ ChangeLog 5 Nov 2005 21:06:15 -0000 1.543 @@ -1,3 +1,33 @@ +2005-11-03 Brian Warner + + * buildbot/interfaces.py (IBuilderControl.resubmitBuild): new + method, takes an IBuildStatus and rebuilds it. It might make more + sense to add this to IBuildControl instead, but that instance goes + away completely once the build has finished, and resubmitting + builds can take place weeks later. + * buildbot/process/builder.py (BuilderControl.resubmitBuild): same + * buildbot/status/html.py (StatusResourceBuild): also stash an + IBuilderControl so we can use resubmitBuild. + (StatusResourceBuild.body): render "resubmit" button if we can. + Also add hrefs for each BuildStep + (StatusResourceBuild.rebuild): add action for "resubmit" button + (StatusResourceBuilder.getChild): give it an IBuilderControl + + * buildbot/status/builder.py (Status.getURLForThing): change the + URL for BuildSteps to have a "step-" prefix, so the magic URLs + that live as targets of buttons like "stop" and "rebuild" can't + collide with them. + * buildbot/status/builder.py (Status.getURLForThing): same + * buildbot/status/html.py (StatusResourceBuild.getChild): same + (StepBox.getBox): same + * buildbot/test/test_web.py (GetURL): same + (Logfile): same + + * buildbot/process/step.py (SVN.__init__): put svnurl/baseURL + exclusivity checks after Source.__init__ upcall, so misspelled + arguments will be reported more usefully + (Darcs.__init__): same + 2005-10-29 Brian Warner * docs/examples/twisted_master.cfg: don't double-fire the 'quick' From warner at users.sourceforge.net Sat Nov 5 21:06:17 2005 From: warner at users.sourceforge.net (Brian Warner) Date: Sat, 05 Nov 2005 21:06:17 +0000 Subject: [Buildbot-commits] buildbot/buildbot/status html.py,1.75,1.76 builder.py,1.70,1.71 Message-ID: Update of /cvsroot/buildbot/buildbot/buildbot/status In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17285/buildbot/status Modified Files: html.py builder.py Log Message: Revision: arch at buildbot.sf.net--2004/buildbot--dev--0--patch-408 Creator: Brian Warner add resubmit-build, change Step URLs * buildbot/interfaces.py (IBuilderControl.resubmitBuild): new method, takes an IBuildStatus and rebuilds it. It might make more sense to add this to IBuildControl instead, but that instance goes away completely once the build has finished, and resubmitting builds can take place weeks later. * buildbot/process/builder.py (BuilderControl.resubmitBuild): same * buildbot/status/html.py (StatusResourceBuild): also stash an IBuilderControl so we can use resubmitBuild. (StatusResourceBuild.body): render "resubmit" button if we can. Also add hrefs for each BuildStep (StatusResourceBuild.rebuild): add action for "resubmit" button (StatusResourceBuilder.getChild): give it an IBuilderControl * buildbot/status/builder.py (Status.getURLForThing): change the URL for BuildSteps to have a "step-" prefix, so the magic URLs that live as targets of buttons like "stop" and "rebuild" can't collide with them. * buildbot/status/builder.py (Status.getURLForThing): same * buildbot/status/html.py (StatusResourceBuild.getChild): same (StepBox.getBox): same * buildbot/test/test_web.py (GetURL): same (Logfile): same * buildbot/process/step.py (SVN.__init__): put svnurl/baseURL exclusivity checks after Source.__init__ upcall, so misspelled arguments will be reported more usefully (Darcs.__init__): same Index: builder.py =================================================================== RCS file: /cvsroot/buildbot/buildbot/buildbot/status/builder.py,v retrieving revision 1.70 retrieving revision 1.71 diff -u -d -r1.70 -r1.71 --- builder.py 23 Oct 2005 05:06:02 -0000 1.70 +++ builder.py 5 Nov 2005 21:06:15 -0000 1.71 @@ -1764,7 +1764,7 @@ return "%s%s/builds/%d/%s" % (prefix, builder.getName(), build.getNumber(), - step.getName()) + "step-" + step.getName()) # IBuildSetStatus # IBuildRequestStatus # ISlaveStatus @@ -1793,7 +1793,7 @@ return "%s%s/builds/%d/%s/%d" % (prefix, builder.getName(), build.getNumber(), - step.getName(), + "step-" + step.getName(), lognum) Index: html.py =================================================================== RCS file: /cvsroot/buildbot/buildbot/buildbot/status/html.py,v retrieving revision 1.75 retrieving revision 1.76 diff -u -d -r1.75 -r1.76 --- html.py 26 Oct 2005 21:33:20 -0000 1.75 +++ html.py 5 Nov 2005 21:06:15 -0000 1.76 @@ -305,11 +305,12 @@ class StatusResourceBuild(HtmlResource): title = "Build" - def __init__(self, status, build, control): + def __init__(self, status, build, builderControl, buildControl): HtmlResource.__init__(self) self.status = status self.build = build - self.control = control + self.builderControl = builderControl + self.control = buildControl def body(self, request): b = self.build @@ -335,7 +336,6 @@ and not b.getChanges()): data += "
  • build of most recent revision
  • \n" data += " \n" - if b.isFinished(): data += "

    Buildslave: %s

    \n" % html.escape(b.getSlavename()) data += "

    Results:

    \n" @@ -359,12 +359,38 @@ """ + if b.isFinished() and self.builderControl is not None: + data += "

    Resubmit Build:

    \n" + # can we rebuild it exactly? + exactly = (revision is not None) or b.getChanges() + if exactly: + data += ("

    This tree was built from a specific set of \n" + "source files, and can be rebuilt exactly

    \n") + else: + data += ("

    This tree was built from the most recent " + "revision") + if branch: + data += " (along some branch)" + data += (" and thus it might not be possible to rebuild it \n" + "exactly. Any changes that have been committed \n" + "after this build was started will be \n" + "included in a rebuild.

    \n") + rebuildURL = urllib.quote(request.childLink("rebuild")) + data += ('
    \n' + % rebuildURL) + data += make_row("Your name:", + "") + data += make_row("Reason for re-running build:", + "") + data += '\n' + data += "

    Steps and Logfiles:

    \n" if b.getLogs(): data += "
      \n" for s in b.getSteps(): - data += "
    1. %s [%s]\n" % (s.getName(), - " ".join(s.getText())) + data += ("
    2. %s [%s]\n" + % (self.status.getURLForThing(s), s.getName(), + " ".join(s.getText()))) if s.getLogs(): data += "
        \n" for logfile in s.getLogs(): @@ -409,19 +435,43 @@ reactor.callLater(1, d.callback, r) return DeferredResource(d) + def rebuild(self, request): + log.msg("web rebuild of build %s:%s" % \ + (self.build.getBuilder().getName(), + self.build.getNumber())) + name = request.args.get("username", [""])[0] + comments = request.args.get("comments", [""])[0] + reason = ("The web-page 'rebuild' button was pressed by " + "'%s': %s\n" % (name, comments)) + if not self.builderControl or not self.build.isFinished(): + log.msg("could not rebuild: bc=%s, isFinished=%s" + % (self.builderControl, self.build.isFinished())) + # TODO: indicate an error + else: + self.builderControl.resubmitBuild(self.build, reason) + # we're at http://localhost:8080/svn-hello/builds/5/rebuild?[args] and + # we want to go to the top, at http://localhost:8080/ + r = Redirect("../../..") + d = defer.Deferred() + reactor.callLater(1, d.callback, r) + return DeferredResource(d) + def getChild(self, path, request): if path == "tests": - # TODO: this will collide with a step named 'tests' return StatusResourceTestResults(self.status, self.build.getTestResults()) if path == "stop": return self.stop(request) - stepname = path - steps = self.build.getSteps() - for s in steps: - if s.getName() == stepname: - return StatusResourceBuildStep(self.status, s) - return NoResource("No such BuildStep '%s'" % stepname) + if path == "rebuild": + return self.rebuild(request) + if path.startswith("step-"): + stepname = path[len("step-"):] + steps = self.build.getSteps() + for s in steps: + if s.getName() == stepname: + return StatusResourceBuildStep(self.status, s) + return NoResource("No such BuildStep '%s'" % stepname) + return NoResource("No such resource '%s'" % path) # $builder class StatusResourceBuilder(HtmlResource): @@ -575,7 +625,8 @@ control = None if self.control: control = self.control.getBuild(num) - return StatusResourceBuild(self.status, build, control) + return StatusResourceBuild(self.status, build, + self.control, control) else: return NoResource("No such build '%d'" % num) return NoResource("really weird URL %s" % path) @@ -876,9 +927,9 @@ def getBox(self): b = self.original.getBuild() - urlbase = "%s/builds/%d/%s" % (b.getBuilder().getName(), - b.getNumber(), - self.original.getName()) + urlbase = "%s/builds/%d/step-%s" % (b.getBuilder().getName(), + b.getNumber(), + self.original.getName()) text = self.original.getText() if text is None: log.msg("getText() gave None", urlbase) From warner at users.sourceforge.net Sat Nov 5 21:06:17 2005 From: warner at users.sourceforge.net (Brian Warner) Date: Sat, 05 Nov 2005 21:06:17 +0000 Subject: [Buildbot-commits] buildbot/buildbot/process step.py,1.75,1.76 builder.py,1.33,1.34 Message-ID: Update of /cvsroot/buildbot/buildbot/buildbot/process In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17285/buildbot/process Modified Files: step.py builder.py Log Message: Revision: arch at buildbot.sf.net--2004/buildbot--dev--0--patch-408 Creator: Brian Warner add resubmit-build, change Step URLs * buildbot/interfaces.py (IBuilderControl.resubmitBuild): new method, takes an IBuildStatus and rebuilds it. It might make more sense to add this to IBuildControl instead, but that instance goes away completely once the build has finished, and resubmitting builds can take place weeks later. * buildbot/process/builder.py (BuilderControl.resubmitBuild): same * buildbot/status/html.py (StatusResourceBuild): also stash an IBuilderControl so we can use resubmitBuild. (StatusResourceBuild.body): render "resubmit" button if we can. Also add hrefs for each BuildStep (StatusResourceBuild.rebuild): add action for "resubmit" button (StatusResourceBuilder.getChild): give it an IBuilderControl * buildbot/status/builder.py (Status.getURLForThing): change the URL for BuildSteps to have a "step-" prefix, so the magic URLs that live as targets of buttons like "stop" and "rebuild" can't collide with them. * buildbot/status/builder.py (Status.getURLForThing): same * buildbot/status/html.py (StatusResourceBuild.getChild): same (StepBox.getBox): same * buildbot/test/test_web.py (GetURL): same (Logfile): same * buildbot/process/step.py (SVN.__init__): put svnurl/baseURL exclusivity checks after Source.__init__ upcall, so misspelled arguments will be reported more usefully (Darcs.__init__): same Index: builder.py =================================================================== RCS file: /cvsroot/buildbot/buildbot/buildbot/process/builder.py,v retrieving revision 1.33 retrieving revision 1.34 diff -u -d -r1.33 -r1.34 --- builder.py 20 Oct 2005 22:25:29 -0000 1.33 +++ builder.py 5 Nov 2005 21:06:15 -0000 1.34 @@ -649,6 +649,15 @@ raise interfaces.NoSlaveError self.requestBuild(req) + def resubmitBuild(self, bs, reason=""): + if not bs.isFinished(): + return + branch, revision, patch = bs.getSourceStamp() + changes = bs.getChanges() + ss = sourcestamp.SourceStamp(branch, revision, patch, changes) + req = base.BuildRequest(reason, ss, self.original.name) + self.requestBuild(req) + def getPendingBuilds(self): # return IBuildRequestControl objects raise NotImplementedError Index: step.py =================================================================== RCS file: /cvsroot/buildbot/buildbot/buildbot/process/step.py,v retrieving revision 1.75 retrieving revision 1.76 diff -u -d -r1.75 -r1.76 --- step.py 24 Oct 2005 22:42:03 -0000 1.75 +++ step.py 5 Nov 2005 21:06:15 -0000 1.76 @@ -1273,15 +1273,15 @@ DeprecationWarning) kwargs['workdir'] = directory - if not svnurl and not baseURL: - raise ValueError("you must use exactly one of svnurl and baseURL") - self.svnurl = svnurl self.baseURL = baseURL self.branch = defaultBranch Source.__init__(self, **kwargs) + if not svnurl and not baseURL: + raise ValueError("you must use exactly one of svnurl and baseURL") + def computeSourceRevision(self, changes): if not changes: @@ -1385,15 +1385,15 @@ C{baseURL} and the result handed to the 'darcs pull' command. """ + self.repourl = repourl + self.baseURL = baseURL + self.branch = defaultBranch + Source.__init__(self, **kwargs) assert kwargs['mode'] != "export", \ "Darcs does not have an 'export' mode" if (not repourl and not baseURL) or (repourl and baseURL): raise ValueError("you must provide exactly one of repourl and" " baseURL") - self.repourl = repourl - self.baseURL = baseURL - self.branch = defaultBranch - Source.__init__(self, **kwargs) def startVC(self, branch, revision, patch): slavever = self.slaveVersion("darcs") From warner at users.sourceforge.net Sat Nov 5 21:06:17 2005 From: warner at users.sourceforge.net (Brian Warner) Date: Sat, 05 Nov 2005 21:06:17 +0000 Subject: [Buildbot-commits] buildbot/buildbot/test test_web.py,1.24,1.25 Message-ID: Update of /cvsroot/buildbot/buildbot/buildbot/test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17285/buildbot/test Modified Files: test_web.py Log Message: Revision: arch at buildbot.sf.net--2004/buildbot--dev--0--patch-408 Creator: Brian Warner add resubmit-build, change Step URLs * buildbot/interfaces.py (IBuilderControl.resubmitBuild): new method, takes an IBuildStatus and rebuilds it. It might make more sense to add this to IBuildControl instead, but that instance goes away completely once the build has finished, and resubmitting builds can take place weeks later. * buildbot/process/builder.py (BuilderControl.resubmitBuild): same * buildbot/status/html.py (StatusResourceBuild): also stash an IBuilderControl so we can use resubmitBuild. (StatusResourceBuild.body): render "resubmit" button if we can. Also add hrefs for each BuildStep (StatusResourceBuild.rebuild): add action for "resubmit" button (StatusResourceBuilder.getChild): give it an IBuilderControl * buildbot/status/builder.py (Status.getURLForThing): change the URL for BuildSteps to have a "step-" prefix, so the magic URLs that live as targets of buttons like "stop" and "rebuild" can't collide with them. * buildbot/status/builder.py (Status.getURLForThing): same * buildbot/status/html.py (StatusResourceBuild.getChild): same (StepBox.getBox): same * buildbot/test/test_web.py (GetURL): same (Logfile): same * buildbot/process/step.py (SVN.__init__): put svnurl/baseURL exclusivity checks after Source.__init__ upcall, so misspelled arguments will be reported more usefully (Darcs.__init__): same Index: test_web.py =================================================================== RCS file: /cvsroot/buildbot/buildbot/buildbot/test/test_web.py,v retrieving revision 1.24 retrieving revision 1.25 diff -u -d -r1.24 -r1.25 --- test_web.py 23 Oct 2005 06:10:07 -0000 1.24 +++ test_web.py 5 Nov 2005 21:06:15 -0000 1.25 @@ -342,9 +342,10 @@ self.assertURLEqual(build, "b1/builds/0") # no page for builder.getEvent(-1) step = build.getSteps()[0] - self.assertURLEqual(step, "b1/builds/0/remote dummy") # really? + self.assertURLEqual(step, "b1/builds/0/step-remote dummy") # maybe page for build.getTestResults? - self.assertURLEqual(step.getLogs()[0], "b1/builds/0/remote dummy/0") + self.assertURLEqual(step.getLogs()[0], + "b1/builds/0/step-remote dummy/0") @@ -403,6 +404,10 @@ step1.step_status.stepFinished(builder.SUCCESS) bs.buildFinished() + def getLogURL(self, stepname, lognum): + logurl = "http://localhost:%d/builder1/builds/0/step-%s/%d" \ + % (self.port, stepname, lognum) + return logurl def test_logfile1(self): d = client.getPage("http://localhost:%d/" % self.port) @@ -413,7 +418,7 @@ self.failUnless(page) def test_logfile2(self): - logurl = "http://localhost:%d/builder1/builds/0/setup/0" % self.port + logurl = self.getLogURL("setup", 0) d = client.getPage(logurl) d.addCallback(self._test_logfile2_1) return maybeWait(d) @@ -421,7 +426,7 @@ self.failUnless(logbody) def test_logfile3(self): - logurl = "http://localhost:%d/builder1/builds/0/setup/0" % self.port + logurl = self.getLogURL("setup", 0) d = client.getPage(logurl + "/text") d.addCallback(self._test_logfile3_1) return maybeWait(d) @@ -429,7 +434,7 @@ self.failUnlessEqual(logtext, "some stdout\n") def test_logfile4(self): - logurl = "http://localhost:%d/builder1/builds/0/setup/1" % self.port + logurl = self.getLogURL("setup", 1) d = client.getPage(logurl) d.addCallback(self._test_logfile4_1) return maybeWait(d) @@ -442,7 +447,7 @@ # twisted-1.3.0, fails to resume sending chunks after the client # stalls for a few seconds, because of a recursive doWrite() call # that was fixed in twisted-2.0.0 - p = SlowReader("GET /builder1/builds/0/setup/2 HTTP/1.0\r\n\r\n") + p = SlowReader("GET /builder1/builds/0/step-setup/2 HTTP/1.0\r\n\r\n") f = CFactory(p) c = reactor.connectTCP("localhost", self.port, f) d = p.d @@ -459,7 +464,7 @@ # buildbot-0.6.6 dies as the NetstringReceiver barfs on the # saved logfile, because it was using one big chunk and exceeding # NetstringReceiver.MAX_LENGTH - p = SlowReader("GET /builder1/builds/0/setup/3 HTTP/1.0\r\n\r\n") + p = SlowReader("GET /builder1/builds/0/step-setup/3 HTTP/1.0\r\n\r\n") f = CFactory(p) c = reactor.connectTCP("localhost", self.port, f) d = p.d From warner at users.sourceforge.net Sat Nov 5 21:17:22 2005 From: warner at users.sourceforge.net (Brian Warner) Date: Sat, 05 Nov 2005 21:17:22 +0000 Subject: [Buildbot-commits] buildbot ChangeLog,1.543,1.544 Message-ID: Update of /cvsroot/buildbot/buildbot In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19268 Modified Files: ChangeLog Log Message: Revision: arch at buildbot.sf.net--2004/buildbot--dev--0--patch-410 Creator: Brian Warner update twisted_master.cfg now that the sid-chroot is gone * docs/examples/twisted_master.cfg: update: bot1 can now handle the 'full-2.3' build, and the 'reactors' build is now run under python-2.4 because the buildslave no longer has gtk/etc bindings for earlier versions. Index: ChangeLog =================================================================== RCS file: /cvsroot/buildbot/buildbot/ChangeLog,v retrieving revision 1.543 retrieving revision 1.544 diff -u -d -r1.543 -r1.544 --- ChangeLog 5 Nov 2005 21:06:15 -0000 1.543 +++ ChangeLog 5 Nov 2005 21:17:20 -0000 1.544 @@ -1,3 +1,10 @@ +2005-11-05 Brian Warner + + * docs/examples/twisted_master.cfg: update: bot1 can now handle + the 'full-2.3' build, and the 'reactors' build is now run under + python-2.4 because the buildslave no longer has gtk/etc bindings + for earlier versions. + 2005-11-03 Brian Warner * buildbot/interfaces.py (IBuilderControl.resubmitBuild): new From warner at users.sourceforge.net Sat Nov 5 21:17:22 2005 From: warner at users.sourceforge.net (Brian Warner) Date: Sat, 05 Nov 2005 21:17:22 +0000 Subject: [Buildbot-commits] buildbot/docs/examples twisted_master.cfg,1.37,1.38 Message-ID: Update of /cvsroot/buildbot/buildbot/docs/examples In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19268/docs/examples Modified Files: twisted_master.cfg Log Message: Revision: arch at buildbot.sf.net--2004/buildbot--dev--0--patch-410 Creator: Brian Warner update twisted_master.cfg now that the sid-chroot is gone * docs/examples/twisted_master.cfg: update: bot1 can now handle the 'full-2.3' build, and the 'reactors' build is now run under python-2.4 because the buildslave no longer has gtk/etc bindings for earlier versions. Index: twisted_master.cfg =================================================================== RCS file: /cvsroot/buildbot/buildbot/docs/examples/twisted_master.cfg,v retrieving revision 1.37 retrieving revision 1.38 diff -u -d -r1.37 -r1.38 --- twisted_master.cfg 30 Oct 2005 01:10:42 -0000 1.37 +++ twisted_master.cfg 5 Nov 2005 21:17:20 -0000 1.38 @@ -98,7 +98,7 @@ "-Wignore::PendingDeprecationWarning:distutils.command.build_ext", ] b23 = {'name': "full-2.3", - 'slavename': "bot2", + 'slavename': "bot1", 'builddir': "full2.3", 'factory': FullTwistedBuildFactory(source_copy, python=["python2.3", "-Wall"], @@ -138,7 +138,7 @@ 'slavename': "bot2", 'builddir': "reactors", 'factory': TwistedReactorsBuildFactory(source_copy, - python="python2.3", + python="python2.4", reactors=reactors), } builders.append(b4) From warner at users.sourceforge.net Sat Nov 5 21:52:10 2005 From: warner at users.sourceforge.net (Brian Warner) Date: Sat, 05 Nov 2005 21:52:10 +0000 Subject: [Buildbot-commits] buildbot/buildbot/process factory.py,1.10,1.11 Message-ID: Update of /cvsroot/buildbot/buildbot/buildbot/process In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25568/buildbot/process Modified Files: factory.py Log Message: Revision: arch at buildbot.sf.net--2004/buildbot--dev--0--patch-412 Creator: Brian Warner fix silly typo, add TODO test * buildbot/process/factory.py (GNUAutoconf.__init__): fix a silly typo, caught by Mark Dillavou, closes SF#1216636. * buildbot/test/test_status.py (Log.TODO_testDuplicate): add notes about a test to add some day Index: factory.py =================================================================== RCS file: /cvsroot/buildbot/buildbot/buildbot/process/factory.py,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- factory.py 19 Jul 2005 23:11:58 -0000 1.10 +++ factory.py 5 Nov 2005 21:52:08 -0000 1.11 @@ -51,7 +51,7 @@ # list of strings is the preferred form. if type(configure) is str: if configureFlags: - assert not " " in str # please use list instead + assert not " " in configure # please use list instead command = [configure] + configureFlags else: command = configure From warner at users.sourceforge.net Sat Nov 5 21:52:11 2005 From: warner at users.sourceforge.net (Brian Warner) Date: Sat, 05 Nov 2005 21:52:11 +0000 Subject: [Buildbot-commits] buildbot/buildbot/test test_status.py,1.27,1.28 Message-ID: Update of /cvsroot/buildbot/buildbot/buildbot/test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25568/buildbot/test Modified Files: test_status.py Log Message: Revision: arch at buildbot.sf.net--2004/buildbot--dev--0--patch-412 Creator: Brian Warner fix silly typo, add TODO test * buildbot/process/factory.py (GNUAutoconf.__init__): fix a silly typo, caught by Mark Dillavou, closes SF#1216636. * buildbot/test/test_status.py (Log.TODO_testDuplicate): add notes about a test to add some day Index: test_status.py =================================================================== RCS file: /cvsroot/buildbot/buildbot/buildbot/test/test_status.py,v retrieving revision 1.27 retrieving revision 1.28 diff -u -d -r1.27 -r1.28 --- test_status.py 26 Oct 2005 21:33:20 -0000 1.27 +++ test_status.py 5 Nov 2005 21:52:09 -0000 1.28 @@ -423,6 +423,21 @@ os.unlink(l.getFilename()) self.failIf(l.hasContents()) + def TODO_testDuplicate(self): + # create multiple logs for the same step with the same logname, make + # sure their on-disk filenames are suitably uniquified. This + # functionality actually lives in BuildStepStatus and BuildStatus, so + # this test must involve more than just the MyLog class. + + # naieve approach, doesn't work + l1 = MyLog(self.basedir, "duplicate") + l1.addStdout("Some text\n") + l1.finish() + l2 = MyLog(self.basedir, "duplicate") + l2.addStdout("Some more text\n") + l2.finish() + self.failIfEqual(l1.getFilename(), l2.getFilename()) + def testMerge1(self): l = MyLog(self.basedir, "merge1") l.addHeader("HEADER\n") From warner at users.sourceforge.net Sat Nov 5 21:52:11 2005 From: warner at users.sourceforge.net (Brian Warner) Date: Sat, 05 Nov 2005 21:52:11 +0000 Subject: [Buildbot-commits] buildbot ChangeLog,1.544,1.545 Message-ID: Update of /cvsroot/buildbot/buildbot In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25568 Modified Files: ChangeLog Log Message: Revision: arch at buildbot.sf.net--2004/buildbot--dev--0--patch-412 Creator: Brian Warner fix silly typo, add TODO test * buildbot/process/factory.py (GNUAutoconf.__init__): fix a silly typo, caught by Mark Dillavou, closes SF#1216636. * buildbot/test/test_status.py (Log.TODO_testDuplicate): add notes about a test to add some day Index: ChangeLog =================================================================== RCS file: /cvsroot/buildbot/buildbot/ChangeLog,v retrieving revision 1.544 retrieving revision 1.545 diff -u -d -r1.544 -r1.545 --- ChangeLog 5 Nov 2005 21:17:20 -0000 1.544 +++ ChangeLog 5 Nov 2005 21:52:08 -0000 1.545 @@ -1,5 +1,11 @@ 2005-11-05 Brian Warner + * buildbot/process/factory.py (GNUAutoconf.__init__): fix a silly + typo, caught by Mark Dillavou, closes SF#1216636. + + * buildbot/test/test_status.py (Log.TODO_testDuplicate): add notes + about a test to add some day + * docs/examples/twisted_master.cfg: update: bot1 can now handle the 'full-2.3' build, and the 'reactors' build is now run under python-2.4 because the buildslave no longer has gtk/etc bindings From warner at users.sourceforge.net Sat Nov 5 22:27:51 2005 From: warner at users.sourceforge.net (Brian Warner) Date: Sat, 05 Nov 2005 22:27:51 +0000 Subject: [Buildbot-commits] buildbot/buildbot/process step.py,1.76,1.77 Message-ID: Update of /cvsroot/buildbot/buildbot/buildbot/process In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32175/buildbot/process Modified Files: step.py Log Message: Revision: arch at buildbot.sf.net--2004/buildbot--dev--0--patch-414 Creator: Brian Warner add "what we're checking out" note to the VC step description * buildbot/process/step.py (SVN): when building on a non-default branch, add the word "[branch]" to the VC step's description, so it is obvious that we're not building the usual stuff. Likewise, when we are building a specific revision, add the text "rNNN" to indicate what that revision number is. Thanks to Brad Hards and Nathaniel Smith for the suggestion. (Darcs.startVC): same (Arch.startVC): same (Bazaar.startVC): same Index: step.py =================================================================== RCS file: /cvsroot/buildbot/buildbot/buildbot/process/step.py,v retrieving revision 1.76 retrieving revision 1.77 diff -u -d -r1.76 -r1.77 --- step.py 5 Nov 2005 21:06:15 -0000 1.76 +++ step.py 5 Nov 2005 22:27:49 -0000 1.77 @@ -1348,6 +1348,14 @@ self.args['revision'] = revision self.args['patch'] = patch + revstuff = [] + if branch is not None and branch != self.branch: + revstuff.append("[branch]") + if revision is not None: + revstuff.append("r%s" % revision) + self.description.extend(revstuff) + self.descriptionDone.extend(revstuff) + self.cmd = LoggedRemoteCommand("svn", self.args) ShellCommand.start(self, warnings) @@ -1429,6 +1437,13 @@ self.args['repourl'] = self.baseURL + branch self.args['revision'] = revision self.args['patch'] = patch + + revstuff = [] + if branch is not None and branch != self.branch: + revstuff.append("[branch]") + self.description.extend(revstuff) + self.descriptionDone.extend(revstuff) + self.cmd = LoggedRemoteCommand("darcs", self.args) ShellCommand.start(self) @@ -1559,6 +1574,15 @@ self.args['revision'] = revision self.args['patch'] = patch warnings = self.checkSlaveVersion("arch", branch) + + revstuff = [] + if branch is not None and branch != self.branch: + revstuff.append("[branch]") + if revision is not None: + revstuff.append("patch%s" % revision) + self.description.extend(revstuff) + self.descriptionDone.extend(revstuff) + self.cmd = LoggedRemoteCommand("arch", self.args) ShellCommand.start(self, warnings) @@ -1596,6 +1620,15 @@ self.args['revision'] = revision self.args['patch'] = patch warnings = self.checkSlaveVersion("bazaar", branch) + + revstuff = [] + if branch is not None and branch != self.branch: + revstuff.append("[branch]") + if revision is not None: + revstuff.append("patch%s" % revision) + self.description.extend(revstuff) + self.descriptionDone.extend(revstuff) + self.cmd = LoggedRemoteCommand("bazaar", self.args) ShellCommand.start(self, warnings) From warner at users.sourceforge.net Sat Nov 5 22:27:51 2005 From: warner at users.sourceforge.net (Brian Warner) Date: Sat, 05 Nov 2005 22:27:51 +0000 Subject: [Buildbot-commits] buildbot ChangeLog,1.545,1.546 Message-ID: Update of /cvsroot/buildbot/buildbot In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32175 Modified Files: ChangeLog Log Message: Revision: arch at buildbot.sf.net--2004/buildbot--dev--0--patch-414 Creator: Brian Warner add "what we're checking out" note to the VC step description * buildbot/process/step.py (SVN): when building on a non-default branch, add the word "[branch]" to the VC step's description, so it is obvious that we're not building the usual stuff. Likewise, when we are building a specific revision, add the text "rNNN" to indicate what that revision number is. Thanks to Brad Hards and Nathaniel Smith for the suggestion. (Darcs.startVC): same (Arch.startVC): same (Bazaar.startVC): same Index: ChangeLog =================================================================== RCS file: /cvsroot/buildbot/buildbot/ChangeLog,v retrieving revision 1.545 retrieving revision 1.546 diff -u -d -r1.545 -r1.546 --- ChangeLog 5 Nov 2005 21:52:08 -0000 1.545 +++ ChangeLog 5 Nov 2005 22:27:49 -0000 1.546 @@ -1,5 +1,15 @@ 2005-11-05 Brian Warner + * buildbot/process/step.py (SVN): when building on a non-default + branch, add the word "[branch]" to the VC step's description, so + it is obvious that we're not building the usual stuff. Likewise, + when we are building a specific revision, add the text "rNNN" to + indicate what that revision number is. Thanks to Brad Hards and + Nathaniel Smith for the suggestion. + (Darcs.startVC): same + (Arch.startVC): same + (Bazaar.startVC): same + * buildbot/process/factory.py (GNUAutoconf.__init__): fix a silly typo, caught by Mark Dillavou, closes SF#1216636. From warner at users.sourceforge.net Sat Nov 5 22:53:02 2005 From: warner at users.sourceforge.net (Brian Warner) Date: Sat, 05 Nov 2005 22:53:02 +0000 Subject: [Buildbot-commits] buildbot ChangeLog,1.546,1.547 Message-ID: Update of /cvsroot/buildbot/buildbot In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4430 Modified Files: ChangeLog Log Message: Revision: arch at buildbot.sf.net--2004/buildbot--dev--0--patch-416 Creator: Brian Warner use binary mode when opening pickle files, for windows * buildbot/changes/changes.py (ChangeMaster.saveYourself): use binary mode when opening pickle files, to make windows work better. Thanks to Dobes Vandermeer for the catch. * buildbot/status/builder.py (BuildStatus.saveYourself): same (BuilderStatus.getBuildByNumber): same (Status.builderAdded): same * buildbot/master.py (BuildMaster.loadChanges): same * buildbot/util.py (Swappable): delete unused leftover code Index: ChangeLog =================================================================== RCS file: /cvsroot/buildbot/buildbot/ChangeLog,v retrieving revision 1.546 retrieving revision 1.547 diff -u -d -r1.546 -r1.547 --- ChangeLog 5 Nov 2005 22:27:49 -0000 1.546 +++ ChangeLog 5 Nov 2005 22:52:59 -0000 1.547 @@ -1,5 +1,15 @@ 2005-11-05 Brian Warner + * buildbot/changes/changes.py (ChangeMaster.saveYourself): use + binary mode when opening pickle files, to make windows work + better. Thanks to Dobes Vandermeer for the catch. + * buildbot/status/builder.py (BuildStatus.saveYourself): same + (BuilderStatus.getBuildByNumber): same + (Status.builderAdded): same + * buildbot/master.py (BuildMaster.loadChanges): same + + * buildbot/util.py (Swappable): delete unused leftover code + * buildbot/process/step.py (SVN): when building on a non-default branch, add the word "[branch]" to the VC step's description, so it is obvious that we're not building the usual stuff. Likewise, From warner at users.sourceforge.net Sat Nov 5 22:53:01 2005 From: warner at users.sourceforge.net (Brian Warner) Date: Sat, 05 Nov 2005 22:53:01 +0000 Subject: [Buildbot-commits] buildbot/buildbot/changes changes.py,1.26,1.27 Message-ID: Update of /cvsroot/buildbot/buildbot/buildbot/changes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4430/buildbot/changes Modified Files: changes.py Log Message: Revision: arch at buildbot.sf.net--2004/buildbot--dev--0--patch-416 Creator: Brian Warner use binary mode when opening pickle files, for windows * buildbot/changes/changes.py (ChangeMaster.saveYourself): use binary mode when opening pickle files, to make windows work better. Thanks to Dobes Vandermeer for the catch. * buildbot/status/builder.py (BuildStatus.saveYourself): same (BuilderStatus.getBuildByNumber): same (Status.builderAdded): same * buildbot/master.py (BuildMaster.loadChanges): same * buildbot/util.py (Swappable): delete unused leftover code Index: changes.py =================================================================== RCS file: /cvsroot/buildbot/buildbot/buildbot/changes/changes.py,v retrieving revision 1.26 retrieving revision 1.27 diff -u -d -r1.26 -r1.27 --- changes.py 19 Jul 2005 23:12:01 -0000 1.26 +++ changes.py 5 Nov 2005 22:52:59 -0000 1.27 @@ -250,7 +250,7 @@ filename = os.path.join(self.basedir, "changes.pck") tmpfilename = filename + ".tmp" try: - pickle.dump(self, open(tmpfilename, "w")) + pickle.dump(self, open(tmpfilename, "wb")) if sys.platform == 'win32': # windows cannot rename a file on top of an existing one if os.path.exists(filename): From warner at users.sourceforge.net Sat Nov 5 22:53:02 2005 From: warner at users.sourceforge.net (Brian Warner) Date: Sat, 05 Nov 2005 22:53:02 +0000 Subject: [Buildbot-commits] buildbot/buildbot/status builder.py,1.71,1.72 Message-ID: Update of /cvsroot/buildbot/buildbot/buildbot/status In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4430/buildbot/status Modified Files: builder.py Log Message: Revision: arch at buildbot.sf.net--2004/buildbot--dev--0--patch-416 Creator: Brian Warner use binary mode when opening pickle files, for windows * buildbot/changes/changes.py (ChangeMaster.saveYourself): use binary mode when opening pickle files, to make windows work better. Thanks to Dobes Vandermeer for the catch. * buildbot/status/builder.py (BuildStatus.saveYourself): same (BuilderStatus.getBuildByNumber): same (Status.builderAdded): same * buildbot/master.py (BuildMaster.loadChanges): same * buildbot/util.py (Swappable): delete unused leftover code Index: builder.py =================================================================== RCS file: /cvsroot/buildbot/buildbot/buildbot/status/builder.py,v retrieving revision 1.71 retrieving revision 1.72 diff -u -d -r1.71 -r1.72 --- builder.py 5 Nov 2005 21:06:15 -0000 1.71 +++ builder.py 5 Nov 2005 22:53:00 -0000 1.72 @@ -1246,7 +1246,7 @@ shutils.rmtree(filename, ignore_errors=True) tmpfilename = filename + ".tmp" try: - pickle.dump(self, open(tmpfilename, "w"), -1) + pickle.dump(self, open(tmpfilename, "wb"), -1) if sys.platform == 'win32': # windows cannot rename a file on top of an existing one, so # fall back to delete-first. There are ways this can fail and @@ -1378,7 +1378,7 @@ filename = os.path.join(self.basedir, "builder") tmpfilename = filename + ".tmp" try: - pickle.dump(self, open(tmpfilename, "w"), -1) + pickle.dump(self, open(tmpfilename, "wb"), -1) if sys.platform == 'win32': # windows cannot rename a file on top of an existing one if os.path.exists(filename): @@ -1407,7 +1407,7 @@ return build filename = os.path.join(self.basedir, "%d" % number) try: - build = pickle.load(open(filename, "r")) + build = pickle.load(open(filename, "rb")) styles.doUpgrade() build.builder = self # handle LogFiles from after 0.5.0 and before 0.6.5 @@ -1847,7 +1847,7 @@ log.msg("trying to load status pickle from %s" % filename) builder_status = None try: - builder_status = pickle.load(open(filename, "r")) + builder_status = pickle.load(open(filename, "rb")) styles.doUpgrade() except IOError: log.msg("no saved status pickle, creating a new one") From warner at users.sourceforge.net Sat Nov 5 22:53:02 2005 From: warner at users.sourceforge.net (Brian Warner) Date: Sat, 05 Nov 2005 22:53:02 +0000 Subject: [Buildbot-commits] buildbot/buildbot util.py,1.8,1.9 master.py,1.84,1.85 Message-ID: Update of /cvsroot/buildbot/buildbot/buildbot In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4430/buildbot Modified Files: util.py master.py Log Message: Revision: arch at buildbot.sf.net--2004/buildbot--dev--0--patch-416 Creator: Brian Warner use binary mode when opening pickle files, for windows * buildbot/changes/changes.py (ChangeMaster.saveYourself): use binary mode when opening pickle files, to make windows work better. Thanks to Dobes Vandermeer for the catch. * buildbot/status/builder.py (BuildStatus.saveYourself): same (BuilderStatus.getBuildByNumber): same (Status.builderAdded): same * buildbot/master.py (BuildMaster.loadChanges): same * buildbot/util.py (Swappable): delete unused leftover code Index: master.py =================================================================== RCS file: /cvsroot/buildbot/buildbot/buildbot/master.py,v retrieving revision 1.84 retrieving revision 1.85 diff -u -d -r1.84 -r1.85 --- master.py 25 Oct 2005 01:57:33 -0000 1.84 +++ master.py 5 Nov 2005 22:52:59 -0000 1.85 @@ -635,7 +635,7 @@ def loadChanges(self): filename = os.path.join(self.basedir, "changes.pck") try: - changes = pickle.load(open(filename, "r")) + changes = pickle.load(open(filename, "rb")) styles.doUpgrade() except IOError: log.msg("changes.pck missing, using new one") Index: util.py =================================================================== RCS file: /cvsroot/buildbot/buildbot/buildbot/util.py,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- util.py 24 Apr 2005 21:30:23 -0000 1.8 +++ util.py 5 Nov 2005 22:52:59 -0000 1.9 @@ -41,131 +41,6 @@ return Deferred._runCallbacks(self) -from twisted.internet import reactor -import pickle, os - -# objects that can be swapped out to disk when not used -class Swappable: - """I am an object with contents that are swapped out to disk when they - haven't been used for a while. Create me with a timeout and a filename - where the contents should be pickled. Use .set/.get to manipulate the - data. You must use .delete to explicitly delete the data. - - When this is persisted (or any time __getstate__ is called), the data - will be swapped to disk first. - - t = Swappable(filename='foo') - t.set(lotsOfData) - d = t.get() - t.delete() - del t - """ - - timeout = 5*60 # can be overridden with s.timeout=seconds - - def __init__(self): - self.data = None - self.timer = None - self.filed = 0 - self.filename = None - self.parent = None - def setFilename(self, parent=None, filename=None): - log.msg("Swappable.setFilename(%s,%s)" % (parent, filename)) - self.filename = filename - self.parent = parent - if self.filename is not None and self.data is not None: - self.startTimer() - def computeFilename(self): - """Most Swappable objects live (in RAM) in a tree of some sort. When - they move out (to disk), the files they are pickled into are in a - corresponding tree. If the .parent attribute is set, the object - will ask it (by calling .getSwappableName()) for a directory to use. - """ - if self.parent: - return os.path.join(self.parent.getSwappableName(), - self.filename) - return self.filename - - def get(self): - """This will raise an IndexError if the data is unavailable (meaning - the disk version disappeared). - """ - log.msg(self, "Swappable.get") - if self.filed: - self.load() - if self.filed: - # wasn't able to load it - raise IndexError, "Unable to swap in contents" - if self.filename is not None: - self.startTimer() - return self.data - def set(self, value): - if self.filed: - self.load() - self.data = value - if self.filename is not None: - self.startTimer() - def delete(self): - self.stopTimer() - del self.data - if self.filed: - filename = None - try: - filename = self.computeFilename() - self.filed = 0 - os.unlink(filename) - except: - log.msg("unable to delete Swappable at '%s'" % filename) - - def startTimer(self): - self.stopTimer() - self.timer = reactor.callLater(self.timeout, self.fireTimer) - def stopTimer(self): - if self.timer: - self.timer.cancel() - self.timer = None - def fireTimer(self): - self.timer = None - if not self.filed: - self.save() - - def save(self): - filename = None - try: - filename = self.computeFilename() - log.msg(self, "Swappable.save(%s)" % filename) - d = os.path.dirname(filename) - if d and not os.path.isdir(d): - os.makedirs(d) - f = open(filename, "w") - pickle.dump(self.data, f, 1) - f.close() - self.data = None - self.filed = 1 - except: - log.msg("unable to save Swappable to '%s'" % filename) - log.deferr() - def load(self): - filename = None - try: - filename = self.computeFilename() - log.msg(self, "Swappable.load(%s)" % filename) - f = open(filename, "r") - d = pickle.load(f) - f.close() - self.data = d - self.filed = 0 - os.unlink(filename) - except: - log.msg("unable to load Swappable from '%s'" % filename) - # ignore the error, may happen normally when files are pruned - - def __getstate__(self): - if not self.filed: - self.stopTimer() - self.save() - return self.__dict__ - def ignoreStaleRefs(failure): """d.addErrback(util.ignoreStaleRefs)""" r = failure.trap(pb.DeadReferenceError, pb.PBConnectionLost) From warner at users.sourceforge.net Sat Nov 5 22:58:11 2005 From: warner at users.sourceforge.net (Brian Warner) Date: Sat, 05 Nov 2005 22:58:11 +0000 Subject: [Buildbot-commits] buildbot/buildbot/scripts tryclient.py,1.10,1.11 Message-ID: Update of /cvsroot/buildbot/buildbot/buildbot/scripts In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5369/buildbot/scripts Modified Files: tryclient.py Log Message: Revision: arch at buildbot.sf.net--2004/buildbot--dev--0--patch-418 Creator: Brian Warner deal with integer 'baserev' in try (for SVN and Arch) * buildbot/scripts/tryclient.py (createJobfile): stringify the baserev before stuffing it in the jobfile. This resolves problems under SVN (and probably Arch) where revisions are expressed as numbers. I'm inclined to use string-based revisions everywhere in the future, but this fix should be safe for now. Thanks to Steven Walter for the patch. Index: tryclient.py =================================================================== RCS file: /cvsroot/buildbot/buildbot/buildbot/scripts/tryclient.py,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- tryclient.py 25 Oct 2005 02:12:10 -0000 1.10 +++ tryclient.py 5 Nov 2005 22:58:09 -0000 1.11 @@ -166,7 +166,7 @@ job += ns("1") job += ns(bsid) job += ns(branch) - job += ns(baserev) + job += ns(str(baserev)) job += ns("%d" % patchlevel) job += ns(diff) for bn in builderNames: From warner at users.sourceforge.net Sat Nov 5 22:58:11 2005 From: warner at users.sourceforge.net (Brian Warner) Date: Sat, 05 Nov 2005 22:58:11 +0000 Subject: [Buildbot-commits] buildbot ChangeLog,1.547,1.548 Message-ID: Update of /cvsroot/buildbot/buildbot In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5369 Modified Files: ChangeLog Log Message: Revision: arch at buildbot.sf.net--2004/buildbot--dev--0--patch-418 Creator: Brian Warner deal with integer 'baserev' in try (for SVN and Arch) * buildbot/scripts/tryclient.py (createJobfile): stringify the baserev before stuffing it in the jobfile. This resolves problems under SVN (and probably Arch) where revisions are expressed as numbers. I'm inclined to use string-based revisions everywhere in the future, but this fix should be safe for now. Thanks to Steven Walter for the patch. Index: ChangeLog =================================================================== RCS file: /cvsroot/buildbot/buildbot/ChangeLog,v retrieving revision 1.547 retrieving revision 1.548 diff -u -d -r1.547 -r1.548 --- ChangeLog 5 Nov 2005 22:52:59 -0000 1.547 +++ ChangeLog 5 Nov 2005 22:58:09 -0000 1.548 @@ -1,5 +1,12 @@ 2005-11-05 Brian Warner + * buildbot/scripts/tryclient.py (createJobfile): stringify the + baserev before stuffing it in the jobfile. This resolves problems + under SVN (and probably Arch) where revisions are expressed as + numbers. I'm inclined to use string-based revisions everywhere in + the future, but this fix should be safe for now. Thanks to Steven + Walter for the patch. + * buildbot/changes/changes.py (ChangeMaster.saveYourself): use binary mode when opening pickle files, to make windows work better. Thanks to Dobes Vandermeer for the catch. From warner at users.sourceforge.net Tue Nov 15 08:38:08 2005 From: warner at users.sourceforge.net (Brian Warner) Date: Tue, 15 Nov 2005 08:38:08 +0000 Subject: [Buildbot-commits] buildbot ChangeLog,1.548,1.549 Message-ID: Update of /cvsroot/buildbot/buildbot In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14002 Modified Files: ChangeLog Log Message: Revision: arch at buildbot.sf.net--2004/buildbot--dev--0--patch-420 Creator: Brian Warner update compare_attrs so config-file reload works better * buildbot/changes/pb.py (PBChangeSource.compare_attrs): add this. Without it, a config-file reload fails to update an existing PBChangeSource. * buildbot/changes/freshcvs.py (FreshCVSSourceNewcred): add username/passwd to compare_attrs, for the same reason * buildbot/status/html.py (Waterfall): add favicon to compare_attrs, same reason Index: ChangeLog =================================================================== RCS file: /cvsroot/buildbot/buildbot/ChangeLog,v retrieving revision 1.548 retrieving revision 1.549 diff -u -d -r1.548 -r1.549 --- ChangeLog 5 Nov 2005 22:58:09 -0000 1.548 +++ ChangeLog 15 Nov 2005 08:38:06 -0000 1.549 @@ -1,3 +1,13 @@ +2005-11-15 Brian Warner + + * buildbot/changes/pb.py (PBChangeSource.compare_attrs): add this. + Without it, a config-file reload fails to update an existing + PBChangeSource. + * buildbot/changes/freshcvs.py (FreshCVSSourceNewcred): add + username/passwd to compare_attrs, for the same reason + * buildbot/status/html.py (Waterfall): add favicon to + compare_attrs, same reason + 2005-11-05 Brian Warner * buildbot/scripts/tryclient.py (createJobfile): stringify the From warner at users.sourceforge.net Tue Nov 15 08:38:08 2005 From: warner at users.sourceforge.net (Brian Warner) Date: Tue, 15 Nov 2005 08:38:08 +0000 Subject: [Buildbot-commits] buildbot/buildbot/status html.py,1.76,1.77 Message-ID: Update of /cvsroot/buildbot/buildbot/buildbot/status In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14002/buildbot/status Modified Files: html.py Log Message: Revision: arch at buildbot.sf.net--2004/buildbot--dev--0--patch-420 Creator: Brian Warner update compare_attrs so config-file reload works better * buildbot/changes/pb.py (PBChangeSource.compare_attrs): add this. Without it, a config-file reload fails to update an existing PBChangeSource. * buildbot/changes/freshcvs.py (FreshCVSSourceNewcred): add username/passwd to compare_attrs, for the same reason * buildbot/status/html.py (Waterfall): add favicon to compare_attrs, same reason Index: html.py =================================================================== RCS file: /cvsroot/buildbot/buildbot/buildbot/status/html.py,v retrieving revision 1.76 retrieving revision 1.77 diff -u -d -r1.76 -r1.77 --- html.py 5 Nov 2005 21:06:15 -0000 1.76 +++ html.py 15 Nov 2005 08:38:06 -0000 1.77 @@ -1621,7 +1621,7 @@ """ compare_attrs = ["http_port", "distrib_port", "allowForce", - "categories", "css"] + "categories", "css", "favicon"] def __init__(self, http_port=None, distrib_port=None, allowForce=True, categories=None, css=buildbot_css, favicon=buildbot_icon): From warner at users.sourceforge.net Tue Nov 15 08:38:08 2005 From: warner at users.sourceforge.net (Brian Warner) Date: Tue, 15 Nov 2005 08:38:08 +0000 Subject: [Buildbot-commits] buildbot/buildbot/changes freshcvs.py,1.20,1.21 pb.py,1.9,1.10 Message-ID: Update of /cvsroot/buildbot/buildbot/buildbot/changes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14002/buildbot/changes Modified Files: freshcvs.py pb.py Log Message: Revision: arch at buildbot.sf.net--2004/buildbot--dev--0--patch-420 Creator: Brian Warner update compare_attrs so config-file reload works better * buildbot/changes/pb.py (PBChangeSource.compare_attrs): add this. Without it, a config-file reload fails to update an existing PBChangeSource. * buildbot/changes/freshcvs.py (FreshCVSSourceNewcred): add username/passwd to compare_attrs, for the same reason * buildbot/status/html.py (Waterfall): add favicon to compare_attrs, same reason Index: freshcvs.py =================================================================== RCS file: /cvsroot/buildbot/buildbot/buildbot/changes/freshcvs.py,v retrieving revision 1.20 retrieving revision 1.21 diff -u -d -r1.20 -r1.21 --- freshcvs.py 17 May 2005 10:14:09 -0000 1.20 +++ freshcvs.py 15 Nov 2005 08:38:05 -0000 1.21 @@ -65,7 +65,7 @@ implements(IChangeSource) else: __implements__ = IChangeSource, TCPClient.__implements__ - compare_attrs = ["where", "prefix"] + compare_attrs = ["where", "creds", "prefix"] changemaster = None # filled in when we're added connected = False @@ -80,8 +80,8 @@ l.source = self self.factory = f = FreshCVSConnectionFactory() f.source = self - creds = credentials.UsernamePassword(user, passwd) - f.startLogin(creds, client=l) + self.creds = credentials.UsernamePassword(user, passwd) + f.startLogin(self.creds, client=l) TCPClient.__init__(self, host, port, f) def __repr__(self): Index: pb.py =================================================================== RCS file: /cvsroot/buildbot/buildbot/buildbot/changes/pb.py,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- pb.py 25 Oct 2005 01:26:11 -0000 1.9 +++ pb.py 15 Nov 2005 08:38:05 -0000 1.10 @@ -48,6 +48,7 @@ self.changemaster.addChange(change) class PBChangeSource(base.ChangeSource): + compare_attrs = ["user", "passwd", "port", "prefix", "sep"] def __init__(self, user="change", passwd="changepw", port=None, prefix=None, sep="/"): From warner at users.sourceforge.net Tue Nov 15 08:41:23 2005 From: warner at users.sourceforge.net (Brian Warner) Date: Tue, 15 Nov 2005 08:41:23 +0000 Subject: [Buildbot-commits] buildbot ChangeLog,1.549,1.550 Message-ID: Update of /cvsroot/buildbot/buildbot In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14776 Modified Files: ChangeLog Log Message: Revision: arch at buildbot.sf.net--2004/buildbot--dev--0--patch-422 Creator: Brian Warner add the branch name to the MailNotifier body * buildbot/status/mail.py (MailNotifier.buildMessage): oops, add the branch name to the mail body Index: ChangeLog =================================================================== RCS file: /cvsroot/buildbot/buildbot/ChangeLog,v retrieving revision 1.549 retrieving revision 1.550 diff -u -d -r1.549 -r1.550 --- ChangeLog 15 Nov 2005 08:38:06 -0000 1.549 +++ ChangeLog 15 Nov 2005 08:41:20 -0000 1.550 @@ -1,5 +1,8 @@ 2005-11-15 Brian Warner + * buildbot/status/mail.py (MailNotifier.buildMessage): oops, add + the branch name to the mail body + * buildbot/changes/pb.py (PBChangeSource.compare_attrs): add this. Without it, a config-file reload fails to update an existing PBChangeSource. From warner at users.sourceforge.net Tue Nov 15 08:41:23 2005 From: warner at users.sourceforge.net (Brian Warner) Date: Tue, 15 Nov 2005 08:41:23 +0000 Subject: [Buildbot-commits] buildbot/buildbot/status mail.py,1.22,1.23 Message-ID: Update of /cvsroot/buildbot/buildbot/buildbot/status In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14776/buildbot/status Modified Files: mail.py Log Message: Revision: arch at buildbot.sf.net--2004/buildbot--dev--0--patch-422 Creator: Brian Warner add the branch name to the MailNotifier body * buildbot/status/mail.py (MailNotifier.buildMessage): oops, add the branch name to the mail body Index: mail.py =================================================================== RCS file: /cvsroot/buildbot/buildbot/buildbot/status/mail.py,v retrieving revision 1.22 retrieving revision 1.23 diff -u -d -r1.22 -r1.23 --- mail.py 26 Oct 2005 21:33:20 -0000 1.22 +++ mail.py 15 Nov 2005 08:41:21 -0000 1.23 @@ -251,7 +251,7 @@ branch, revision, patch = ss source = "" if branch: - source += "[branch %s] " + source += "[branch %s] " % branch if revision: source += revision else: From warner at users.sourceforge.net Tue Nov 15 08:57:01 2005 From: warner at users.sourceforge.net (Brian Warner) Date: Tue, 15 Nov 2005 08:57:01 +0000 Subject: [Buildbot-commits] buildbot/buildbot master.py,1.85,1.86 Message-ID: Update of /cvsroot/buildbot/buildbot/buildbot In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17588/buildbot Modified Files: master.py Log Message: Revision: arch at buildbot.sf.net--2004/buildbot--dev--0--patch-424 Creator: Brian Warner serialize config-file loading * buildbot/master.py (BuildMaster.loadConfig): serialize the config-file loading, specifically to make sure old StatusTargets are finished shutting down before new ones start up (thus resolving a bug in which changing the Waterfall object would fail because both new and old instances were claiming the same listening port). Also load new Schedulers after all the new Builders are set up, in case they fire off a new build right away. * buildbot/test/test_config.py (StartService): test it Index: master.py =================================================================== RCS file: /cvsroot/buildbot/buildbot/buildbot/master.py,v retrieving revision 1.85 retrieving revision 1.86 diff -u -d -r1.85 -r1.86 --- master.py 5 Nov 2005 22:52:59 -0000 1.85 +++ master.py 15 Nov 2005 08:56:58 -0000 1.86 @@ -802,9 +802,10 @@ # 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 + # really isn't atomic. - # asynchronous updates can add a Deferred to this list - dl = [] + d = defer.succeed(None) self.projectName = projectName self.projectURL = projectURL @@ -813,7 +814,7 @@ # self.bots: Disconnect any that were attached and removed from the # list. Update self.checker with the new list of passwords, # including debug/change/status. - dl.append(self.loadConfig_Slaves(bots)) + d.addCallback(lambda res: self.loadConfig_Slaves(bots)) # self.debugPassword if debugPassword: @@ -825,28 +826,27 @@ # changing if self.manhole: # disownServiceParent may return a Deferred - d = defer.maybeDeferred(self.manhole.disownServiceParent) - dl.append(d) + d.addCallback(lambda res: self.manhole.disownServiceParent()) self.manhole = None if manhole: self.manhole = manhole manhole.setServiceParent(self) - dl.append(self.loadConfig_Sources(sources)) - dl.append(self.loadConfig_Schedulers(schedulers)) - # add/remove self.botmaster.builders to match builders. The # botmaster will handle startup/shutdown issues. - dl.append(self.loadConfig_Builders(builders)) + d.addCallback(lambda res: self.loadConfig_Builders(builders)) - d = self.loadConfig_status(status) - dl.append(d) + d.addCallback(lambda res: self.loadConfig_status(status)) + + # Schedulers are added after Builders in case they start right away + d.addCallback(lambda res: self.loadConfig_Schedulers(schedulers)) + # and Sources go after Schedulers for the same reason + d.addCallback(lambda res: self.loadConfig_Sources(sources)) # self.slavePort if self.slavePortnum != slavePortnum: if self.slavePort: - d = defer.maybeDeferred(self.slavePort.disownServiceParent) - dl.append(d) + d.addCallback(lambda res: self.slavePort.disownServiceParent()) self.slavePort = None if slavePortnum is not None: self.slavePort = internet.TCPServer(slavePortnum, @@ -855,9 +855,11 @@ log.msg("BuildMaster listening on port %d" % slavePortnum) self.slavePortnum = slavePortnum - log.msg("configuration updated") - self.readConfig = True - return defer.DeferredList(dl, fireOnOneErrback=1, consumeErrors=1) + log.msg("configuration update started") + d.addCallback(lambda res: log.msg("configuration update complete")) + self.readConfig = True # TODO: consider not setting this until the + # Deferred fires. + return d def loadConfig_Slaves(self, bots): # set up the Checker with the names and passwords of all valid bots @@ -877,7 +879,7 @@ # all done self.bots = bots - return defer.DeferredList(dl, fireOnOneErrback=1, consumeErrors=1) + return defer.DeferredList(dl, fireOnOneErrback=1, consumeErrors=0) def loadConfig_Sources(self, sources): log.msg("loadConfig_Sources, change_svc is", self.change_svc, @@ -888,16 +890,19 @@ for source in oldsources if source not in sources] [self.change_svc.addSource(source) for source in sources if source not in self.change_svc] - return defer.DeferredList(dl, fireOnOneErrback=1, consumeErrors=1) + return defer.DeferredList(dl, fireOnOneErrback=1, consumeErrors=0) 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] - [s.setServiceParent(self) - for s in newschedulers if s not in self.schedulers] - self.schedulers = newschedulers - return defer.DeferredList(dl, fireOnOneErrback=1, consumeErrors=1) + def addNewOnes(res): + [s.setServiceParent(self) + for s in newschedulers if s not in self.schedulers] + self.schedulers = newschedulers + d = defer.DeferredList(dl, fireOnOneErrback=1) + d.addCallback(addNewOnes) + return d def loadConfig_Builders(self, newBuilders): dl = [] @@ -959,7 +964,7 @@ # now that everything is up-to-date, make sure the names are in the # desired order self.botmaster.builderNames = newNames - return defer.DeferredList(dl, fireOnOneErrback=1, consumeErrors=1) + return defer.DeferredList(dl, fireOnOneErrback=1, consumeErrors=0) def loadConfig_status(self, status): dl = [] @@ -971,14 +976,16 @@ d = defer.maybeDeferred(s.disownServiceParent) dl.append(d) self.statusTargets.remove(s) - # add new ones - for s in status: - if not s in self.statusTargets: - log.msg("adding IStatusReceiver", s) - s.setServiceParent(self) - self.statusTargets.append(s) - - return defer.DeferredList(dl, fireOnOneErrback=1, consumeErrors=1) + # after those are finished going away, add new ones + def addNewOnes(res): + for s in status: + if not s in self.statusTargets: + log.msg("adding IStatusReceiver", s) + s.setServiceParent(self) + self.statusTargets.append(s) + d = defer.DeferredList(dl, fireOnOneErrback=1) + d.addCallback(addNewOnes) + return d def addChange(self, change): From warner at users.sourceforge.net Tue Nov 15 08:57:01 2005 From: warner at users.sourceforge.net (Brian Warner) Date: Tue, 15 Nov 2005 08:57:01 +0000 Subject: [Buildbot-commits] buildbot/buildbot/test test_config.py,1.29,1.30 Message-ID: Update of /cvsroot/buildbot/buildbot/buildbot/test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17588/buildbot/test Modified Files: test_config.py Log Message: Revision: arch at buildbot.sf.net--2004/buildbot--dev--0--patch-424 Creator: Brian Warner serialize config-file loading * buildbot/master.py (BuildMaster.loadConfig): serialize the config-file loading, specifically to make sure old StatusTargets are finished shutting down before new ones start up (thus resolving a bug in which changing the Waterfall object would fail because both new and old instances were claiming the same listening port). Also load new Schedulers after all the new Builders are set up, in case they fire off a new build right away. * buildbot/test/test_config.py (StartService): test it Index: test_config.py =================================================================== RCS file: /cvsroot/buildbot/buildbot/buildbot/test/test_config.py,v retrieving revision 1.29 retrieving revision 1.30 diff -u -d -r1.29 -r1.30 --- test_config.py 15 Oct 2005 19:19:18 -0000 1.29 +++ test_config.py 15 Nov 2005 08:56:59 -0000 1.30 @@ -23,7 +23,7 @@ from buildbot.process.builder import Builder from buildbot.process.factory import BasicBuildFactory from buildbot.process import step -from buildbot.status import html, builder +from buildbot.status import html, builder, base try: from buildbot.status import words except ImportError: @@ -843,3 +843,88 @@ m = BuildMaster("test_cf", "alternate.cfg") m.loadTheConfigFile() self.failUnlessEqual(m.slavePortnum, 9000) + + +class MyTarget(base.StatusReceiverMultiService): + def __init__(self, name): + self.name = name + base.StatusReceiverMultiService.__init__(self) + def startService(self): + # make a note in a list stashed in the BuildMaster + self.parent.targetevents.append(("start", self.name)) + return base.StatusReceiverMultiService.startService(self) + def stopService(self): + self.parent.targetevents.append(("stop", self.name)) + return base.StatusReceiverMultiService.stopService(self) + +class MySlowTarget(MyTarget): + def stopService(self): + from twisted.internet import reactor + d = base.StatusReceiverMultiService.stopService(self) + def stall(res): + d2 = defer.Deferred() + reactor.callLater(0.1, d2.callback, res) + return d2 + d.addCallback(stall) + m = self.parent + def finishedStalling(res): + m.targetevents.append(("stop", self.name)) + return res + d.addCallback(finishedStalling) + return d + +targetCfg1 = emptyCfg + \ +""" +from buildbot.test.test_config import MyTarget +c['status'] = [MyTarget('a')] +""" + +targetCfg2 = emptyCfg + \ +""" +from buildbot.test.test_config import MySlowTarget +c['status'] = [MySlowTarget('b')] +""" + +class StartService(unittest.TestCase): + def tearDown(self): + return self.master.stopService() + + def testStartService(self): + os.mkdir("test_ss") + self.master = m = BuildMaster("test_ss") + m.loadConfig(emptyCfg) + m.startService() + m.targetevents = [] + d = m.loadConfig(targetCfg1) + d.addCallback(self._testStartService_1) + return d + def _testStartService_1(self, res): + self.failUnlessEqual(len(self.master.statusTargets), 1) + self.failUnless(isinstance(self.master.statusTargets[0], MyTarget)) + self.failUnlessEqual(self.master.targetevents, + [('start', 'a')]) + self.master.targetevents = [] + # reloading the same config should not start or stop the target + d = self.master.loadConfig(targetCfg1) + d.addCallback(self._testStartService_2) + return d + def _testStartService_2(self, res): + self.failUnlessEqual(self.master.targetevents, []) + # but loading a new config file should stop the old one, then + # start the new one + d = self.master.loadConfig(targetCfg2) + d.addCallback(self._testStartService_3) + return d + def _testStartService_3(self, res): + self.failUnlessEqual(self.master.targetevents, + [('stop', 'a'), ('start', 'b')]) + self.master.targetevents = [] + # and going back to the old one should do the same, in the same + # order, even though the current MySlowTarget takes a moment to shut + # down + d = self.master.loadConfig(targetCfg1) + d.addCallback(self._testStartService_4) + return d + def _testStartService_4(self, res): + self.failUnlessEqual(self.master.targetevents, + [('stop', 'b'), ('start', 'a')]) From warner at users.sourceforge.net Tue Nov 15 08:57:01 2005 From: warner at users.sourceforge.net (Brian Warner) Date: Tue, 15 Nov 2005 08:57:01 +0000 Subject: [Buildbot-commits] buildbot ChangeLog,1.550,1.551 Message-ID: Update of /cvsroot/buildbot/buildbot In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17588 Modified Files: ChangeLog Log Message: Revision: arch at buildbot.sf.net--2004/buildbot--dev--0--patch-424 Creator: Brian Warner serialize config-file loading * buildbot/master.py (BuildMaster.loadConfig): serialize the config-file loading, specifically to make sure old StatusTargets are finished shutting down before new ones start up (thus resolving a bug in which changing the Waterfall object would fail because both new and old instances were claiming the same listening port). Also load new Schedulers after all the new Builders are set up, in case they fire off a new build right away. * buildbot/test/test_config.py (StartService): test it Index: ChangeLog =================================================================== RCS file: /cvsroot/buildbot/buildbot/ChangeLog,v retrieving revision 1.550 retrieving revision 1.551 diff -u -d -r1.550 -r1.551 --- ChangeLog 15 Nov 2005 08:41:20 -0000 1.550 +++ ChangeLog 15 Nov 2005 08:56:59 -0000 1.551 @@ -1,5 +1,14 @@ 2005-11-15 Brian Warner + * buildbot/master.py (BuildMaster.loadConfig): serialize the + config-file loading, specifically to make sure old StatusTargets + are finished shutting down before new ones start up (thus + resolving a bug in which changing the Waterfall object would fail + because both new and old instances were claiming the same + listening port). Also load new Schedulers after all the new + Builders are set up, in case they fire off a new build right away. + * buildbot/test/test_config.py (StartService): test it + * buildbot/status/mail.py (MailNotifier.buildMessage): oops, add the branch name to the mail body From warner at users.sourceforge.net Wed Nov 23 08:01:25 2005 From: warner at users.sourceforge.net (Brian Warner) Date: Wed, 23 Nov 2005 08:01:25 +0000 Subject: [Buildbot-commits] buildbot/buildbot/process step.py,1.77,1.78 Message-ID: Update of /cvsroot/buildbot/buildbot/buildbot/process In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13954/buildbot/process Modified Files: step.py Log Message: Revision: arch at buildbot.sf.net--2004/buildbot--dev--0--patch-426 Creator: Brian Warner add some HTML links, add NEWS items, assume revisions are strings * NEWS: start collecting items for next release * buildbot/process/step.py (SVN.computeSourceRevision): assume revisions are strings (P4Sync.computeSourceRevision): same * buildbot/status/html.py (StatusResourceBuild.body): add a link to the Buildbot's overall status page (StatusResourceBuilder.body): same Index: step.py =================================================================== RCS file: /cvsroot/buildbot/buildbot/buildbot/process/step.py,v retrieving revision 1.77 retrieving revision 1.78 diff -u -d -r1.77 -r1.78 --- step.py 5 Nov 2005 22:27:49 -0000 1.77 +++ step.py 23 Nov 2005 08:01:21 -0000 1.78 @@ -1286,7 +1286,7 @@ def computeSourceRevision(self, changes): if not changes: return None - lastChange = max([c.revision for c in changes]) + lastChange = max([int(c.revision) for c in changes]) return lastChange def startVC(self, branch, revision, patch): @@ -1682,7 +1682,7 @@ def computeSourceRevision(self, changes): if not changes: return None - lastChange = max([c.revision for c in changes]) + lastChange = max([int(c.revision) for c in changes]) return lastChange def startVC(self, branch, revision, patch): From warner at users.sourceforge.net Wed Nov 23 08:01:25 2005 From: warner at users.sourceforge.net (Brian Warner) Date: Wed, 23 Nov 2005 08:01:25 +0000 Subject: [Buildbot-commits] buildbot ChangeLog,1.551,1.552 NEWS,1.47,1.48 Message-ID: Update of /cvsroot/buildbot/buildbot In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13954 Modified Files: ChangeLog NEWS Log Message: Revision: arch at buildbot.sf.net--2004/buildbot--dev--0--patch-426 Creator: Brian Warner add some HTML links, add NEWS items, assume revisions are strings * NEWS: start collecting items for next release * buildbot/process/step.py (SVN.computeSourceRevision): assume revisions are strings (P4Sync.computeSourceRevision): same * buildbot/status/html.py (StatusResourceBuild.body): add a link to the Buildbot's overall status page (StatusResourceBuilder.body): same Index: ChangeLog =================================================================== RCS file: /cvsroot/buildbot/buildbot/ChangeLog,v retrieving revision 1.551 retrieving revision 1.552 diff -u -d -r1.551 -r1.552 --- ChangeLog 15 Nov 2005 08:56:59 -0000 1.551 +++ ChangeLog 23 Nov 2005 08:01:23 -0000 1.552 @@ -1,3 +1,15 @@ +2005-11-22 Brian Warner + + * NEWS: start collecting items for next release + + * buildbot/process/step.py (SVN.computeSourceRevision): assume + revisions are strings + (P4Sync.computeSourceRevision): same + + * buildbot/status/html.py (StatusResourceBuild.body): add a link + to the Buildbot's overall status page + (StatusResourceBuilder.body): same + 2005-11-15 Brian Warner * buildbot/master.py (BuildMaster.loadConfig): serialize the Index: NEWS =================================================================== RCS file: /cvsroot/buildbot/buildbot/NEWS,v retrieving revision 1.47 retrieving revision 1.48 diff -u -d -r1.47 -r1.48 --- NEWS 25 Oct 2005 02:49:53 -0000 1.47 +++ NEWS 23 Nov 2005 08:01:23 -0000 1.48 @@ -1,5 +1,54 @@ User visible changes in Buildbot. +* Release ?.?.? (??) + +** Changes + +*** step.Trial can work with Trial from Twisted >2.1.0 + +The 'Trial' step now accepts the trialMode= argument, which should be a list +of strings to be added to trial's argv array. This defaults to ["-to"], which +is appropriate for the Trial that ships in Twisted-2.1.0 and earlier, and +tells Trial to emit non-colorized verbose output. To use this step with +trials from later versions of Twisted, this should be changed to +["--reporter=bwverbose"]. + +In addition, you can now set other Trial command-line parameters through the +trialArgs= argument. This is a list of strings, and defaults to an empty list. + +*** Added a 'resubmit this build' button to the web page + +*** Make the VC-checkout step's description more useful + +Added the word "[branch]" to the VC step's description (used in the Step's +box on the Waterfall page, among others) when we're checking out a +non-default branch. Also add "rNNN" to indicate which revision is being +checked out. Thanks to Brad Hards and Nathaniel Smith for the suggestion. + +** Bugs + +Several patches from Dobes Vandermeer: Escape the URLs in email, in case they +have spaces and such. Fill otherwise-empty elements, as a workaround for +buggy browsers that might optimize them away. Also use binary mode when +opening status pickle files, to make windows work better. + +Stringify the base revision before stuffing it into a 'try' jobfile, helping +SVN and Arch implement 'try' builds better. Thanks to Steven Walter for the +patch. + +Fix the compare_attrs list in PBChangeSource, FreshCVSSource, and Waterfall. +Before this, certain changes to these objects in the master.cfg file were +ignored, such that you would have to stop and re-start the buildmaster to +make them take effect. + +The config file is now loaded serially, shutting down old (or replaced) +Status/ChangeSource plugins before starting new ones. This fixes a bug in +which changing an aspect of, say, the Waterfall display would cause an +exception as both old and new instances fight over the same TCP port. This +should also fix a bug whereby new Periodic Schedulers could fire a build +before the Builders have finished being added. + + * Release 0.7.0 (24 Oct 2005) ** new features From warner at users.sourceforge.net Wed Nov 23 08:01:25 2005 From: warner at users.sourceforge.net (Brian Warner) Date: Wed, 23 Nov 2005 08:01:25 +0000 Subject: [Buildbot-commits] buildbot/buildbot/status html.py,1.77,1.78 Message-ID: Update of /cvsroot/buildbot/buildbot/buildbot/status In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13954/buildbot/status Modified Files: html.py Log Message: Revision: arch at buildbot.sf.net--2004/buildbot--dev--0--patch-426 Creator: Brian Warner add some HTML links, add NEWS items, assume revisions are strings * NEWS: start collecting items for next release * buildbot/process/step.py (SVN.computeSourceRevision): assume revisions are strings (P4Sync.computeSourceRevision): same * buildbot/status/html.py (StatusResourceBuild.body): add a link to the Buildbot's overall status page (StatusResourceBuilder.body): same Index: html.py =================================================================== RCS file: /cvsroot/buildbot/buildbot/buildbot/status/html.py,v retrieving revision 1.77 retrieving revision 1.78 diff -u -d -r1.77 -r1.78 --- html.py 15 Nov 2005 08:38:06 -0000 1.77 +++ html.py 23 Nov 2005 08:01:23 -0000 1.78 @@ -314,12 +314,15 @@ def body(self, request): b = self.build + buildbotURL = self.status.getBuildbotURL() + projectName = self.status.getProjectName() + data = "%s\n" % (buildbotURL, projectName) # the color in the following line gives python-mode trouble - data = ("

        Build %s:#%d

        \n" - "

        Reason:

        \n%s\n" - % (self.status.getURLForThing(b.getBuilder()), - urllib.quote(b.getBuilder().getName()), b.getNumber(), - html.escape(b.getReason()))) + data += ("

        Build %s:#%d

        \n" + "

        Reason:

        \n%s\n" + % (self.status.getURLForThing(b.getBuilder()), + urllib.quote(b.getBuilder().getName()), b.getNumber(), + html.escape(b.getReason()))) branch, revision, patch = b.getSourceStamp() data += "

        SourceStamp:

        \n" @@ -488,7 +491,10 @@ slaves = b.getSlaves() connected_slaves = [s for s in slaves if s.isConnected()] - data = make_row("Builder:", html.escape(b.getName())) + buildbotURL = self.status.getBuildbotURL() + projectName = self.status.getProjectName() + data = "%s\n" % (buildbotURL, projectName) + data += make_row("Builder:", html.escape(b.getName())) b1 = b.getBuild(-1) if b1 is not None: data += make_row("Current/last build:", str(b1.getNumber())) From warner at users.sourceforge.net Thu Nov 24 21:57:32 2005 From: warner at users.sourceforge.net (Brian Warner) Date: Thu, 24 Nov 2005 21:57:32 +0000 Subject: [Buildbot-commits] buildbot/contrib svn_buildbot.py,1.9,1.10 Message-ID: Update of /cvsroot/buildbot/buildbot/contrib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv817/contrib Modified Files: svn_buildbot.py Log Message: Revision: arch at buildbot.sf.net--2004/buildbot--dev--0--patch-428 Creator: Brian Warner update svn_buildbot.py and sample.cfg in their use of PBChangeSource * contrib/svn_buildbot.py: update example usage to match the port number that gets used by the PBChangeSource * buildbot/scripts/sample.cfg: add example of PBChangeSource Index: svn_buildbot.py =================================================================== RCS file: /cvsroot/buildbot/buildbot/contrib/svn_buildbot.py,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- svn_buildbot.py 23 Sep 2004 19:21:08 -0000 1.9 +++ svn_buildbot.py 24 Nov 2005 21:57:29 -0000 1.10 @@ -9,6 +9,9 @@ # python2.1 is right out +# If you run this program as part of your SVN post-commit hooks, it will +# deliver Change notices to a buildmaster that is running a PBChangeSource +# instance. # edit your svn-repository/hooks/post-commit file, and add lines that look # like this: @@ -18,7 +21,7 @@ # installed site-wide . ~/.environment -/path/to/svn_buildbot.py --repository "$REPOS" --revision "$REV" --bbserver localhost --bbport 9987 +/path/to/svn_buildbot.py --repository "$REPOS" --revision "$REV" --bbserver localhost --bbport 9989 ''' import commands, sys, os From warner at users.sourceforge.net Thu Nov 24 21:57:32 2005 From: warner at users.sourceforge.net (Brian Warner) Date: Thu, 24 Nov 2005 21:57:32 +0000 Subject: [Buildbot-commits] buildbot ChangeLog,1.552,1.553 Message-ID: Update of /cvsroot/buildbot/buildbot In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv817 Modified Files: ChangeLog Log Message: Revision: arch at buildbot.sf.net--2004/buildbot--dev--0--patch-428 Creator: Brian Warner update svn_buildbot.py and sample.cfg in their use of PBChangeSource * contrib/svn_buildbot.py: update example usage to match the port number that gets used by the PBChangeSource * buildbot/scripts/sample.cfg: add example of PBChangeSource Index: ChangeLog =================================================================== RCS file: /cvsroot/buildbot/buildbot/ChangeLog,v retrieving revision 1.552 retrieving revision 1.553 diff -u -d -r1.552 -r1.553 --- ChangeLog 23 Nov 2005 08:01:23 -0000 1.552 +++ ChangeLog 24 Nov 2005 21:57:30 -0000 1.553 @@ -1,3 +1,9 @@ +2005-11-24 Brian Warner + + * contrib/svn_buildbot.py: update example usage to match the port + number that gets used by the PBChangeSource + * buildbot/scripts/sample.cfg: add example of PBChangeSource + 2005-11-22 Brian Warner * NEWS: start collecting items for next release From warner at users.sourceforge.net Thu Nov 24 21:57:32 2005 From: warner at users.sourceforge.net (Brian Warner) Date: Thu, 24 Nov 2005 21:57:32 +0000 Subject: [Buildbot-commits] buildbot/buildbot/scripts sample.cfg,1.6,1.7 Message-ID: Update of /cvsroot/buildbot/buildbot/buildbot/scripts In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv817/buildbot/scripts Modified Files: sample.cfg Log Message: Revision: arch at buildbot.sf.net--2004/buildbot--dev--0--patch-428 Creator: Brian Warner update svn_buildbot.py and sample.cfg in their use of PBChangeSource * contrib/svn_buildbot.py: update example usage to match the port number that gets used by the PBChangeSource * buildbot/scripts/sample.cfg: add example of PBChangeSource Index: sample.cfg =================================================================== RCS file: /cvsroot/buildbot/buildbot/buildbot/scripts/sample.cfg,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- sample.cfg 20 Oct 2005 22:32:48 -0000 1.6 +++ sample.cfg 24 Nov 2005 21:57:30 -0000 1.7 @@ -43,6 +43,14 @@ #fc_source = FreshCVSSource("cvs.example.com", 4519, "foo", "bar") #c['sources'].append(fc_source) +# or, use a PBChangeSource, and then have your repository's commit script run +# 'buildbot sendchange', or contrib/svn_buildbot.py, or +# contrib/arch_buildbot.py : +# +#from buildbot.changes.pb import PBChangeSource +#c['sources'].append(PBChangeSource()) + + ## configure the Schedulers c['schedulers'] = [] From warner at users.sourceforge.net Thu Nov 24 23:59:28 2005 From: warner at users.sourceforge.net (Brian Warner) Date: Thu, 24 Nov 2005 23:59:28 +0000 Subject: [Buildbot-commits] buildbot ChangeLog,1.553,1.554 Message-ID: Update of /cvsroot/buildbot/buildbot In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26376 Modified Files: ChangeLog Log Message: Revision: arch at buildbot.sf.net--2004/buildbot--dev--0--patch-430 Creator: Brian Warner minor changes to AnyBranchScheduler * buildbot/scheduler.py (AnyBranchScheduler): fix branches=[] to mean "don't build anything", and add a warning if it gets used because it isn't actually useful. Index: ChangeLog =================================================================== RCS file: /cvsroot/buildbot/buildbot/ChangeLog,v retrieving revision 1.553 retrieving revision 1.554 diff -u -d -r1.553 -r1.554 --- ChangeLog 24 Nov 2005 21:57:30 -0000 1.553 +++ ChangeLog 24 Nov 2005 23:59:25 -0000 1.554 @@ -1,5 +1,9 @@ 2005-11-24 Brian Warner + * buildbot/scheduler.py (AnyBranchScheduler): fix branches=[] to + mean "don't build anything", and add a warning if it gets used + because it isn't actually useful. + * contrib/svn_buildbot.py: update example usage to match the port number that gets used by the PBChangeSource * buildbot/scripts/sample.cfg: add example of PBChangeSource From warner at users.sourceforge.net Thu Nov 24 23:59:27 2005 From: warner at users.sourceforge.net (Brian Warner) Date: Thu, 24 Nov 2005 23:59:27 +0000 Subject: [Buildbot-commits] buildbot/buildbot scheduler.py,1.7,1.8 Message-ID: Update of /cvsroot/buildbot/buildbot/buildbot In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26376/buildbot Modified Files: scheduler.py Log Message: Revision: arch at buildbot.sf.net--2004/buildbot--dev--0--patch-430 Creator: Brian Warner minor changes to AnyBranchScheduler * buildbot/scheduler.py (AnyBranchScheduler): fix branches=[] to mean "don't build anything", and add a warning if it gets used because it isn't actually useful. Index: scheduler.py =================================================================== RCS file: /cvsroot/buildbot/buildbot/buildbot/scheduler.py,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- scheduler.py 31 Aug 2005 01:51:41 -0000 1.7 +++ scheduler.py 24 Nov 2005 23:59:25 -0000 1.8 @@ -196,9 +196,12 @@ """ @param name: the name of this Scheduler @param branches: The branch names that the Scheduler should pay - attention to. Any Change that is not on one of these - branches will be ignored. It can be set to None to - accept changes from any branch. + attention to. Any Change that is not on one of these + branches will be ignored. It can be set to None to + accept changes from any branch. Don't use [] (an + empty list), because that means we don't pay + attention to *any* branches, so we'll never build + anything. @param treeStableTimer: the duration, in seconds, for which the tree must remain unchanged before a build will be triggered. This is intended to avoid builds @@ -222,11 +225,22 @@ assert type(b) is str self.builderNames = builderNames self.branches = branches + if self.branches == []: + log.msg("AnyBranchScheduler %s: branches=[], so we will ignore " + "all branches, and never trigger any builds. Please set " + "branches=None to mean 'all branches'" % self) + # consider raising an exception here, to make this warning more + # prominent, but I can vaguely imagine situations where you might + # want to comment out branches temporarily and wouldn't + # appreciate it being treated as an error. if fileIsImportant: assert callable(fileIsImportant) self.fileIsImportant = fileIsImportant self.schedulers = {} # one per branch + def __repr__(self): + return "" % self.name + def listBuilderNames(self): return self.builderNames @@ -239,7 +253,7 @@ def addChange(self, change): branch = change.branch - if self.branches and branch not in self.branches: + if self.branches is not None and branch not in self.branches: log.msg("%s ignoring off-branch %s" % (self, change)) return s = self.schedulers.get(branch) From warner at users.sourceforge.net Fri Nov 25 00:36:43 2005 From: warner at users.sourceforge.net (Brian Warner) Date: Fri, 25 Nov 2005 00:36:43 +0000 Subject: [Buildbot-commits] buildbot/buildbot/changes freshcvs.py,1.21,1.22 Message-ID: Update of /cvsroot/buildbot/buildbot/buildbot/changes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5516/buildbot/changes Modified Files: freshcvs.py Log Message: Revision: arch at buildbot.sf.net--2004/buildbot--dev--0--patch-432 Creator: Brian Warner fix loadConfig_Sources to remove all old ones before adding new ones * Makefile (TRIALARGS): update to handle Twisted > 2.1.0 * buildbot/master.py (BuildMaster.loadConfig_Sources): remove all deleted ChangeSources before adding any new ones * buildbot/changes/freshcvs.py (FreshCVSSourceNewcred): fix compare_attrs, to make sure that a config-file reload does not unnecessarily replace an unmodified ChangeSource instance * buildbot/test/test_config.py (ConfigTest.testSources): update Index: freshcvs.py =================================================================== RCS file: /cvsroot/buildbot/buildbot/buildbot/changes/freshcvs.py,v retrieving revision 1.21 retrieving revision 1.22 diff -u -d -r1.21 -r1.22 --- freshcvs.py 15 Nov 2005 08:38:05 -0000 1.21 +++ freshcvs.py 25 Nov 2005 00:36:41 -0000 1.22 @@ -65,13 +65,16 @@ implements(IChangeSource) else: __implements__ = IChangeSource, TCPClient.__implements__ - compare_attrs = ["where", "creds", "prefix"] + compare_attrs = ["host", "port", "username", "password", "prefix"] changemaster = None # filled in when we're added connected = False def __init__(self, host, port, user, passwd, prefix=None): - self.where = (host, port) + self.host = host + self.port = port + self.username = user + self.password = passwd if prefix is not None and not prefix.endswith("/"): log.msg("WARNING: prefix '%s' should probably end with a slash" \ % prefix) @@ -85,15 +88,14 @@ TCPClient.__init__(self, host, port, f) def __repr__(self): - return "" % (self.where, - self.prefix) + return "" % \ + ((self.host, self.port), self.prefix) def describe(self): - host, port = self.where online = "" if not self.connected: online = " [OFFLINE]" - return "freshcvs %s:%s%s" % (host, port, online) + return "freshcvs %s:%s%s" % (self.host, self.port, online) def notify(self, root, files, message, user): pathnames = [] @@ -126,7 +128,8 @@ def __init__(self, host, port, user, passwd, serviceName="cvstoys.notify", prefix=None): - self.where = (host, port) + self.host = host + self.port = port self.prefix = prefix self.listener = l = FreshCVSListener() l.source = self @@ -136,23 +139,10 @@ TCPClient.__init__(self, host, port, f) def __repr__(self): - return "" % (self.where, - self.prefix) + return "" % \ + ((self.host, self.port), self.prefix) # this is suitable for CVSToys-1.0.10 and later. If you run CVSToys-1.0.9 or # earlier, use FreshCVSSourceOldcred instead. FreshCVSSource = FreshCVSSourceNewcred -def test(source): - # s = FreshCVSSource(blah) - # test(s) - from twisted.application import service - from twisted.internet import reactor - class Parent(service.MultiService): - def addChange(self, change): - print change.asText() - p = Parent() - source.setServiceParent(p) - p.startService() - reactor.run() - From warner at users.sourceforge.net Fri Nov 25 00:36:43 2005 From: warner at users.sourceforge.net (Brian Warner) Date: Fri, 25 Nov 2005 00:36:43 +0000 Subject: [Buildbot-commits] buildbot ChangeLog,1.554,1.555 Makefile,1.16,1.17 Message-ID: Update of /cvsroot/buildbot/buildbot In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5516 Modified Files: ChangeLog Makefile Log Message: Revision: arch at buildbot.sf.net--2004/buildbot--dev--0--patch-432 Creator: Brian Warner fix loadConfig_Sources to remove all old ones before adding new ones * Makefile (TRIALARGS): update to handle Twisted > 2.1.0 * buildbot/master.py (BuildMaster.loadConfig_Sources): remove all deleted ChangeSources before adding any new ones * buildbot/changes/freshcvs.py (FreshCVSSourceNewcred): fix compare_attrs, to make sure that a config-file reload does not unnecessarily replace an unmodified ChangeSource instance * buildbot/test/test_config.py (ConfigTest.testSources): update Index: ChangeLog =================================================================== RCS file: /cvsroot/buildbot/buildbot/ChangeLog,v retrieving revision 1.554 retrieving revision 1.555 diff -u -d -r1.554 -r1.555 --- ChangeLog 24 Nov 2005 23:59:25 -0000 1.554 +++ ChangeLog 25 Nov 2005 00:36:41 -0000 1.555 @@ -1,5 +1,14 @@ 2005-11-24 Brian Warner + * Makefile (TRIALARGS): update to handle Twisted > 2.1.0 + + * buildbot/master.py (BuildMaster.loadConfig_Sources): remove all + deleted ChangeSources before adding any new ones + * buildbot/changes/freshcvs.py (FreshCVSSourceNewcred): fix + compare_attrs, to make sure that a config-file reload does not + unnecessarily replace an unmodified ChangeSource instance + * buildbot/test/test_config.py (ConfigTest.testSources): update + * buildbot/scheduler.py (AnyBranchScheduler): fix branches=[] to mean "don't build anything", and add a warning if it gets used because it isn't actually useful. Index: Makefile =================================================================== RCS file: /cvsroot/buildbot/buildbot/Makefile,v retrieving revision 1.16 retrieving revision 1.17 diff -u -d -r1.16 -r1.17 --- Makefile 25 Oct 2005 03:15:34 -0000 1.16 +++ Makefile 25 Nov 2005 00:36:41 -0000 1.17 @@ -3,8 +3,10 @@ # process a little bit. This Makefile is not included in the source tarball. BBBASE = $(PWD) +TRIALARGS=-v ifdef SVN T=~/stuff/python/twisted/Twisted +TRIALARGS=--reporter=verbose else T= endif @@ -15,7 +17,6 @@ .PHONY: test TRIAL=trial -TRIALARGS=-v TEST=buildbot.test test: $(PP) $(TRIAL) $(TRIALARGS) $(TEST) From warner at users.sourceforge.net Fri Nov 25 00:36:43 2005 From: warner at users.sourceforge.net (Brian Warner) Date: Fri, 25 Nov 2005 00:36:43 +0000 Subject: [Buildbot-commits] buildbot/buildbot master.py,1.86,1.87 Message-ID: Update of /cvsroot/buildbot/buildbot/buildbot In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5516/buildbot Modified Files: master.py Log Message: Revision: arch at buildbot.sf.net--2004/buildbot--dev--0--patch-432 Creator: Brian Warner fix loadConfig_Sources to remove all old ones before adding new ones * Makefile (TRIALARGS): update to handle Twisted > 2.1.0 * buildbot/master.py (BuildMaster.loadConfig_Sources): remove all deleted ChangeSources before adding any new ones * buildbot/changes/freshcvs.py (FreshCVSSourceNewcred): fix compare_attrs, to make sure that a config-file reload does not unnecessarily replace an unmodified ChangeSource instance * buildbot/test/test_config.py (ConfigTest.testSources): update Index: master.py =================================================================== RCS file: /cvsroot/buildbot/buildbot/buildbot/master.py,v retrieving revision 1.86 retrieving revision 1.87 diff -u -d -r1.86 -r1.87 --- master.py 15 Nov 2005 08:56:58 -0000 1.86 +++ master.py 25 Nov 2005 00:36:41 -0000 1.87 @@ -885,12 +885,14 @@ log.msg("loadConfig_Sources, change_svc is", self.change_svc, self.change_svc.parent) # shut down any that were removed, start any that were added - oldsources = list(self.change_svc) - dl = [self.change_svc.removeSource(source) - for source in oldsources if source not in sources] - [self.change_svc.addSource(source) - for source in sources if source not in self.change_svc] - return defer.DeferredList(dl, fireOnOneErrback=1, consumeErrors=0) + deleted_sources = [s for s in self.change_svc if s not in sources] + added_sources = [s for s in sources if s not in self.change_svc] + dl = [self.change_svc.removeSource(s) for s in deleted_sources] + def addNewOnes(res): + [self.change_svc.addSource(s) for s in added_sources] + d = defer.DeferredList(dl, fireOnOneErrback=1, consumeErrors=0) + d.addCallback(addNewOnes) + return d def loadConfig_Schedulers(self, newschedulers): old = [s for s in self.schedulers if s not in newschedulers] From warner at users.sourceforge.net Fri Nov 25 00:36:43 2005 From: warner at users.sourceforge.net (Brian Warner) Date: Fri, 25 Nov 2005 00:36:43 +0000 Subject: [Buildbot-commits] buildbot/buildbot/test test_config.py,1.30,1.31 Message-ID: Update of /cvsroot/buildbot/buildbot/buildbot/test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5516/buildbot/test Modified Files: test_config.py Log Message: Revision: arch at buildbot.sf.net--2004/buildbot--dev--0--patch-432 Creator: Brian Warner fix loadConfig_Sources to remove all old ones before adding new ones * Makefile (TRIALARGS): update to handle Twisted > 2.1.0 * buildbot/master.py (BuildMaster.loadConfig_Sources): remove all deleted ChangeSources before adding any new ones * buildbot/changes/freshcvs.py (FreshCVSSourceNewcred): fix compare_attrs, to make sure that a config-file reload does not unnecessarily replace an unmodified ChangeSource instance * buildbot/test/test_config.py (ConfigTest.testSources): update Index: test_config.py =================================================================== RCS file: /cvsroot/buildbot/buildbot/buildbot/test/test_config.py,v retrieving revision 1.30 retrieving revision 1.31 diff -u -d -r1.30 -r1.31 --- test_config.py 15 Nov 2005 08:56:59 -0000 1.30 +++ test_config.py 25 Nov 2005 00:36:41 -0000 1.31 @@ -476,7 +476,8 @@ self.failUnlessEqual(len(list(self.buildmaster.change_svc)), 1) s1 = list(self.buildmaster.change_svc)[0] self.failUnless(isinstance(s1, FreshCVSSource)) - self.failUnlessEqual(s1.where, ("cvs.example.com", 1000)) + self.failUnlessEqual(s1.host, "cvs.example.com") + self.failUnlessEqual(s1.port, 1000) self.failUnlessEqual(s1.prefix, "Prefix/") self.failUnlessEqual(s1, list(self.buildmaster.change_svc)[0]) self.failUnless(s1.parent) From warner at users.sourceforge.net Fri Nov 25 00:46:25 2005 From: warner at users.sourceforge.net (Brian Warner) Date: Fri, 25 Nov 2005 00:46:25 +0000 Subject: [Buildbot-commits] site index.html,1.49,1.50 Message-ID: Update of /cvsroot/buildbot/site In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6854 Modified Files: index.html Log Message: add the nuxeo.com buildbot Index: index.html =================================================================== RCS file: /cvsroot/buildbot/site/index.html,v retrieving revision 1.49 retrieving revision 1.50 diff -u -d -r1.49 -r1.50 --- index.html 25 Oct 2005 03:53:20 -0000 1.49 +++ index.html 25 Nov 2005 00:46:22 -0000 1.50 @@ -151,6 +151,11 @@ href="http://buildbot.videolan.org">Buildbot to do their continuous-integration and nightly builds. +
      1. Stefane Fermigier reports that Nuxeo + SAS is running this buildbot + to test their ECM project named CPS.
      2. +
      3. install a Buildbot today and get your name added here!
      4. @@ -173,5 +178,5 @@ align="right" /> -Last modified: Mon Oct 24 20:51:19 PDT 2005 +Last modified: Thu Nov 24 16:45:46 PST 2005 From warner at users.sourceforge.net Fri Nov 25 01:25:13 2005 From: warner at users.sourceforge.net (Brian Warner) Date: Fri, 25 Nov 2005 01:25:13 +0000 Subject: [Buildbot-commits] buildbot ChangeLog,1.555,1.556 Message-ID: Update of /cvsroot/buildbot/buildbot In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14285 Modified Files: ChangeLog Log Message: Revision: arch at buildbot.sf.net--2004/buildbot--dev--0--patch-434 Creator: Brian Warner fix test_config.StartService, by not using a fixed slavePort * buildbot/test/test_config.py (StartService): don't claim a fixed port number, instead set slavePort=0 on the first pass, figure out what port was allocated, then switch to a config file that uses the allocated port. * buildbot/master.py (BuildMaster.loadConfig): close the old slaveport before opening the new one, because unit tests might replace slavePort=0 with the same allocated portnumber, and if we don't wait for the old port to close first, we get a "port already in use" error. There is a tiny race condition here, but the only threat is from other programs that bind (statically) to the same port number we happened to be allocated, and only if those programs use SO_REUSEADDR, and only if they get control in between reactor turns. Index: ChangeLog =================================================================== RCS file: /cvsroot/buildbot/buildbot/ChangeLog,v retrieving revision 1.555 retrieving revision 1.556 diff -u -d -r1.555 -r1.556 --- ChangeLog 25 Nov 2005 00:36:41 -0000 1.555 +++ ChangeLog 25 Nov 2005 01:25:11 -0000 1.556 @@ -1,5 +1,20 @@ 2005-11-24 Brian Warner + * buildbot/test/test_config.py (StartService): don't claim a fixed + port number, instead set slavePort=0 on the first pass, figure out + what port was allocated, then switch to a config file that uses + the allocated port. + + * buildbot/master.py (BuildMaster.loadConfig): close the old + slaveport before opening the new one, because unit tests might + replace slavePort=0 with the same allocated portnumber, and if we + don't wait for the old port to close first, we get a "port already + in use" error. There is a tiny race condition here, but the only + threat is from other programs that bind (statically) to the same + port number we happened to be allocated, and only if those + programs use SO_REUSEADDR, and only if they get control in between + reactor turns. + * Makefile (TRIALARGS): update to handle Twisted > 2.1.0 * buildbot/master.py (BuildMaster.loadConfig_Sources): remove all From warner at users.sourceforge.net Fri Nov 25 01:25:13 2005 From: warner at users.sourceforge.net (Brian Warner) Date: Fri, 25 Nov 2005 01:25:13 +0000 Subject: [Buildbot-commits] buildbot/buildbot master.py,1.87,1.88 Message-ID: Update of /cvsroot/buildbot/buildbot/buildbot In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14285/buildbot Modified Files: master.py Log Message: Revision: arch at buildbot.sf.net--2004/buildbot--dev--0--patch-434 Creator: Brian Warner fix test_config.StartService, by not using a fixed slavePort * buildbot/test/test_config.py (StartService): don't claim a fixed port number, instead set slavePort=0 on the first pass, figure out what port was allocated, then switch to a config file that uses the allocated port. * buildbot/master.py (BuildMaster.loadConfig): close the old slaveport before opening the new one, because unit tests might replace slavePort=0 with the same allocated portnumber, and if we don't wait for the old port to close first, we get a "port already in use" error. There is a tiny race condition here, but the only threat is from other programs that bind (statically) to the same port number we happened to be allocated, and only if those programs use SO_REUSEADDR, and only if they get control in between reactor turns. Index: master.py =================================================================== RCS file: /cvsroot/buildbot/buildbot/buildbot/master.py,v retrieving revision 1.87 retrieving revision 1.88 diff -u -d -r1.87 -r1.88 --- master.py 25 Nov 2005 00:36:41 -0000 1.87 +++ master.py 25 Nov 2005 01:25:11 -0000 1.88 @@ -849,9 +849,11 @@ d.addCallback(lambda res: self.slavePort.disownServiceParent()) self.slavePort = None if slavePortnum is not None: - self.slavePort = internet.TCPServer(slavePortnum, - self.slaveFactory) - self.slavePort.setServiceParent(self) + def openSlavePort(res): + self.slavePort = internet.TCPServer(slavePortnum, + self.slaveFactory) + self.slavePort.setServiceParent(self) + d.addCallback(openSlavePort) log.msg("BuildMaster listening on port %d" % slavePortnum) self.slavePortnum = slavePortnum From warner at users.sourceforge.net Fri Nov 25 01:25:13 2005 From: warner at users.sourceforge.net (Brian Warner) Date: Fri, 25 Nov 2005 01:25:13 +0000 Subject: [Buildbot-commits] buildbot/buildbot/test test_config.py,1.31,1.32 Message-ID: Update of /cvsroot/buildbot/buildbot/buildbot/test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14285/buildbot/test Modified Files: test_config.py Log Message: Revision: arch at buildbot.sf.net--2004/buildbot--dev--0--patch-434 Creator: Brian Warner fix test_config.StartService, by not using a fixed slavePort * buildbot/test/test_config.py (StartService): don't claim a fixed port number, instead set slavePort=0 on the first pass, figure out what port was allocated, then switch to a config file that uses the allocated port. * buildbot/master.py (BuildMaster.loadConfig): close the old slaveport before opening the new one, because unit tests might replace slavePort=0 with the same allocated portnumber, and if we don't wait for the old port to close first, we get a "port already in use" error. There is a tiny race condition here, but the only threat is from other programs that bind (statically) to the same port number we happened to be allocated, and only if those programs use SO_REUSEADDR, and only if they get control in between reactor turns. Index: test_config.py =================================================================== RCS file: /cvsroot/buildbot/buildbot/buildbot/test/test_config.py,v retrieving revision 1.31 retrieving revision 1.32 diff -u -d -r1.31 -r1.32 --- test_config.py 25 Nov 2005 00:36:41 -0000 1.31 +++ test_config.py 25 Nov 2005 01:25:11 -0000 1.32 @@ -874,13 +874,22 @@ d.addCallback(finishedStalling) return d -targetCfg1 = emptyCfg + \ +# we can't actually startService a buildmaster with a config that uses a +# fixed slavePortnum like 9999, so instead this makes it possible to pass '0' +# for the first time, and then substitute back in the allocated port number +# on subsequent passes. +startableEmptyCfg = emptyCfg + \ +""" +c['slavePortnum'] = %d +""" + +targetCfg1 = startableEmptyCfg + \ """ from buildbot.test.test_config import MyTarget c['status'] = [MyTarget('a')] """ -targetCfg2 = emptyCfg + \ +targetCfg2 = startableEmptyCfg + \ """ from buildbot.test.test_config import MySlowTarget c['status'] = [MySlowTarget('b')] @@ -893,12 +902,20 @@ def testStartService(self): os.mkdir("test_ss") self.master = m = BuildMaster("test_ss") - m.loadConfig(emptyCfg) m.startService() + d = m.loadConfig(startableEmptyCfg % 0) + d.addCallback(self._testStartService_0) + return maybeWait(d) + + def _testStartService_0(self, res): + m = self.master m.targetevents = [] - d = m.loadConfig(targetCfg1) + # figure out what port got allocated + self.portnum = m.slavePort._port.getHost().port + d = m.loadConfig(targetCfg1 % self.portnum) d.addCallback(self._testStartService_1) return d + def _testStartService_1(self, res): self.failUnlessEqual(len(self.master.statusTargets), 1) self.failUnless(isinstance(self.master.statusTargets[0], MyTarget)) @@ -906,16 +923,18 @@ [('start', 'a')]) self.master.targetevents = [] # reloading the same config should not start or stop the target - d = self.master.loadConfig(targetCfg1) + d = self.master.loadConfig(targetCfg1 % self.portnum) d.addCallback(self._testStartService_2) return d + def _testStartService_2(self, res): self.failUnlessEqual(self.master.targetevents, []) # but loading a new config file should stop the old one, then # start the new one - d = self.master.loadConfig(targetCfg2) + d = self.master.loadConfig(targetCfg2 % self.portnum) d.addCallback(self._testStartService_3) return d + def _testStartService_3(self, res): self.failUnlessEqual(self.master.targetevents, [('stop', 'a'), ('start', 'b')]) @@ -923,9 +942,10 @@ # and going back to the old one should do the same, in the same # order, even though the current MySlowTarget takes a moment to shut # down - d = self.master.loadConfig(targetCfg1) + d = self.master.loadConfig(targetCfg1 % self.portnum) d.addCallback(self._testStartService_4) return d + def _testStartService_4(self, res): self.failUnlessEqual(self.master.targetevents, [('stop', 'b'), ('start', 'a')]) From warner at users.sourceforge.net Fri Nov 25 23:26:37 2005 From: warner at users.sourceforge.net (Brian Warner) Date: Fri, 25 Nov 2005 23:26:37 +0000 Subject: [Buildbot-commits] buildbot ChangeLog,1.556,1.557 Message-ID: Update of /cvsroot/buildbot/buildbot In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9304 Modified Files: ChangeLog Log Message: Revision: arch at buildbot.sf.net--2004/buildbot--dev--0--patch-436 Creator: Brian Warner fix AnyBranchScheduler when fileIsImportant=None * buildbot/scheduler.py (Scheduler): change fileIsImportant handling: treat self.fileIsImportant more as an attribute that contains a callable than as a method. If the attribute is None, don't call it and assume all filenames are important. It is still possible to provide a fileIsImportant method in a subclass, however. (AnyBranchScheduler): handle fileIsImportant=None, previously it was broken * buildbot/test/test_scheduler.py (Scheduling.testAnyBranch2): test using AnyBranchScheduler with fileIsImportant=None Index: ChangeLog =================================================================== RCS file: /cvsroot/buildbot/buildbot/ChangeLog,v retrieving revision 1.556 retrieving revision 1.557 diff -u -d -r1.556 -r1.557 --- ChangeLog 25 Nov 2005 01:25:11 -0000 1.556 +++ ChangeLog 25 Nov 2005 23:26:35 -0000 1.557 @@ -1,3 +1,16 @@ +2005-11-25 Brian Warner + + * buildbot/scheduler.py (Scheduler): change fileIsImportant + handling: treat self.fileIsImportant more as an attribute that + contains a callable than as a method. If the attribute is None, + don't call it and assume all filenames are important. It is still + possible to provide a fileIsImportant method in a subclass, + however. + (AnyBranchScheduler): handle fileIsImportant=None, previously it + was broken + * buildbot/test/test_scheduler.py (Scheduling.testAnyBranch2): + test using AnyBranchScheduler with fileIsImportant=None + 2005-11-24 Brian Warner * buildbot/test/test_config.py (StartService): don't claim a fixed From warner at users.sourceforge.net Fri Nov 25 23:26:37 2005 From: warner at users.sourceforge.net (Brian Warner) Date: Fri, 25 Nov 2005 23:26:37 +0000 Subject: [Buildbot-commits] buildbot/buildbot scheduler.py,1.8,1.9 Message-ID: Update of /cvsroot/buildbot/buildbot/buildbot In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9304/buildbot Modified Files: scheduler.py Log Message: Revision: arch at buildbot.sf.net--2004/buildbot--dev--0--patch-436 Creator: Brian Warner fix AnyBranchScheduler when fileIsImportant=None * buildbot/scheduler.py (Scheduler): change fileIsImportant handling: treat self.fileIsImportant more as an attribute that contains a callable than as a method. If the attribute is None, don't call it and assume all filenames are important. It is still possible to provide a fileIsImportant method in a subclass, however. (AnyBranchScheduler): handle fileIsImportant=None, previously it was broken * buildbot/test/test_scheduler.py (Scheduling.testAnyBranch2): test using AnyBranchScheduler with fileIsImportant=None Index: scheduler.py =================================================================== RCS file: /cvsroot/buildbot/buildbot/buildbot/scheduler.py,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- scheduler.py 24 Nov 2005 23:59:25 -0000 1.8 +++ scheduler.py 25 Nov 2005 23:26:35 -0000 1.9 @@ -70,9 +70,10 @@ should trigger a new build. """ + fileIsImportant = None compare_attrs = ('name', 'treeStableTimer', 'builderNames', 'branch', 'fileIsImportant') - + def __init__(self, name, branch, treeStableTimer, builderNames, fileIsImportant=None): """ @@ -121,18 +122,13 @@ return [self.nextBuildTime] return [] - def fileIsImportant(self, change): - # note that externally-provided fileIsImportant callables are - # functions, not methods, and will only receive one argument. Or you - # can override this method, in which case it will behave like a - # normal method. - return True - def addChange(self, change): if change.branch != self.branch: log.msg("%s ignoring off-branch %s" % (self, change)) return - if self.fileIsImportant(change): + if not self.fileIsImportant: + self.addImportantChange(change) + elif self.fileIsImportant(change): self.addImportantChange(change) else: self.addUnimportantChange(change) @@ -187,6 +183,7 @@ separate Scheduler for each new branch it sees.""" schedulerFactory = Scheduler + fileIsImportant = None compare_attrs = ('name', 'branches', 'treeStableTimer', 'builderNames', 'fileIsImportant') From warner at users.sourceforge.net Fri Nov 25 23:26:37 2005 From: warner at users.sourceforge.net (Brian Warner) Date: Fri, 25 Nov 2005 23:26:37 +0000 Subject: [Buildbot-commits] buildbot/buildbot/test test_scheduler.py,1.6,1.7 Message-ID: Update of /cvsroot/buildbot/buildbot/buildbot/test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9304/buildbot/test Modified Files: test_scheduler.py Log Message: Revision: arch at buildbot.sf.net--2004/buildbot--dev--0--patch-436 Creator: Brian Warner fix AnyBranchScheduler when fileIsImportant=None * buildbot/scheduler.py (Scheduler): change fileIsImportant handling: treat self.fileIsImportant more as an attribute that contains a callable than as a method. If the attribute is None, don't call it and assume all filenames are important. It is still possible to provide a fileIsImportant method in a subclass, however. (AnyBranchScheduler): handle fileIsImportant=None, previously it was broken * buildbot/test/test_scheduler.py (Scheduling.testAnyBranch2): test using AnyBranchScheduler with fileIsImportant=None Index: test_scheduler.py =================================================================== RCS file: /cvsroot/buildbot/buildbot/buildbot/test/test_scheduler.py,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- test_scheduler.py 14 Oct 2005 19:42:39 -0000 1.6 +++ test_scheduler.py 25 Nov 2005 23:26:35 -0000 1.7 @@ -89,7 +89,7 @@ def testAnyBranch(self): - s = scheduler.AnyBranchScheduler("b1", None, 2, ["a","b"], + s = scheduler.AnyBranchScheduler("b1", None, 1, ["a","b"], fileIsImportant=self.isImportant) self.addScheduler(s) @@ -107,7 +107,7 @@ s.addChange(c4) d = defer.Deferred() - reactor.callLater(4, d.callback, None) + reactor.callLater(2, d.callback, None) d.addCallback(self._testAnyBranch_1) return maybeWait(d) def _testAnyBranch_1(self, res): @@ -126,6 +126,42 @@ self.failUnlessEqual(len(s2.changes), 1) self.failUnlessEqual(s2.patch, None) + def testAnyBranch2(self): + # like testAnyBranch but without fileIsImportant + s = scheduler.AnyBranchScheduler("b1", None, 2, ["a","b"]) + self.addScheduler(s) + c1 = Change("alice", ["important", "not important"], "some changes", + branch="branch1") + s.addChange(c1) + c2 = Change("bob", ["not important", "boring"], "some more changes", + branch="branch1") + s.addChange(c2) + c3 = Change("carol", ["important", "dull"], "even more changes", + branch="branch1") + s.addChange(c3) + + c4 = Change("carol", ["important"], "other branch", branch="branch2") + s.addChange(c4) + d = defer.Deferred() + reactor.callLater(2, d.callback, None) + d.addCallback(self._testAnyBranch2_1) + return maybeWait(d) + def _testAnyBranch2_1(self, res): + self.failUnlessEqual(len(self.master.sets), 2) + self.master.sets.sort(lambda a,b: cmp(a.source.branch, + b.source.branch)) + s1 = self.master.sets[0].source + self.failUnlessEqual(s1.branch, "branch1") + self.failUnlessEqual(s1.revision, None) + self.failUnlessEqual(len(s1.changes), 3) + self.failUnlessEqual(s1.patch, None) + + s2 = self.master.sets[1].source + self.failUnlessEqual(s2.branch, "branch2") + self.failUnlessEqual(s2.revision, None) + self.failUnlessEqual(len(s2.changes), 1) + self.failUnlessEqual(s2.patch, None) + def createMaildir(self, jobdir): os.mkdir(jobdir) From warner at users.sourceforge.net Sat Nov 26 02:09:26 2005 From: warner at users.sourceforge.net (Brian Warner) Date: Sat, 26 Nov 2005 02:09:26 +0000 Subject: [Buildbot-commits] buildbot/buildbot scheduler.py,1.9,1.10 Message-ID: Update of /cvsroot/buildbot/buildbot/buildbot In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9411/buildbot Modified Files: scheduler.py Log Message: Revision: arch at buildbot.sf.net--2004/buildbot--dev--0--patch-438 Creator: Brian Warner add cron-style 'scheduler.Nightly', thanks to Dobes Vandermeer * docs/buildbot.texinfo (Scheduler Types): give a few hints about what Schedulers are available * buildbot/scheduler.py (Nightly): add new Scheduler based upon work by Dobes Vandermeer and hacked mercilessly by me. This offers 'cron'-style build scheduling at certain times of day, week, month, or year. * buildbot/test/test_scheduler.py (Scheduling.testNightly): test it Index: scheduler.py =================================================================== RCS file: /cvsroot/buildbot/buildbot/buildbot/scheduler.py,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- scheduler.py 25 Nov 2005 23:26:35 -0000 1.9 +++ scheduler.py 26 Nov 2005 02:09:24 -0000 1.10 @@ -339,6 +339,164 @@ SourceStamp(branch=self.branch)) self.submit(bs) + + +class Nightly(BaseUpstreamScheduler): + """Imitate 'cron' scheduling. This can be used to schedule a nightly + build, or one which runs are certain times of the day, week, or month. + + Pass some subset of minute, hour, dayOfMonth, month, and dayOfWeek; each + may be a single number or a list of valid values. The builds will be + triggered whenever the current time matches these values. Wildcards are + represented by a '*' string. All fields default to a wildcard except + 'minute', so with no fields this defaults to a build every hour, on the + hour. + + For example, the following master.cfg clause will cause a build to be + started every night at 3:00am: + + s = Nightly('nightly', ['builder1', 'builder2'], hour=3, minute=0) + c['schedules'].append(s) + + This scheduler will perform a build each monday morning at 6:23am and + again at 8:23am: + + s = Nightly('BeforeWork', ['builder1'], + dayOfWeek=0, hour=[6,8], minute=23) + + The following runs a build every two hours: + + s = Nightly('every2hours', ['builder1'], hour=range(0, 24, 2)) + + And this one will run only on December 24th: + + s = Nightly('SleighPreflightCheck', ['flying_circuits', 'radar'], + month=12, dayOfMonth=24, hour=12, minute=0) + + For dayOfWeek and dayOfMonth, builds are triggered if the date matches + either of them. Month and day numbers start at 1, not zero. + """ + + compare_attrs = ('name', 'builderNames', + 'minute', 'hour', 'dayOfMonth', 'month', + 'dayOfWeek', 'branch') + + def __init__(self, name, builderNames, minute=0, hour='*', + dayOfMonth='*', month='*', dayOfWeek='*', + branch=None): + # Setting minute=0 really makes this an 'Hourly' scheduler. This + # seemed like a better default than minute='*', which would result in + # a build every 60 seconds. + BaseUpstreamScheduler.__init__(self, name) + self.builderNames = builderNames + self.minute = minute + self.hour = hour + self.dayOfMonth = dayOfMonth + self.month = month + self.dayOfWeek = dayOfWeek + self.branch = branch + self.delayedRun = None + self.nextRunTime = None + + def addTime(self, timetuple, secs): + return time.localtime(time.mktime(timetuple)+secs) + def findFirstValueAtLeast(self, values, value, default=None): + for v in values: + if v >= value: return v + return default + + def setTimer(self): + self.nextRunTime = self.calculateNextRunTime() + self.delayedRun = reactor.callLater(self.nextRunTime - time.time(), + self.doPeriodicBuild) + + def startService(self): + BaseUpstreamScheduler.startService(self) + self.setTimer() + + def stopService(self): + BaseUpstreamScheduler.stopService(self) + self.delayedRun.cancel() + + def isRunTime(self, timetuple): + def check(ourvalue, value): + if ourvalue == '*': return True + if isinstance(ourvalue, int): return value == ourvalue + return (value in ourvalue) + + if not check(self.minute, timetuple[4]): + #print 'bad minute', timetuple[4], self.minute + return False + + if not check(self.hour, timetuple[3]): + #print 'bad hour', timetuple[3], self.hour + return False + + if not check(self.month, timetuple[1]): + #print 'bad month', timetuple[1], self.month + return False + + if self.dayOfMonth != '*' and self.dayOfWeek != '*': + # They specified both day(s) of month AND day(s) of week. + # This means that we only have to match one of the two. If + # neither one matches, this time is not the right time. + if not (check(self.dayOfMonth, timetuple[2]) or + check(self.dayOfWeek, timetuple[6])): + #print 'bad day' + return False + else: + if not check(self.dayOfMonth, timetuple[2]): + #print 'bad day of month' + return False + + if not check(self.dayOfWeek, timetuple[6]): + #print 'bad day of week' + return False + + return True + + def calculateNextRunTime(self): + return self.calculateNextRunTimeFrom(time.time()) + + def calculateNextRunTimeFrom(self, now): + dateTime = time.localtime(now) + + # Remove seconds by advancing to at least the next minue + dateTime = self.addTime(dateTime, 60-dateTime[5]) + + # Now we just keep adding minutes until we find something that matches + + # It not an efficient algorithm, but it'll *work* for now + yearLimit = dateTime[0]+2 + while not self.isRunTime(dateTime): + dateTime = self.addTime(dateTime, 60) + #print 'Trying', time.asctime(dateTime) + assert dateTime[0] < yearLimit, 'Something is wrong with this code' + return time.mktime(dateTime) + + def listBuilderNames(self): + return self.builderNames + + def getPendingBuildTimes(self): + # TODO: figure out when self.timer is going to fire next and report + # that + if self.nextRunTime is None: return [] + return [self.nextRunTime] + + def doPeriodicBuild(self): + # Schedule the next run + self.setTimer() + + # And trigger a build + bs = buildset.BuildSet(self.builderNames, + SourceStamp(branch=self.branch)) + self.submit(bs) + + def addChange(self, change): + pass + + + class TryBase(service.MultiService, util.ComparableMixin): if implements: implements(interfaces.IScheduler) From warner at users.sourceforge.net Sat Nov 26 02:09:26 2005 From: warner at users.sourceforge.net (Brian Warner) Date: Sat, 26 Nov 2005 02:09:26 +0000 Subject: [Buildbot-commits] buildbot/docs buildbot.texinfo,1.29,1.30 Message-ID: Update of /cvsroot/buildbot/buildbot/docs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9411/docs Modified Files: buildbot.texinfo Log Message: Revision: arch at buildbot.sf.net--2004/buildbot--dev--0--patch-438 Creator: Brian Warner add cron-style 'scheduler.Nightly', thanks to Dobes Vandermeer * docs/buildbot.texinfo (Scheduler Types): give a few hints about what Schedulers are available * buildbot/scheduler.py (Nightly): add new Scheduler based upon work by Dobes Vandermeer and hacked mercilessly by me. This offers 'cron'-style build scheduling at certain times of day, week, month, or year. * buildbot/test/test_scheduler.py (Scheduling.testNightly): test it Index: buildbot.texinfo =================================================================== RCS file: /cvsroot/buildbot/buildbot/docs/buildbot.texinfo,v retrieving revision 1.29 retrieving revision 1.30 diff -u -d -r1.29 -r1.30 --- buildbot.texinfo 26 Oct 2005 20:22:50 -0000 1.29 +++ buildbot.texinfo 26 Nov 2005 02:09:24 -0000 1.30 @@ -110,6 +110,7 @@ Listing Change Sources and Schedulers +* Scheduler Types:: * Build Dependencies:: Getting Source Code Changes @@ -1733,10 +1734,59 @@ depending upon when it was first activated). @menu +* Scheduler Types:: * Build Dependencies:: @end menu - at node Build Dependencies, , Listing Change Sources and Schedulers, Listing Change Sources and Schedulers + at node Scheduler Types, Build Dependencies, Listing Change Sources and Schedulers, Listing Change Sources and Schedulers + at subsection Scheduler Types + +Here is a brief catalog of the available Scheduler types. All these +Schedulers are classes in @code{buildbot.scheduler}, and the +docstrings there are the best source of documentation on the arguments +taken by each one. + + at table @code + at item Scheduler +This is the default Scheduler class. It follows exactly one branch, +and starts a configurable tree-stable-timer after each change on that +branch. When the timer expires, it starts a build on some set of +Builders. The Scheduler accepts a @code{fileIsImportant} function +which can be used to ignore some Changes if they do not affect any +``important'' files. + + at item AnyBranchScheduler +This scheduler uses a tree-stable-timer like the default one, but +follows multiple branches at once. Each branch gets a separate timer. + + at item Dependent +This scheduler watches an ``upstream'' Builder. When that Builder +successfully builds a particular set of Changes, it triggers builds of +the same code on a configured set of ``downstream'' builders. The next +section (@pxref{Build Dependencies}) describes this scheduler in more +detail. + + at item Periodic +This simple scheduler just triggers a build every N seconds. + + at item Nightly +This is highly configurable periodic build scheduler, which triggers a +build at particular times of day, week, month, or year. The +configuration syntax is very similar to the well-known @code{crontab} +format, in which you provide values for minute, hour, day, and month +(some of which can be wildcards), and a build is triggered whenever +the current time matches the given constraints. This can run a build +every night, every morning, every weekend, alternate Thursdays, on +your boss's birthday, etc. + + at item Try_Jobdir / Try_Userpass +This scheduler allows developers to use the @code{buildbot try} +command to trigger builds of code they have not yet committed. See + at ref{try} for complete details. + + at end table + + at node Build Dependencies, , Scheduler Types, Listing Change Sources and Schedulers @subsection Build Dependencies @cindex Dependencies From warner at users.sourceforge.net Sat Nov 26 02:09:26 2005 From: warner at users.sourceforge.net (Brian Warner) Date: Sat, 26 Nov 2005 02:09:26 +0000 Subject: [Buildbot-commits] buildbot ChangeLog,1.557,1.558 Message-ID: Update of /cvsroot/buildbot/buildbot In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9411 Modified Files: ChangeLog Log Message: Revision: arch at buildbot.sf.net--2004/buildbot--dev--0--patch-438 Creator: Brian Warner add cron-style 'scheduler.Nightly', thanks to Dobes Vandermeer * docs/buildbot.texinfo (Scheduler Types): give a few hints about what Schedulers are available * buildbot/scheduler.py (Nightly): add new Scheduler based upon work by Dobes Vandermeer and hacked mercilessly by me. This offers 'cron'-style build scheduling at certain times of day, week, month, or year. * buildbot/test/test_scheduler.py (Scheduling.testNightly): test it Index: ChangeLog =================================================================== RCS file: /cvsroot/buildbot/buildbot/ChangeLog,v retrieving revision 1.557 retrieving revision 1.558 diff -u -d -r1.557 -r1.558 --- ChangeLog 25 Nov 2005 23:26:35 -0000 1.557 +++ ChangeLog 26 Nov 2005 02:09:24 -0000 1.558 @@ -1,5 +1,14 @@ 2005-11-25 Brian Warner + * docs/buildbot.texinfo (Scheduler Types): give a few hints about + what Schedulers are available + + * buildbot/scheduler.py (Nightly): add new Scheduler based upon + work by Dobes Vandermeer and hacked mercilessly by me. This offers + 'cron'-style build scheduling at certain times of day, week, + month, or year. + * buildbot/test/test_scheduler.py (Scheduling.testNightly): test it + * buildbot/scheduler.py (Scheduler): change fileIsImportant handling: treat self.fileIsImportant more as an attribute that contains a callable than as a method. If the attribute is None, From warner at users.sourceforge.net Sat Nov 26 02:09:26 2005 From: warner at users.sourceforge.net (Brian Warner) Date: Sat, 26 Nov 2005 02:09:26 +0000 Subject: [Buildbot-commits] buildbot/buildbot/test test_scheduler.py,1.7,1.8 Message-ID: Update of /cvsroot/buildbot/buildbot/buildbot/test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9411/buildbot/test Modified Files: test_scheduler.py Log Message: Revision: arch at buildbot.sf.net--2004/buildbot--dev--0--patch-438 Creator: Brian Warner add cron-style 'scheduler.Nightly', thanks to Dobes Vandermeer * docs/buildbot.texinfo (Scheduler Types): give a few hints about what Schedulers are available * buildbot/scheduler.py (Nightly): add new Scheduler based upon work by Dobes Vandermeer and hacked mercilessly by me. This offers 'cron'-style build scheduling at certain times of day, week, month, or year. * buildbot/test/test_scheduler.py (Scheduling.testNightly): test it Index: test_scheduler.py =================================================================== RCS file: /cvsroot/buildbot/buildbot/buildbot/test/test_scheduler.py,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- test_scheduler.py 25 Nov 2005 23:26:35 -0000 1.7 +++ test_scheduler.py 26 Nov 2005 02:09:24 -0000 1.8 @@ -1,6 +1,6 @@ # -*- test-case-name: buildbot.test.test_scheduler -*- -import os +import os, time from twisted.trial import unittest from twisted.internet import defer, reactor @@ -46,6 +46,42 @@ s1 = self.master.sets[0] self.failUnlessEqual(s1.builderNames, ["a","b"]) + def testNightly(self): + # now == 15-Nov-2005, 00:05:36 AM . By using mktime, this is + # converted into the local timezone, which happens to match what + # Nightly is going to do anyway. + MIN=60; HOUR=60*MIN; DAY=24*3600 + now = time.mktime((2005, 11, 15, 0, 5, 36, 1, 319, 0)) + + s = scheduler.Nightly('nightly', ["a"], hour=3) + t = s.calculateNextRunTimeFrom(now) + self.failUnlessEqual(int(t-now), 2*HOUR+54*MIN+24) + + s = scheduler.Nightly('nightly', ["a"], minute=[3,8,54]) + t = s.calculateNextRunTimeFrom(now) + self.failUnlessEqual(int(t-now), 2*MIN+24) + + s = scheduler.Nightly('nightly', ["a"], + dayOfMonth=16, hour=1, minute=6) + t = s.calculateNextRunTimeFrom(now) + self.failUnlessEqual(int(t-now), DAY+HOUR+24) + + s = scheduler.Nightly('nightly', ["a"], + dayOfMonth=16, hour=1, minute=3) + t = s.calculateNextRunTimeFrom(now) + self.failUnlessEqual(int(t-now), DAY+57*MIN+24) + + s = scheduler.Nightly('nightly', ["a"], + dayOfMonth=15, hour=1, minute=3) + t = s.calculateNextRunTimeFrom(now) + self.failUnlessEqual(int(t-now), 57*MIN+24) + + s = scheduler.Nightly('nightly', ["a"], + dayOfMonth=15, hour=0, minute=3) + t = s.calculateNextRunTimeFrom(now) + self.failUnlessEqual(int(t-now), 30*DAY-3*MIN+24) + + def isImportant(self, change): if "important" in change.files: return True From warner at users.sourceforge.net Sat Nov 26 02:14:33 2005 From: warner at users.sourceforge.net (Brian Warner) Date: Sat, 26 Nov 2005 02:14:33 +0000 Subject: [Buildbot-commits] buildbot/buildbot/process step.py,1.78,1.79 base.py,1.60,1.61 Message-ID: Update of /cvsroot/buildbot/buildbot/buildbot/process In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10491/buildbot/process Modified Files: step.py base.py Log Message: Revision: arch at buildbot.sf.net--2004/buildbot--dev--0--patch-440 Creator: Brian Warner fix the multiple-equivalent-Lock-instances bug on config-file reload * buildbot/locks.py: fix the problem in which loading a master.cfg file that changes some Builders (but not all of them) can result in having multiple copies of the same Lock. Now, the real Locks are kept in a table inside the BotMaster, and the Builders/Steps use "LockIDs", which are still instances of MasterLock and SlaveLock. The real Locks are instances of the new RealMasterLock and RealSlaveLock classes. * buildbot/master.py (BotMaster.getLockByID): new method to convert LockIDs into real Locks. * buildbot/process/base.py (Build.startBuild): convert LockIDs into real Locks before building * buildbot/process/step.py (BuildStep.startStep): same * buildbot/test/test_locks.py (Locks.testLock1a): add a test which exercises the problem Index: base.py =================================================================== RCS file: /cvsroot/buildbot/buildbot/buildbot/process/base.py,v retrieving revision 1.60 retrieving revision 1.61 diff -u -d -r1.60 -r1.61 --- base.py 14 Oct 2005 19:42:40 -0000 1.60 +++ base.py 26 Nov 2005 02:14:31 -0000 1.61 @@ -267,6 +267,10 @@ self.build_status = build_status self.slavebuilder = slavebuilder self.slavename = slavebuilder.slave.slavename + # convert all locks into their real forms + self.locks = [self.builder.botmaster.getLockByID(l) + for l in self.locks] + # then narrow SlaveLocks down to the right slave self.locks = [l.getLock(self.slavebuilder) for l in self.locks] self.remote = slavebuilder.remote self.remote.notifyOnDisconnect(self.lostRemote) Index: step.py =================================================================== RCS file: /cvsroot/buildbot/buildbot/buildbot/process/step.py,v retrieving revision 1.78 retrieving revision 1.79 diff -u -d -r1.78 -r1.79 --- step.py 23 Nov 2005 08:01:21 -0000 1.78 +++ step.py 26 Nov 2005 02:14:31 -0000 1.79 @@ -472,8 +472,11 @@ self.remote = remote self.deferred = defer.Deferred() - # convert all locks into their real form (SlaveLocks get narrowed - # down to the slave that this build is being run on) + # convert all locks into their real form + self.locks = [self.build.builder.botmaster.getLockByID(l) + for l in self.locks] + # then narrow SlaveLocks down to the slave that this build is being + # run on self.locks = [l.getLock(self.build.slavebuilder) for l in self.locks] for l in self.locks: if l in self.build.locks: From warner at users.sourceforge.net Sat Nov 26 02:14:33 2005 From: warner at users.sourceforge.net (Brian Warner) Date: Sat, 26 Nov 2005 02:14:33 +0000 Subject: [Buildbot-commits] buildbot/buildbot/test test_locks.py,1.2,1.3 Message-ID: Update of /cvsroot/buildbot/buildbot/buildbot/test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10491/buildbot/test Modified Files: test_locks.py Log Message: Revision: arch at buildbot.sf.net--2004/buildbot--dev--0--patch-440 Creator: Brian Warner fix the multiple-equivalent-Lock-instances bug on config-file reload * buildbot/locks.py: fix the problem in which loading a master.cfg file that changes some Builders (but not all of them) can result in having multiple copies of the same Lock. Now, the real Locks are kept in a table inside the BotMaster, and the Builders/Steps use "LockIDs", which are still instances of MasterLock and SlaveLock. The real Locks are instances of the new RealMasterLock and RealSlaveLock classes. * buildbot/master.py (BotMaster.getLockByID): new method to convert LockIDs into real Locks. * buildbot/process/base.py (Build.startBuild): convert LockIDs into real Locks before building * buildbot/process/step.py (BuildStep.startStep): same * buildbot/test/test_locks.py (Locks.testLock1a): add a test which exercises the problem Index: test_locks.py =================================================================== RCS file: /cvsroot/buildbot/buildbot/buildbot/test/test_locks.py,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- test_locks.py 14 Oct 2005 19:42:39 -0000 1.2 +++ test_locks.py 26 Nov 2005 02:14:31 -0000 1.3 @@ -49,6 +49,11 @@ c['builders'] = [b1a, b1b, b1c, b1d, b2a, b2b] """ +config_1a = config_1 + \ +""" +b1b = {'name': 'full1b', 'slavename': 'bot1', 'builddir': '1B', 'factory': f1} +c['builders'] = [b1a, b1b, b1c, b1d, b2a, b2b] +""" class Locks(RunMixin, unittest.TestCase): @@ -75,7 +80,7 @@ d = defer.DeferredList([self.req1.waitUntilFinished(), self.req2.waitUntilFinished()]) d.addCallback(self._testLock1_1) - return d + return maybeWait(d) def _testLock1_1(self, res): # full1a should complete its step before full1b starts it @@ -83,6 +88,27 @@ [("start", 1), ("done", 1), ("start", 2), ("done", 2)]) + def testLock1a(self): + # just like testLock1, but we reload the config file first, with a + # change that causes full1b to be changed. This tickles a design bug + # in which full1a and full1b wind up with distinct Lock instances. + d = self.master.loadConfig(config_1a) + d.addCallback(self._testLock1a_1) + return maybeWait(d) + def _testLock1a_1(self, res): + self.control.getBuilder("full1a").requestBuild(self.req1) + self.control.getBuilder("full1b").requestBuild(self.req2) + d = defer.DeferredList([self.req1.waitUntilFinished(), + self.req2.waitUntilFinished()]) + d.addCallback(self._testLock1a_2) + return d + + def _testLock1a_2(self, res): + # full1a should complete its step before full1b starts it + self.failUnlessEqual(self.events, + [("start", 1), ("done", 1), + ("start", 2), ("done", 2)]) + def testLock2(self): # two builds run on separate slaves with slave-scoped locks should # not interfere @@ -91,7 +117,7 @@ d = defer.DeferredList([self.req1.waitUntilFinished(), self.req2.waitUntilFinished()]) d.addCallback(self._testLock2_1) - return d + return maybeWait(d) def _testLock2_1(self, res): # full2a should start its step before full1a finishes it. They run on @@ -107,7 +133,7 @@ d = defer.DeferredList([self.req1.waitUntilFinished(), self.req2.waitUntilFinished()]) d.addCallback(self._testLock3_1) - return d + return maybeWait(d) def _testLock3_1(self, res): # full2b should not start until after full1c finishes. The builds run @@ -127,7 +153,7 @@ self.req2.waitUntilFinished(), self.req3.waitUntilFinished()]) d.addCallback(self._testLock4_1) - return d + return maybeWait(d) def _testLock4_1(self, res): # full1a starts, then full1d starts (because they do not interfere). From warner at users.sourceforge.net Sat Nov 26 02:14:33 2005 From: warner at users.sourceforge.net (Brian Warner) Date: Sat, 26 Nov 2005 02:14:33 +0000 Subject: [Buildbot-commits] buildbot/buildbot master.py,1.88,1.89 locks.py,1.3,1.4 Message-ID: Update of /cvsroot/buildbot/buildbot/buildbot In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10491/buildbot Modified Files: master.py locks.py Log Message: Revision: arch at buildbot.sf.net--2004/buildbot--dev--0--patch-440 Creator: Brian Warner fix the multiple-equivalent-Lock-instances bug on config-file reload * buildbot/locks.py: fix the problem in which loading a master.cfg file that changes some Builders (but not all of them) can result in having multiple copies of the same Lock. Now, the real Locks are kept in a table inside the BotMaster, and the Builders/Steps use "LockIDs", which are still instances of MasterLock and SlaveLock. The real Locks are instances of the new RealMasterLock and RealSlaveLock classes. * buildbot/master.py (BotMaster.getLockByID): new method to convert LockIDs into real Locks. * buildbot/process/base.py (Build.startBuild): convert LockIDs into real Locks before building * buildbot/process/step.py (BuildStep.startStep): same * buildbot/test/test_locks.py (Locks.testLock1a): add a test which exercises the problem Index: locks.py =================================================================== RCS file: /cvsroot/buildbot/buildbot/buildbot/locks.py,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- locks.py 11 Aug 2005 20:27:48 -0000 1.3 +++ locks.py 26 Nov 2005 02:14:31 -0000 1.4 @@ -46,20 +46,18 @@ d,owner = self.waiting.pop(0) d.callback(self) - -class MasterLock(BaseLock, util.ComparableMixin): - compare_attrs = ['name'] +class RealMasterLock(BaseLock): def __init__(self, name): BaseLock.__init__(self, name) - self.description = "" % (name, id(self)) + self.description = "" % (name,) def getLock(self, slave): return self -class SlaveLock(util.ComparableMixin): - compare_attrs = ['name'] +class RealSlaveLock(BaseLock): def __init__(self, name): - self.name = name + BaseLock.__init__(self, name) + self.description = "" % (name,) self.locks = {} def getLock(self, slavebuilder): @@ -72,3 +70,20 @@ self.locks[slavename] = lock return self.locks[slavename] + +# master.cfg should only reference the following MasterLock and SlaveLock +# classes. They are identifiers that will be turned into real Locks later, +# via the BotMaster.getLockByID method. + +class MasterLock(util.ComparableMixin): + compare_attrs = ['name'] + lockClass = RealMasterLock + def __init__(self, name): + self.name = name + +class SlaveLock(util.ComparableMixin): + compare_attrs = ['name'] + lockClass = RealSlaveLock + def __init__(self, name): + self.name = name + Index: master.py =================================================================== RCS file: /cvsroot/buildbot/buildbot/buildbot/master.py,v retrieving revision 1.88 retrieving revision 1.89 diff -u -d -r1.88 -r1.89 --- master.py 25 Nov 2005 01:25:11 -0000 1.88 +++ master.py 26 Nov 2005 02:14:31 -0000 1.89 @@ -299,6 +299,8 @@ self.statusClientService = None self.watchers = {} + # self.locks holds the real Lock instances + self.locks = {} # these four are convenience functions for testing @@ -410,6 +412,15 @@ b.builder_status.saveYourself() return service.Service.stopService(self) + def getLockByID(self, lockid): + """Convert a Lock identifier into an actual Lock instance. + @param lockid: a locks.MasterLock or locks.SlaveLock instance + @return: a locks.RealMasterLock or locks.RealSlaveLock instance + """ + k = (lockid.__class__, lockid.name) + if not k in self.locks: + self.locks[k] = lockid.lockClass(lockid.name) + return self.locks[k] ######################################## From warner at users.sourceforge.net Sat Nov 26 02:14:33 2005 From: warner at users.sourceforge.net (Brian Warner) Date: Sat, 26 Nov 2005 02:14:33 +0000 Subject: [Buildbot-commits] buildbot ChangeLog,1.558,1.559 Message-ID: Update of /cvsroot/buildbot/buildbot In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10491 Modified Files: ChangeLog Log Message: Revision: arch at buildbot.sf.net--2004/buildbot--dev--0--patch-440 Creator: Brian Warner fix the multiple-equivalent-Lock-instances bug on config-file reload * buildbot/locks.py: fix the problem in which loading a master.cfg file that changes some Builders (but not all of them) can result in having multiple copies of the same Lock. Now, the real Locks are kept in a table inside the BotMaster, and the Builders/Steps use "LockIDs", which are still instances of MasterLock and SlaveLock. The real Locks are instances of the new RealMasterLock and RealSlaveLock classes. * buildbot/master.py (BotMaster.getLockByID): new method to convert LockIDs into real Locks. * buildbot/process/base.py (Build.startBuild): convert LockIDs into real Locks before building * buildbot/process/step.py (BuildStep.startStep): same * buildbot/test/test_locks.py (Locks.testLock1a): add a test which exercises the problem Index: ChangeLog =================================================================== RCS file: /cvsroot/buildbot/buildbot/ChangeLog,v retrieving revision 1.558 retrieving revision 1.559 diff -u -d -r1.558 -r1.559 --- ChangeLog 26 Nov 2005 02:09:24 -0000 1.558 +++ ChangeLog 26 Nov 2005 02:14:31 -0000 1.559 @@ -1,5 +1,21 @@ 2005-11-25 Brian Warner + * buildbot/locks.py: fix the problem in which loading a master.cfg + file that changes some Builders (but not all of them) can result + in having multiple copies of the same Lock. Now, the real Locks + are kept in a table inside the BotMaster, and the Builders/Steps + use "LockIDs", which are still instances of MasterLock and + SlaveLock. The real Locks are instances of the new RealMasterLock + and RealSlaveLock classes. + * buildbot/master.py (BotMaster.getLockByID): new method to + convert LockIDs into real Locks. + * buildbot/process/base.py (Build.startBuild): convert LockIDs + into real Locks before building + * buildbot/process/step.py (BuildStep.startStep): same + * buildbot/test/test_locks.py (Locks.testLock1a): add a test which + exercises the problem + + * docs/buildbot.texinfo (Scheduler Types): give a few hints about what Schedulers are available From warner at users.sourceforge.net Sat Nov 26 02:46:35 2005 From: warner at users.sourceforge.net (Brian Warner) Date: Sat, 26 Nov 2005 02:46:35 +0000 Subject: [Buildbot-commits] buildbot ChangeLog,1.559,1.560 NEWS,1.48,1.49 Message-ID: Update of /cvsroot/buildbot/buildbot In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14835 Modified Files: ChangeLog NEWS Log Message: Revision: arch at buildbot.sf.net--2004/buildbot--dev--0--patch-442 Creator: Brian Warner update NEWS again * NEWS: more updates Index: ChangeLog =================================================================== RCS file: /cvsroot/buildbot/buildbot/ChangeLog,v retrieving revision 1.559 retrieving revision 1.560 diff -u -d -r1.559 -r1.560 --- ChangeLog 26 Nov 2005 02:14:31 -0000 1.559 +++ ChangeLog 26 Nov 2005 02:46:33 -0000 1.560 @@ -1,5 +1,7 @@ 2005-11-25 Brian Warner + * NEWS: more updates + * buildbot/locks.py: fix the problem in which loading a master.cfg file that changes some Builders (but not all of them) can result in having multiple copies of the same Lock. Now, the real Locks Index: NEWS =================================================================== RCS file: /cvsroot/buildbot/buildbot/NEWS,v retrieving revision 1.48 retrieving revision 1.49 diff -u -d -r1.48 -r1.49 --- NEWS 23 Nov 2005 08:01:23 -0000 1.48 +++ NEWS 26 Nov 2005 02:46:33 -0000 1.49 @@ -2,7 +2,17 @@ * Release ?.?.? (??) -** Changes +** New Features + +*** scheduler.Nightly + +Dobes Vandermeer contributed a cron-style 'Nightly' scheduler. Unlike the +more-primitive Periodic class (which only lets you specify the duration +between build attempts), Nightly lets you schedule builds for specific times +of day, week, month, or year. The interface is very much like the crontab(5) +file. See the buildbot.scheduler.Nightly docstring for complete details. + +** minor new features *** step.Trial can work with Trial from Twisted >2.1.0 @@ -30,7 +40,9 @@ Several patches from Dobes Vandermeer: Escape the URLs in email, in case they have spaces and such. Fill otherwise-empty elements, as a workaround for buggy browsers that might optimize them away. Also use binary mode when -opening status pickle files, to make windows work better. +opening status pickle files, to make windows work better. The +AnyBranchScheduler now works even when you don't provide a fileIsImportant= +argument. Stringify the base revision before stuffing it into a 'try' jobfile, helping SVN and Arch implement 'try' builds better. Thanks to Steven Walter for the @@ -48,6 +60,11 @@ should also fix a bug whereby new Periodic Schedulers could fire a build before the Builders have finished being added. +There was a bug in the way Locks were handled when the config file was +reloaded: changing one Builder (but not the others) and reloading master.cfg +would result in multiple instances of the same Lock object, so the Locks +would fail to prevent simultaneous execution of Builds or Steps. This has +been fixed. * Release 0.7.0 (24 Oct 2005) From warner at users.sourceforge.net Sun Nov 27 00:46:15 2005 From: warner at users.sourceforge.net (Brian Warner) Date: Sun, 27 Nov 2005 00:46:15 +0000 Subject: [Buildbot-commits] buildbot/buildbot interfaces.py,1.38,1.39 Message-ID: Update of /cvsroot/buildbot/buildbot/buildbot In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3585/buildbot Modified Files: interfaces.py Log Message: Revision: arch at buildbot.sf.net--2004/buildbot--dev--0--patch-444 Creator: Brian Warner fix StatusReceiver unsubscribe bug * buildbot/status/builder.py (BuildStepStatus.unsubscribe): make sure that unsubscribe works even if we never sent an ETA update. Also, don't explode on duplicate unsubscribe. (BuildStepStatus.addLog): make the convenience "return self"-added watcher automatically unsubscribe when the Step finishes. (BuildStatus.unsubscribe): same handle-duplicate-unsubscribe (BuildStatus.stepStarted): same auto-unsubscribe (BuilderStatus.buildStarted): same auto-unsubscribe * buildbot/interfaces.py (IStatusReceiver.buildStarted): document auto-unsubscribe (IStatusReceiver.stepStarted): same (IStatusReceiver.logStarted): same * buildbot/test/test_run.py (Status): move the Status test.. * buildbot/test/test_status.py (Subscription): .. to here Index: interfaces.py =================================================================== RCS file: /cvsroot/buildbot/buildbot/buildbot/interfaces.py,v retrieving revision 1.38 retrieving revision 1.39 diff -u -d -r1.38 -r1.39 --- interfaces.py 5 Nov 2005 21:06:14 -0000 1.38 +++ interfaces.py 27 Nov 2005 00:46:13 -0000 1.39 @@ -726,6 +726,8 @@ 'self'). If it does so, stepStarted and stepFinished methods will be invoked on the object for the steps of this one build. This is a convenient way to subscribe to all build steps without missing any. + This receiver will automatically be unsubscribed when the build + finishes. It can also return a tuple of (IStatusReceiver, interval), in which case buildETAUpdate messages are sent ever 'interval' seconds, in @@ -741,7 +743,8 @@ This method may return an IStatusReceiver (it could even return 'self'). If it does so, logStarted and logFinished methods will be - invoked on the object for logs created by this one step. + invoked on the object for logs created by this one step. This + receiver will be automatically unsubscribed when the step finishes. Alternatively, the method may return a tuple of an IStatusReceiver and an integer named 'updateInterval'. In addition to @@ -762,7 +765,8 @@ This method may return an IStatusReceiver (such as 'self'), in which case the target's logChunk method will be invoked as text is added to - the logfile. """ + the logfile. This receiver will automatically be unsubsribed when the + log finishes.""" def logChunk(build, step, log, channel, text): """Some text has been added to this log. 'channel' is 0, 1, or 2, as From warner at users.sourceforge.net Sun Nov 27 00:46:15 2005 From: warner at users.sourceforge.net (Brian Warner) Date: Sun, 27 Nov 2005 00:46:15 +0000 Subject: [Buildbot-commits] buildbot ChangeLog,1.560,1.561 Message-ID: Update of /cvsroot/buildbot/buildbot In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3585 Modified Files: ChangeLog Log Message: Revision: arch at buildbot.sf.net--2004/buildbot--dev--0--patch-444 Creator: Brian Warner fix StatusReceiver unsubscribe bug * buildbot/status/builder.py (BuildStepStatus.unsubscribe): make sure that unsubscribe works even if we never sent an ETA update. Also, don't explode on duplicate unsubscribe. (BuildStepStatus.addLog): make the convenience "return self"-added watcher automatically unsubscribe when the Step finishes. (BuildStatus.unsubscribe): same handle-duplicate-unsubscribe (BuildStatus.stepStarted): same auto-unsubscribe (BuilderStatus.buildStarted): same auto-unsubscribe * buildbot/interfaces.py (IStatusReceiver.buildStarted): document auto-unsubscribe (IStatusReceiver.stepStarted): same (IStatusReceiver.logStarted): same * buildbot/test/test_run.py (Status): move the Status test.. * buildbot/test/test_status.py (Subscription): .. to here Index: ChangeLog =================================================================== RCS file: /cvsroot/buildbot/buildbot/ChangeLog,v retrieving revision 1.560 retrieving revision 1.561 diff -u -d -r1.560 -r1.561 --- ChangeLog 26 Nov 2005 02:46:33 -0000 1.560 +++ ChangeLog 27 Nov 2005 00:46:13 -0000 1.561 @@ -1,3 +1,22 @@ +2005-11-26 Brian Warner + + * buildbot/status/builder.py (BuildStepStatus.unsubscribe): make + sure that unsubscribe works even if we never sent an ETA update. + Also, don't explode on duplicate unsubscribe. + (BuildStepStatus.addLog): make the convenience "return self"-added + watcher automatically unsubscribe when the Step finishes. + (BuildStatus.unsubscribe): same handle-duplicate-unsubscribe + (BuildStatus.stepStarted): same auto-unsubscribe + (BuilderStatus.buildStarted): same auto-unsubscribe + + * buildbot/interfaces.py (IStatusReceiver.buildStarted): document + auto-unsubscribe + (IStatusReceiver.stepStarted): same + (IStatusReceiver.logStarted): same + + * buildbot/test/test_run.py (Status): move the Status test.. + * buildbot/test/test_status.py (Subscription): .. to here + 2005-11-25 Brian Warner * NEWS: more updates From warner at users.sourceforge.net Sun Nov 27 00:46:15 2005 From: warner at users.sourceforge.net (Brian Warner) Date: Sun, 27 Nov 2005 00:46:15 +0000 Subject: [Buildbot-commits] buildbot/buildbot/test test_run.py,1.35,1.36 test_status.py,1.28,1.29 Message-ID: Update of /cvsroot/buildbot/buildbot/buildbot/test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3585/buildbot/test Modified Files: test_run.py test_status.py Log Message: Revision: arch at buildbot.sf.net--2004/buildbot--dev--0--patch-444 Creator: Brian Warner fix StatusReceiver unsubscribe bug * buildbot/status/builder.py (BuildStepStatus.unsubscribe): make sure that unsubscribe works even if we never sent an ETA update. Also, don't explode on duplicate unsubscribe. (BuildStepStatus.addLog): make the convenience "return self"-added watcher automatically unsubscribe when the Step finishes. (BuildStatus.unsubscribe): same handle-duplicate-unsubscribe (BuildStatus.stepStarted): same auto-unsubscribe (BuilderStatus.buildStarted): same auto-unsubscribe * buildbot/interfaces.py (IStatusReceiver.buildStarted): document auto-unsubscribe (IStatusReceiver.stepStarted): same (IStatusReceiver.logStarted): same * buildbot/test/test_run.py (Status): move the Status test.. * buildbot/test/test_status.py (Subscription): .. to here Index: test_run.py =================================================================== RCS file: /cvsroot/buildbot/buildbot/buildbot/test/test_run.py,v retrieving revision 1.35 retrieving revision 1.36 diff -u -d -r1.35 -r1.36 --- test_run.py 14 Oct 2005 19:42:39 -0000 1.35 +++ test_run.py 27 Nov 2005 00:46:13 -0000 1.36 @@ -8,10 +8,9 @@ from buildbot import master, interfaces from buildbot.sourcestamp import SourceStamp -from buildbot.util import now from buildbot.slave import bot from buildbot.changes import changes -from buildbot.status import base, builder +from buildbot.status import builder from buildbot.process.base import BuildRequest from buildbot.twcompat import maybeWait @@ -73,64 +72,6 @@ 'builddir': 'dummy23', 'factory': f2}) """ -class STarget(base.StatusReceiver): - debug = False - - def __init__(self, mode): - self.mode = mode - self.events = [] - def announce(self): - if self.debug: - print self.events[-1] - - def builderAdded(self, name, builder): - self.events.append(("builderAdded", name, builder)) - self.announce() - if "builder" in self.mode: - return self - def builderChangedState(self, name, state): - self.events.append(("builderChangedState", name, state)) - self.announce() - def buildStarted(self, name, build): - self.events.append(("buildStarted", name, build)) - self.announce() - if "eta" in self.mode: - self.eta_build = build.getETA() - if "build" in self.mode: - return self - def buildETAUpdate(self, build, ETA): - self.events.append(("buildETAUpdate", build, ETA)) - self.announce() - def stepStarted(self, build, step): - self.events.append(("stepStarted", build, step)) - self.announce() - if 0 and "eta" in self.mode: - print "TIMES", step.getTimes() - print "ETA", step.getETA() - print "EXP", step.getExpectations() - if "step" in self.mode: - return self - def stepETAUpdate(self, build, step, ETA, expectations): - self.events.append(("stepETAUpdate", build, step, ETA, expectations)) - self.announce() - def logStarted(self, build, step, log): - self.events.append(("logStarted", build, step, log)) - self.announce() - def logFinished(self, build, step, log): - self.events.append(("logFinished", build, step, log)) - self.announce() - def stepFinished(self, build, step, results): - self.events.append(("stepFinished", build, step, results)) - if 0 and "eta" in self.mode: - print "post-EXP", step.getExpectations() - self.announce() - def buildFinished(self, name, build, results): - self.events.append(("buildFinished", name, build, results)) - self.announce() - def builderRemoved(self, name): - self.events.append(("builderRemoved", name)) - self.announce() - class Run(unittest.TestCase): def rmtree(self, d): try: @@ -175,162 +116,6 @@ def _testPing_2(self, res): pass -class Status(RunMixin, unittest.TestCase): - - def testSlave(self): - m = self.master - s = m.getStatus() - self.t1 = t1 = STarget(["builder"]) - #t1.debug = True; print - s.subscribe(t1) - self.failUnlessEqual(len(t1.events), 0) - - self.t3 = t3 = STarget(["builder", "build", "step"]) - s.subscribe(t3) - - m.loadConfig(config_2) - m.readConfig = True - m.startService() - - self.failUnlessEqual(len(t1.events), 4) - self.failUnlessEqual(t1.events[0][0:2], ("builderAdded", "dummy")) - self.failUnlessEqual(t1.events[1], - ("builderChangedState", "dummy", "offline")) - self.failUnlessEqual(t1.events[2][0:2], ("builderAdded", "testdummy")) - self.failUnlessEqual(t1.events[3], - ("builderChangedState", "testdummy", "offline")) - t1.events = [] - - self.failUnlessEqual(s.getBuilderNames(), ["dummy", "testdummy"]) - self.failUnlessEqual(s.getBuilderNames(categories=['test']), - ["testdummy"]) - self.s1 = s1 = s.getBuilder("dummy") - self.failUnlessEqual(s1.getName(), "dummy") - self.failUnlessEqual(s1.getState(), ("offline", [])) - self.failUnlessEqual(s1.getCurrentBuilds(), []) - self.failUnlessEqual(s1.getLastFinishedBuild(), None) - self.failUnlessEqual(s1.getBuild(-1), None) - #self.failUnlessEqual(s1.getEvent(-1), foo("created")) - - # status targets should, upon being subscribed, immediately get a - # list of all current builders matching their category - self.t2 = t2 = STarget([]) - s.subscribe(t2) - self.failUnlessEqual(len(t2.events), 2) - self.failUnlessEqual(t2.events[0][0:2], ("builderAdded", "dummy")) - self.failUnlessEqual(t2.events[1][0:2], ("builderAdded", "testdummy")) - - d = self.connectSlave(builders=["dummy", "testdummy"]) - d.addCallback(self._testSlave_1, t1) - return maybeWait(d) - - def _testSlave_1(self, res, t1): - self.failUnlessEqual(len(t1.events), 2) - self.failUnlessEqual(t1.events[0], - ("builderChangedState", "dummy", "idle")) - self.failUnlessEqual(t1.events[1], - ("builderChangedState", "testdummy", "idle")) - t1.events = [] - - c = interfaces.IControl(self.master) - req = BuildRequest("forced build for testing", SourceStamp()) - c.getBuilder("dummy").requestBuild(req) - d = req.waitUntilFinished() - d2 = self.master.botmaster.waitUntilBuilderIdle("dummy") - dl = defer.DeferredList([d, d2]) - dl.addCallback(self._testSlave_2) - return dl - - def _testSlave_2(self, res): - # t1 subscribes to builds, but not anything lower-level - ev = self.t1.events - self.failUnlessEqual(len(ev), 4) - self.failUnlessEqual(ev[0][0:3], - ("builderChangedState", "dummy", "building")) - self.failUnlessEqual(ev[1][0], "buildStarted") - self.failUnlessEqual(ev[2][0:2]+ev[2][3:4], - ("buildFinished", "dummy", builder.SUCCESS)) - self.failUnlessEqual(ev[3][0:3], - ("builderChangedState", "dummy", "idle")) - - self.failUnlessEqual([ev[0] for ev in self.t3.events], - ["builderAdded", - "builderChangedState", # offline - "builderAdded", - "builderChangedState", # idle - "builderChangedState", # offline - "builderChangedState", # idle - "builderChangedState", # building - "buildStarted", - "stepStarted", "stepETAUpdate", "stepFinished", - "stepStarted", "stepETAUpdate", - "logStarted", "logFinished", "stepFinished", - "buildFinished", - "builderChangedState", # idle - ]) - - b = self.s1.getLastFinishedBuild() - self.failUnless(b) - self.failUnlessEqual(b.getBuilder().getName(), "dummy") - self.failUnlessEqual(b.getNumber(), 0) - self.failUnlessEqual(b.getSourceStamp(), (None, None, None)) - self.failUnlessEqual(b.getReason(), "forced build for testing") - self.failUnlessEqual(b.getChanges(), []) - self.failUnlessEqual(b.getResponsibleUsers(), []) - self.failUnless(b.isFinished()) - self.failUnlessEqual(b.getText(), ['build', 'successful']) - self.failUnlessEqual(b.getColor(), "green") - self.failUnlessEqual(b.getResults(), builder.SUCCESS) - - steps = b.getSteps() - self.failUnlessEqual(len(steps), 2) - - eta = 0 - st1 = steps[0] - self.failUnlessEqual(st1.getName(), "dummy") - self.failUnless(st1.isFinished()) - self.failUnlessEqual(st1.getText(), ["delay", "1 secs"]) - start,finish = st1.getTimes() - self.failUnless(0.5 < (finish-start) < 10) - self.failUnlessEqual(st1.getExpectations(), []) - self.failUnlessEqual(st1.getLogs(), []) - eta += finish-start - - st2 = steps[1] - self.failUnlessEqual(st2.getName(), "remote dummy") - self.failUnless(st2.isFinished()) - self.failUnlessEqual(st2.getText(), - ["remote", "delay", "2 secs"]) - start,finish = st2.getTimes() - self.failUnless(1.5 < (finish-start) < 10) - eta += finish-start - self.failUnlessEqual(st2.getExpectations(), [('output', 38, None)]) - logs = st2.getLogs() - self.failUnlessEqual(len(logs), 1) - self.failUnlessEqual(logs[0].getName(), "log") - self.failUnlessEqual(logs[0].getText(), "data") - - self.eta = eta - # now we run it a second time, and we should have an ETA - - self.t4 = t4 = STarget(["builder", "build", "eta"]) - self.master.getStatus().subscribe(t4) - c = interfaces.IControl(self.master) - req = BuildRequest("forced build for testing", SourceStamp()) - c.getBuilder("dummy").requestBuild(req) - d = req.waitUntilFinished() - d2 = self.master.botmaster.waitUntilBuilderIdle("dummy") - dl = defer.DeferredList([d, d2]) - dl.addCallback(self._testSlave_3) - return dl - - def _testSlave_3(self, res): - t4 = self.t4 - eta = self.eta - self.failUnless(eta-1 < t4.eta_build < eta+1, # should be 3 seconds - "t4.eta_build was %g, not in (%g,%g)" - % (t4.eta_build, eta-1, eta+1)) - class BuilderNames(unittest.TestCase): def testGetBuilderNames(self): Index: test_status.py =================================================================== RCS file: /cvsroot/buildbot/buildbot/buildbot/test/test_status.py,v retrieving revision 1.28 retrieving revision 1.29 diff -u -d -r1.28 -r1.29 --- test_status.py 5 Nov 2005 21:52:09 -0000 1.28 +++ test_status.py 27 Nov 2005 00:46:13 -0000 1.29 @@ -7,13 +7,15 @@ from buildbot import interfaces from buildbot.sourcestamp import SourceStamp +from buildbot.process.base import BuildRequest from buildbot.twcompat import implements, providedBy, maybeWait -from buildbot.status import builder +from buildbot.status import builder, base try: from buildbot.status import mail except ImportError: mail = None from buildbot.status import progress, client # NEEDS COVERAGE +from buildbot.test.runutils import RunMixin class MyStep: build = None @@ -668,6 +670,250 @@ self.failUnless(s.finished) +config_base = """ +from buildbot.process import factory, step +s = factory.s + +f1 = factory.QuickBuildFactory('fakerep', 'cvsmodule', configure=None) + +f2 = factory.BuildFactory([ + s(step.Dummy, timeout=1), + s(step.RemoteDummy, timeout=2), + ]) + +BuildmasterConfig = c = {} +c['bots'] = [['bot1', 'sekrit']] +c['sources'] = [] +c['schedulers'] = [] +c['builders'] = [] +c['builders'].append({'name':'quick', 'slavename':'bot1', + 'builddir': 'quickdir', 'factory': f1}) +c['slavePortnum'] = 0 +""" + +config_2 = config_base + """ +c['builders'] = [{'name': 'dummy', 'slavename': 'bot1', + 'builddir': 'dummy1', 'factory': f2}, + {'name': 'testdummy', 'slavename': 'bot1', + 'builddir': 'dummy2', 'factory': f2, 'category': 'test'}] +""" + +class STarget(base.StatusReceiver): + debug = False + + def __init__(self, mode): + self.mode = mode + self.events = [] + def announce(self): + if self.debug: + print self.events[-1] + + def builderAdded(self, name, builder): + self.events.append(("builderAdded", name, builder)) + self.announce() + if "builder" in self.mode: + return self + def builderChangedState(self, name, state): + self.events.append(("builderChangedState", name, state)) + self.announce() + def buildStarted(self, name, build): + self.events.append(("buildStarted", name, build)) + self.announce() + if "eta" in self.mode: + self.eta_build = build.getETA() + if "build" in self.mode: + return self + def buildETAUpdate(self, build, ETA): + self.events.append(("buildETAUpdate", build, ETA)) + self.announce() + def stepStarted(self, build, step): + self.events.append(("stepStarted", build, step)) + self.announce() + if 0 and "eta" in self.mode: + print "TIMES", step.getTimes() + print "ETA", step.getETA() + print "EXP", step.getExpectations() + if "step" in self.mode: + return self + def stepETAUpdate(self, build, step, ETA, expectations): + self.events.append(("stepETAUpdate", build, step, ETA, expectations)) + self.announce() + def logStarted(self, build, step, log): + self.events.append(("logStarted", build, step, log)) + self.announce() + def logFinished(self, build, step, log): + self.events.append(("logFinished", build, step, log)) + self.announce() + def stepFinished(self, build, step, results): + self.events.append(("stepFinished", build, step, results)) + if 0 and "eta" in self.mode: + print "post-EXP", step.getExpectations() + self.announce() + def buildFinished(self, name, build, results): + self.events.append(("buildFinished", name, build, results)) + self.announce() + def builderRemoved(self, name): + self.events.append(("builderRemoved", name)) + self.announce() + +class Subscription(RunMixin, unittest.TestCase): + # verify that StatusTargets can subscribe/unsubscribe properly + + def testSlave(self): + m = self.master + s = m.getStatus() + self.t1 = t1 = STarget(["builder"]) + #t1.debug = True; print + s.subscribe(t1) + self.failUnlessEqual(len(t1.events), 0) + + self.t3 = t3 = STarget(["builder", "build", "step"]) + s.subscribe(t3) + + m.loadConfig(config_2) + m.readConfig = True + m.startService() + + self.failUnlessEqual(len(t1.events), 4) + self.failUnlessEqual(t1.events[0][0:2], ("builderAdded", "dummy")) + self.failUnlessEqual(t1.events[1], + ("builderChangedState", "dummy", "offline")) + self.failUnlessEqual(t1.events[2][0:2], ("builderAdded", "testdummy")) + self.failUnlessEqual(t1.events[3], + ("builderChangedState", "testdummy", "offline")) + t1.events = [] + + self.failUnlessEqual(s.getBuilderNames(), ["dummy", "testdummy"]) + self.failUnlessEqual(s.getBuilderNames(categories=['test']), + ["testdummy"]) + self.s1 = s1 = s.getBuilder("dummy") + self.failUnlessEqual(s1.getName(), "dummy") + self.failUnlessEqual(s1.getState(), ("offline", [])) + self.failUnlessEqual(s1.getCurrentBuilds(), []) + self.failUnlessEqual(s1.getLastFinishedBuild(), None) + self.failUnlessEqual(s1.getBuild(-1), None) + #self.failUnlessEqual(s1.getEvent(-1), foo("created")) + + # status targets should, upon being subscribed, immediately get a + # list of all current builders matching their category + self.t2 = t2 = STarget([]) + s.subscribe(t2) + self.failUnlessEqual(len(t2.events), 2) + self.failUnlessEqual(t2.events[0][0:2], ("builderAdded", "dummy")) + self.failUnlessEqual(t2.events[1][0:2], ("builderAdded", "testdummy")) + + d = self.connectSlave(builders=["dummy", "testdummy"]) + d.addCallback(self._testSlave_1, t1) + return maybeWait(d) + + def _testSlave_1(self, res, t1): + self.failUnlessEqual(len(t1.events), 2) + self.failUnlessEqual(t1.events[0], + ("builderChangedState", "dummy", "idle")) + self.failUnlessEqual(t1.events[1], + ("builderChangedState", "testdummy", "idle")) + t1.events = [] + + c = interfaces.IControl(self.master) + req = BuildRequest("forced build for testing", SourceStamp()) + c.getBuilder("dummy").requestBuild(req) + d = req.waitUntilFinished() + d2 = self.master.botmaster.waitUntilBuilderIdle("dummy") + dl = defer.DeferredList([d, d2]) + dl.addCallback(self._testSlave_2) + return dl + + def _testSlave_2(self, res): + # t1 subscribes to builds, but not anything lower-level + ev = self.t1.events + self.failUnlessEqual(len(ev), 4) + self.failUnlessEqual(ev[0][0:3], + ("builderChangedState", "dummy", "building")) + self.failUnlessEqual(ev[1][0], "buildStarted") + self.failUnlessEqual(ev[2][0:2]+ev[2][3:4], + ("buildFinished", "dummy", builder.SUCCESS)) + self.failUnlessEqual(ev[3][0:3], + ("builderChangedState", "dummy", "idle")) + + self.failUnlessEqual([ev[0] for ev in self.t3.events], + ["builderAdded", + "builderChangedState", # offline + "builderAdded", + "builderChangedState", # idle + "builderChangedState", # offline + "builderChangedState", # idle + "builderChangedState", # building + "buildStarted", + "stepStarted", "stepETAUpdate", "stepFinished", + "stepStarted", "stepETAUpdate", + "logStarted", "logFinished", "stepFinished", + "buildFinished", + "builderChangedState", # idle + ]) + + b = self.s1.getLastFinishedBuild() + self.failUnless(b) + self.failUnlessEqual(b.getBuilder().getName(), "dummy") + self.failUnlessEqual(b.getNumber(), 0) + self.failUnlessEqual(b.getSourceStamp(), (None, None, None)) + self.failUnlessEqual(b.getReason(), "forced build for testing") + self.failUnlessEqual(b.getChanges(), []) + self.failUnlessEqual(b.getResponsibleUsers(), []) + self.failUnless(b.isFinished()) + self.failUnlessEqual(b.getText(), ['build', 'successful']) + self.failUnlessEqual(b.getColor(), "green") + self.failUnlessEqual(b.getResults(), builder.SUCCESS) + + steps = b.getSteps() + self.failUnlessEqual(len(steps), 2) + + eta = 0 + st1 = steps[0] + self.failUnlessEqual(st1.getName(), "dummy") + self.failUnless(st1.isFinished()) + self.failUnlessEqual(st1.getText(), ["delay", "1 secs"]) + start,finish = st1.getTimes() + self.failUnless(0.5 < (finish-start) < 10) + self.failUnlessEqual(st1.getExpectations(), []) + self.failUnlessEqual(st1.getLogs(), []) + eta += finish-start + + st2 = steps[1] + self.failUnlessEqual(st2.getName(), "remote dummy") + self.failUnless(st2.isFinished()) + self.failUnlessEqual(st2.getText(), + ["remote", "delay", "2 secs"]) + start,finish = st2.getTimes() + self.failUnless(1.5 < (finish-start) < 10) + eta += finish-start + self.failUnlessEqual(st2.getExpectations(), [('output', 38, None)]) + logs = st2.getLogs() + self.failUnlessEqual(len(logs), 1) + self.failUnlessEqual(logs[0].getName(), "log") + self.failUnlessEqual(logs[0].getText(), "data") + + self.eta = eta + # now we run it a second time, and we should have an ETA + + self.t4 = t4 = STarget(["builder", "build", "eta"]) + self.master.getStatus().subscribe(t4) + c = interfaces.IControl(self.master) + req = BuildRequest("forced build for testing", SourceStamp()) + c.getBuilder("dummy").requestBuild(req) + d = req.waitUntilFinished() + d2 = self.master.botmaster.waitUntilBuilderIdle("dummy") + dl = defer.DeferredList([d, d2]) + dl.addCallback(self._testSlave_3) + return dl + + def _testSlave_3(self, res): + t4 = self.t4 + eta = self.eta + self.failUnless(eta-1 < t4.eta_build < eta+1, # should be 3 seconds + "t4.eta_build was %g, not in (%g,%g)" + % (t4.eta_build, eta-1, eta+1)) + + class Client(unittest.TestCase): def testAdaptation(self): b = builder.BuilderStatus("bname") From warner at users.sourceforge.net Sun Nov 27 00:46:15 2005 From: warner at users.sourceforge.net (Brian Warner) Date: Sun, 27 Nov 2005 00:46:15 +0000 Subject: [Buildbot-commits] buildbot/buildbot/status builder.py,1.72,1.73 Message-ID: Update of /cvsroot/buildbot/buildbot/buildbot/status In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3585/buildbot/status Modified Files: builder.py Log Message: Revision: arch at buildbot.sf.net--2004/buildbot--dev--0--patch-444 Creator: Brian Warner fix StatusReceiver unsubscribe bug * buildbot/status/builder.py (BuildStepStatus.unsubscribe): make sure that unsubscribe works even if we never sent an ETA update. Also, don't explode on duplicate unsubscribe. (BuildStepStatus.addLog): make the convenience "return self"-added watcher automatically unsubscribe when the Step finishes. (BuildStatus.unsubscribe): same handle-duplicate-unsubscribe (BuildStatus.stepStarted): same auto-unsubscribe (BuilderStatus.buildStarted): same auto-unsubscribe * buildbot/interfaces.py (IStatusReceiver.buildStarted): document auto-unsubscribe (IStatusReceiver.stepStarted): same (IStatusReceiver.logStarted): same * buildbot/test/test_run.py (Status): move the Status test.. * buildbot/test/test_status.py (Subscription): .. to here Index: builder.py =================================================================== RCS file: /cvsroot/buildbot/buildbot/buildbot/status/builder.py,v retrieving revision 1.72 retrieving revision 1.73 diff -u -d -r1.72 -r1.73 --- builder.py 5 Nov 2005 22:53:00 -0000 1.72 +++ builder.py 27 Nov 2005 00:46:13 -0000 1.73 @@ -802,9 +802,11 @@ updateInterval) def unsubscribe(self, receiver): - self.watchers.remove(receiver) - if self.updates[receiver] is not None: - self.updates[receiver].cancel() + if receiver in self.watchers: + self.watchers.remove(receiver) + if receiver in self.updates: + if self.updates[receiver] is not None: + self.updates[receiver].cancel() del self.updates[receiver] @@ -830,6 +832,8 @@ receiver = w.logStarted(self.build, self, log) if receiver: log.subscribe(receiver, True) + d = log.waitUntilFinished() + d.addCallback(lambda log: log.unsubscribe(receiver)) d = log.waitUntilFinished() d.addCallback(self.logFinished) return log @@ -1060,9 +1064,11 @@ updateInterval) def unsubscribe(self, receiver): - self.watchers.remove(receiver) - if self.updates[receiver] is not None: - self.updates[receiver].cancel() + if receiver in self.watchers: + self.watchers.remove(receiver) + if receiver in self.updates: + if self.updates[receiver] is not None: + self.updates[receiver].cancel() del self.updates[receiver] # methods for the base.Build to invoke @@ -1138,6 +1144,9 @@ step.subscribe(receiver[0], receiver[1]) else: step.subscribe(receiver) + d = step.waitUntilFinished() + d.addCallback(lambda step: step.unsubscribe(receiver)) + step.waitUntilFinished().addCallback(self._stepFinished) def _stepFinished(self, step): @@ -1586,6 +1595,9 @@ s.subscribe(receiver[0], receiver[1]) else: s.subscribe(receiver) + d = s.waitUntilFinished() + d.addCallback(lambda s: s.unsubscribe(receiver)) + def _buildFinished(self, s): assert s in self.currentBuilds From warner at users.sourceforge.net Sun Nov 27 01:34:33 2005 From: warner at users.sourceforge.net (Brian Warner) Date: Sun, 27 Nov 2005 01:34:33 +0000 Subject: [Buildbot-commits] buildbot/buildbot __init__.py,1.18,1.19 Message-ID: Update of /cvsroot/buildbot/buildbot/buildbot In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11779/buildbot Modified Files: __init__.py Log Message: Revision: arch at buildbot.sf.net--2004/buildbot--dev--0--patch-446 Creator: Brian Warner release 0.7.1 * buildbot/__init__.py (version): Releasing buildbot-0.7.1 * docs/buildbot.texinfo: set version number to match * NEWS: update for 0.7.1 Index: __init__.py =================================================================== RCS file: /cvsroot/buildbot/buildbot/buildbot/__init__.py,v retrieving revision 1.18 retrieving revision 1.19 diff -u -d -r1.18 -r1.19 --- __init__.py 26 Oct 2005 20:22:50 -0000 1.18 +++ __init__.py 27 Nov 2005 01:34:31 -0000 1.19 @@ -1,3 +1,3 @@ #! /usr/bin/python -version = "0.7.0+" +version = "0.7.1" From warner at users.sourceforge.net Sun Nov 27 01:34:34 2005 From: warner at users.sourceforge.net (Brian Warner) Date: Sun, 27 Nov 2005 01:34:34 +0000 Subject: [Buildbot-commits] buildbot/docs buildbot.texinfo,1.30,1.31 Message-ID: Update of /cvsroot/buildbot/buildbot/docs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11779/docs Modified Files: buildbot.texinfo Log Message: Revision: arch at buildbot.sf.net--2004/buildbot--dev--0--patch-446 Creator: Brian Warner release 0.7.1 * buildbot/__init__.py (version): Releasing buildbot-0.7.1 * docs/buildbot.texinfo: set version number to match * NEWS: update for 0.7.1 Index: buildbot.texinfo =================================================================== RCS file: /cvsroot/buildbot/buildbot/docs/buildbot.texinfo,v retrieving revision 1.30 retrieving revision 1.31 diff -u -d -r1.30 -r1.31 --- buildbot.texinfo 26 Nov 2005 02:09:24 -0000 1.30 +++ buildbot.texinfo 27 Nov 2005 01:34:31 -0000 1.31 @@ -1,7 +1,7 @@ \input texinfo @c -*-texinfo-*- @c %**start of header @setfilename buildbot.info - at settitle BuildBot Manual 0.7.0+ + at settitle BuildBot Manual 0.7.1 @c %**end of header @copying From warner at users.sourceforge.net Sun Nov 27 01:34:34 2005 From: warner at users.sourceforge.net (Brian Warner) Date: Sun, 27 Nov 2005 01:34:34 +0000 Subject: [Buildbot-commits] buildbot ChangeLog,1.561,1.562 NEWS,1.49,1.50 Message-ID: Update of /cvsroot/buildbot/buildbot In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11779 Modified Files: ChangeLog NEWS Log Message: Revision: arch at buildbot.sf.net--2004/buildbot--dev--0--patch-446 Creator: Brian Warner release 0.7.1 * buildbot/__init__.py (version): Releasing buildbot-0.7.1 * docs/buildbot.texinfo: set version number to match * NEWS: update for 0.7.1 Index: ChangeLog =================================================================== RCS file: /cvsroot/buildbot/buildbot/ChangeLog,v retrieving revision 1.561 retrieving revision 1.562 diff -u -d -r1.561 -r1.562 --- ChangeLog 27 Nov 2005 00:46:13 -0000 1.561 +++ ChangeLog 27 Nov 2005 01:34:31 -0000 1.562 @@ -1,5 +1,12 @@ 2005-11-26 Brian Warner + * buildbot/__init__.py (version): Releasing buildbot-0.7.1 + * docs/buildbot.texinfo: set version number to match + +2005-11-26 Brian Warner + + * NEWS: update for 0.7.1 + * buildbot/status/builder.py (BuildStepStatus.unsubscribe): make sure that unsubscribe works even if we never sent an ETA update. Also, don't explode on duplicate unsubscribe. Index: NEWS =================================================================== RCS file: /cvsroot/buildbot/buildbot/NEWS,v retrieving revision 1.49 retrieving revision 1.50 diff -u -d -r1.49 -r1.50 --- NEWS 26 Nov 2005 02:46:33 -0000 1.49 +++ NEWS 27 Nov 2005 01:34:31 -0000 1.50 @@ -1,8 +1,8 @@ User visible changes in Buildbot. -* Release ?.?.? (??) +* Release 0.7.1 (26 Nov 2005) -** New Features +** new features *** scheduler.Nightly @@ -32,10 +32,11 @@ Added the word "[branch]" to the VC step's description (used in the Step's box on the Waterfall page, among others) when we're checking out a -non-default branch. Also add "rNNN" to indicate which revision is being -checked out. Thanks to Brad Hards and Nathaniel Smith for the suggestion. +non-default branch. Also add "rNNN" where appropriate to indicate which +revision is being checked out. Thanks to Brad Hards and Nathaniel Smith for +the suggestion. -** Bugs +** bugs fixed Several patches from Dobes Vandermeer: Escape the URLs in email, in case they have spaces and such. Fill otherwise-empty elements, as a workaround for @@ -66,6 +67,25 @@ would fail to prevent simultaneous execution of Builds or Steps. This has been fixed. +** other changes + +For a long time, certain StatusReceiver methods (like buildStarted and +stepStarted) have been able to return another StatusReceiver instance +(usually 'self') to indicate that they wish to subscribe to events within the +new object. For example, if the buildStarted() method returns 'self', the +status receiver will also receive events for the new build, like +stepStarted() and buildETAUpdate(). Returning a 'self' from buildStarted() is +equivalent to calling build.subscribe(self). + +Starting with buildbot-0.7.1, this auto-subscribe convenience will also +register to automatically unsubscribe the target when the build or step has +finished, just as if build.unsubscribe(self) had been called. Also, the +unsubscribe() method has been changed to not explode if the same receiver is +unsubscribed multiple times. (note that it will still explode is the same +receiver is *subscribed* multiple times, so please continue to refrain from +doing that). + + * Release 0.7.0 (24 Oct 2005) ** new features From warner at users.sourceforge.net Sun Nov 27 02:26:03 2005 From: warner at users.sourceforge.net (Brian Warner) Date: Sun, 27 Nov 2005 02:26:03 +0000 Subject: [Buildbot-commits] site manual-0.7.1.html,NONE,1.1 ChangeLog,1.23,1.24 NEWS,1.9,1.10 index.html,1.50,1.51 Message-ID: Update of /cvsroot/buildbot/site In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19739 Modified Files: ChangeLog NEWS index.html Added Files: manual-0.7.1.html Log Message: update for 0.7.1 Index: ChangeLog =================================================================== RCS file: /cvsroot/buildbot/site/ChangeLog,v retrieving revision 1.23 retrieving revision 1.24 diff -u -d -r1.23 -r1.24 --- ChangeLog 25 Oct 2005 03:53:20 -0000 1.23 +++ ChangeLog 27 Nov 2005 02:26:01 -0000 1.24 @@ -1,3 +1,246 @@ +2005-11-26 Brian Warner + + * buildbot/__init__.py (version): Releasing buildbot-0.7.1 + * docs/buildbot.texinfo: set version number to match + +2005-11-26 Brian Warner + + * NEWS: update for 0.7.1 + + * buildbot/status/builder.py (BuildStepStatus.unsubscribe): make + sure that unsubscribe works even if we never sent an ETA update. + Also, don't explode on duplicate unsubscribe. + (BuildStepStatus.addLog): make the convenience "return self"-added + watcher automatically unsubscribe when the Step finishes. + (BuildStatus.unsubscribe): same handle-duplicate-unsubscribe + (BuildStatus.stepStarted): same auto-unsubscribe + (BuilderStatus.buildStarted): same auto-unsubscribe + + * buildbot/interfaces.py (IStatusReceiver.buildStarted): document + auto-unsubscribe + (IStatusReceiver.stepStarted): same + (IStatusReceiver.logStarted): same + + * buildbot/test/test_run.py (Status): move the Status test.. + * buildbot/test/test_status.py (Subscription): .. to here + +2005-11-25 Brian Warner + + * NEWS: more updates + + * buildbot/locks.py: fix the problem in which loading a master.cfg + file that changes some Builders (but not all of them) can result + in having multiple copies of the same Lock. Now, the real Locks + are kept in a table inside the BotMaster, and the Builders/Steps + use "LockIDs", which are still instances of MasterLock and + SlaveLock. The real Locks are instances of the new RealMasterLock + and RealSlaveLock classes. + * buildbot/master.py (BotMaster.getLockByID): new method to + convert LockIDs into real Locks. + * buildbot/process/base.py (Build.startBuild): convert LockIDs + into real Locks before building + * buildbot/process/step.py (BuildStep.startStep): same + * buildbot/test/test_locks.py (Locks.testLock1a): add a test which + exercises the problem + + + * docs/buildbot.texinfo (Scheduler Types): give a few hints about + what Schedulers are available + + * buildbot/scheduler.py (Nightly): add new Scheduler based upon + work by Dobes Vandermeer and hacked mercilessly by me. This offers + 'cron'-style build scheduling at certain times of day, week, + month, or year. + * buildbot/test/test_scheduler.py (Scheduling.testNightly): test it + + * buildbot/scheduler.py (Scheduler): change fileIsImportant + handling: treat self.fileIsImportant more as an attribute that + contains a callable than as a method. If the attribute is None, + don't call it and assume all filenames are important. It is still + possible to provide a fileIsImportant method in a subclass, + however. + (AnyBranchScheduler): handle fileIsImportant=None, previously it + was broken + * buildbot/test/test_scheduler.py (Scheduling.testAnyBranch2): + test using AnyBranchScheduler with fileIsImportant=None + +2005-11-24 Brian Warner + + * buildbot/test/test_config.py (StartService): don't claim a fixed + port number, instead set slavePort=0 on the first pass, figure out + what port was allocated, then switch to a config file that uses + the allocated port. + + * buildbot/master.py (BuildMaster.loadConfig): close the old + slaveport before opening the new one, because unit tests might + replace slavePort=0 with the same allocated portnumber, and if we + don't wait for the old port to close first, we get a "port already + in use" error. There is a tiny race condition here, but the only + threat is from other programs that bind (statically) to the same + port number we happened to be allocated, and only if those + programs use SO_REUSEADDR, and only if they get control in between + reactor turns. + + * Makefile (TRIALARGS): update to handle Twisted > 2.1.0 + + * buildbot/master.py (BuildMaster.loadConfig_Sources): remove all + deleted ChangeSources before adding any new ones + * buildbot/changes/freshcvs.py (FreshCVSSourceNewcred): fix + compare_attrs, to make sure that a config-file reload does not + unnecessarily replace an unmodified ChangeSource instance + * buildbot/test/test_config.py (ConfigTest.testSources): update + + * buildbot/scheduler.py (AnyBranchScheduler): fix branches=[] to + mean "don't build anything", and add a warning if it gets used + because it isn't actually useful. + + * contrib/svn_buildbot.py: update example usage to match the port + number that gets used by the PBChangeSource + * buildbot/scripts/sample.cfg: add example of PBChangeSource + +2005-11-22 Brian Warner + + * NEWS: start collecting items for next release + + * buildbot/process/step.py (SVN.computeSourceRevision): assume + revisions are strings + (P4Sync.computeSourceRevision): same + + * buildbot/status/html.py (StatusResourceBuild.body): add a link + to the Buildbot's overall status page + (StatusResourceBuilder.body): same + +2005-11-15 Brian Warner + + * buildbot/master.py (BuildMaster.loadConfig): serialize the + config-file loading, specifically to make sure old StatusTargets + are finished shutting down before new ones start up (thus + resolving a bug in which changing the Waterfall object would fail + because both new and old instances were claiming the same + listening port). Also load new Schedulers after all the new + Builders are set up, in case they fire off a new build right away. + * buildbot/test/test_config.py (StartService): test it + + * buildbot/status/mail.py (MailNotifier.buildMessage): oops, add + the branch name to the mail body + + * buildbot/changes/pb.py (PBChangeSource.compare_attrs): add this. + Without it, a config-file reload fails to update an existing + PBChangeSource. + * buildbot/changes/freshcvs.py (FreshCVSSourceNewcred): add + username/passwd to compare_attrs, for the same reason + * buildbot/status/html.py (Waterfall): add favicon to + compare_attrs, same reason + +2005-11-05 Brian Warner + + * buildbot/scripts/tryclient.py (createJobfile): stringify the + baserev before stuffing it in the jobfile. This resolves problems + under SVN (and probably Arch) where revisions are expressed as + numbers. I'm inclined to use string-based revisions everywhere in + the future, but this fix should be safe for now. Thanks to Steven + Walter for the patch. + + * buildbot/changes/changes.py (ChangeMaster.saveYourself): use + binary mode when opening pickle files, to make windows work + better. Thanks to Dobes Vandermeer for the catch. + * buildbot/status/builder.py (BuildStatus.saveYourself): same + (BuilderStatus.getBuildByNumber): same + (Status.builderAdded): same + * buildbot/master.py (BuildMaster.loadChanges): same + + * buildbot/util.py (Swappable): delete unused leftover code + + * buildbot/process/step.py (SVN): when building on a non-default + branch, add the word "[branch]" to the VC step's description, so + it is obvious that we're not building the usual stuff. Likewise, + when we are building a specific revision, add the text "rNNN" to + indicate what that revision number is. Thanks to Brad Hards and + Nathaniel Smith for the suggestion. + (Darcs.startVC): same + (Arch.startVC): same + (Bazaar.startVC): same + + * buildbot/process/factory.py (GNUAutoconf.__init__): fix a silly + typo, caught by Mark Dillavou, closes SF#1216636. + + * buildbot/test/test_status.py (Log.TODO_testDuplicate): add notes + about a test to add some day + + * docs/examples/twisted_master.cfg: update: bot1 can now handle + the 'full-2.3' build, and the 'reactors' build is now run under + python-2.4 because the buildslave no longer has gtk/etc bindings + for earlier versions. + +2005-11-03 Brian Warner + + * buildbot/interfaces.py (IBuilderControl.resubmitBuild): new + method, takes an IBuildStatus and rebuilds it. It might make more + sense to add this to IBuildControl instead, but that instance goes + away completely once the build has finished, and resubmitting + builds can take place weeks later. + * buildbot/process/builder.py (BuilderControl.resubmitBuild): same + * buildbot/status/html.py (StatusResourceBuild): also stash an + IBuilderControl so we can use resubmitBuild. + (StatusResourceBuild.body): render "resubmit" button if we can. + Also add hrefs for each BuildStep + (StatusResourceBuild.rebuild): add action for "resubmit" button + (StatusResourceBuilder.getChild): give it an IBuilderControl + + * buildbot/status/builder.py (Status.getURLForThing): change the + URL for BuildSteps to have a "step-" prefix, so the magic URLs + that live as targets of buttons like "stop" and "rebuild" can't + collide with them. + * buildbot/status/builder.py (Status.getURLForThing): same + * buildbot/status/html.py (StatusResourceBuild.getChild): same + (StepBox.getBox): same + * buildbot/test/test_web.py (GetURL): same + (Logfile): same + + * buildbot/process/step.py (SVN.__init__): put svnurl/baseURL + exclusivity checks after Source.__init__ upcall, so misspelled + arguments will be reported more usefully + (Darcs.__init__): same + +2005-10-29 Brian Warner + + * docs/examples/twisted_master.cfg: don't double-fire the 'quick' + builder. Move the Try scheduler off to a separate port. + +2005-10-27 Brian Warner + + * buildbot/clients/gtkPanes.py + (TwoRowClient.remote_builderRemoved): disappearing Builders used + to cause the app to crash, now they don't. + + * buildbot/clients/debug.py: display the buildmaster's location + in the window's title bar + +2005-10-26 Brian Warner + + * buildbot/status/mail.py (MailNotifier): urllib.escape the URLs + in case they have spaces or whatnot. Patch from Dobes Vandermeer. + * buildbot/test/test_status.py (MyStatus.getURLForThing): fix it + + * buildbot/status/html.py (td): put a single non-breaking space + inside otherwise empty elements, as a workaround for buggy + browsers which would optimize them away (along with any associated + styles, like the kind that create the waterfall grid borders). + Patch from Frerich Raabe. + + * buildbot/process/step_twisted.py (Trial): expose the trialMode= + argv-list as an argument, defaulting to ["-to"], which is + appropriate for the Trial that comes with Twisted-2.1.0 and + earlier. The Trial in current Twisted SVN wants + ["--reporter=bwverbose"] instead. Also expose trialArgs=, which + defaults to an empty list. + * buildbot/process/process_twisted.py (TwistedTrial.trialMode): + match it, now that trialMode= is a list instead of a single string + + * buildbot/__init__.py (version): bump to 0.7.0+ while between + releases + * docs/buildbot.texinfo: same + 2005-10-24 Brian Warner * buildbot/__init__.py (version): Releasing buildbot-0.7.0 Index: NEWS =================================================================== RCS file: /cvsroot/buildbot/site/NEWS,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- NEWS 25 Oct 2005 03:53:20 -0000 1.9 +++ NEWS 27 Nov 2005 02:26:01 -0000 1.10 @@ -1,5 +1,91 @@ User visible changes in Buildbot. +* Release 0.7.1 (26 Nov 2005) + +** new features + +*** scheduler.Nightly + +Dobes Vandermeer contributed a cron-style 'Nightly' scheduler. Unlike the +more-primitive Periodic class (which only lets you specify the duration +between build attempts), Nightly lets you schedule builds for specific times +of day, week, month, or year. The interface is very much like the crontab(5) +file. See the buildbot.scheduler.Nightly docstring for complete details. + +** minor new features + +*** step.Trial can work with Trial from Twisted >2.1.0 + +The 'Trial' step now accepts the trialMode= argument, which should be a list +of strings to be added to trial's argv array. This defaults to ["-to"], which +is appropriate for the Trial that ships in Twisted-2.1.0 and earlier, and +tells Trial to emit non-colorized verbose output. To use this step with +trials from later versions of Twisted, this should be changed to +["--reporter=bwverbose"]. + +In addition, you can now set other Trial command-line parameters through the +trialArgs= argument. This is a list of strings, and defaults to an empty list. + +*** Added a 'resubmit this build' button to the web page + +*** Make the VC-checkout step's description more useful + +Added the word "[branch]" to the VC step's description (used in the Step's +box on the Waterfall page, among others) when we're checking out a +non-default branch. Also add "rNNN" where appropriate to indicate which +revision is being checked out. Thanks to Brad Hards and Nathaniel Smith for +the suggestion. + +** bugs fixed + +Several patches from Dobes Vandermeer: Escape the URLs in email, in case they +have spaces and such. Fill otherwise-empty elements, as a workaround for +buggy browsers that might optimize them away. Also use binary mode when +opening status pickle files, to make windows work better. The +AnyBranchScheduler now works even when you don't provide a fileIsImportant= +argument. + +Stringify the base revision before stuffing it into a 'try' jobfile, helping +SVN and Arch implement 'try' builds better. Thanks to Steven Walter for the +patch. + +Fix the compare_attrs list in PBChangeSource, FreshCVSSource, and Waterfall. +Before this, certain changes to these objects in the master.cfg file were +ignored, such that you would have to stop and re-start the buildmaster to +make them take effect. + +The config file is now loaded serially, shutting down old (or replaced) +Status/ChangeSource plugins before starting new ones. This fixes a bug in +which changing an aspect of, say, the Waterfall display would cause an +exception as both old and new instances fight over the same TCP port. This +should also fix a bug whereby new Periodic Schedulers could fire a build +before the Builders have finished being added. + +There was a bug in the way Locks were handled when the config file was +reloaded: changing one Builder (but not the others) and reloading master.cfg +would result in multiple instances of the same Lock object, so the Locks +would fail to prevent simultaneous execution of Builds or Steps. This has +been fixed. + +** other changes + +For a long time, certain StatusReceiver methods (like buildStarted and +stepStarted) have been able to return another StatusReceiver instance +(usually 'self') to indicate that they wish to subscribe to events within the +new object. For example, if the buildStarted() method returns 'self', the +status receiver will also receive events for the new build, like +stepStarted() and buildETAUpdate(). Returning a 'self' from buildStarted() is +equivalent to calling build.subscribe(self). + +Starting with buildbot-0.7.1, this auto-subscribe convenience will also +register to automatically unsubscribe the target when the build or step has +finished, just as if build.unsubscribe(self) had been called. Also, the +unsubscribe() method has been changed to not explode if the same receiver is +unsubscribed multiple times. (note that it will still explode is the same +receiver is *subscribed* multiple times, so please continue to refrain from +doing that). + + * Release 0.7.0 (24 Oct 2005) ** new features Index: index.html =================================================================== RCS file: /cvsroot/buildbot/site/index.html,v retrieving revision 1.50 retrieving revision 1.51 diff -u -d -r1.50 -r1.51 --- index.html 25 Nov 2005 00:46:22 -0000 1.50 +++ index.html 27 Nov 2005 02:26:01 -0000 1.51 @@ -31,7 +31,7 @@

        Current contents:

          -
        • The current release is buildbot-0.7.0 . You can download the source +
        • The current release is buildbot-0.7.1 . You can download the source from the sf.net download page here. The release is signed with my GPG public key, available here.
        • The README file contains an overview, while the User's Manual contains complete + href="manual-0.7.1.html">User's Manual contains complete documentation.
        • Recent changes are summarized in the NEWS file, @@ -178,5 +178,5 @@ align="right" /> -Last modified: Thu Nov 24 16:45:46 PST 2005 +Last modified: Sat Nov 26 18:25:14 PST 2005 --- NEW FILE: manual-0.7.1.html --- BuildBot Manual 0.7.1