[Buildbot-commits] buildbot/buildbot/process base.py,1.46,1.47 builder.py,1.23,1.24

Brian Warner warner at users.sourceforge.net
Fri Apr 22 21:29:22 UTC 2005


Update of /cvsroot/buildbot/buildbot/buildbot/process
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15396/buildbot/process

Modified Files:
	base.py builder.py 
Log Message:
Revision: arch at buildbot.sf.net--2004/buildbot--dev--0--patch-69
Creator:  Brian Warner <warner at monolith.lothar.com>

fix propagation of changes to .builddir

2005-04-22  Brian Warner  <warner at lothar.com>

   * buildbot/test/test_run.py (RunMixin.shutdownSlave): remove the
   whendone= argument, just return the Deferred and let the caller do
   what they want with it.
   (Disconnect.testBuild1): wait for shutdownSlave
   (Basedir.testChangeBuilddir): new test to make sure changes to the
   builddir actually get propagated to the slave

   * buildbot/slave/bot.py (SlaveBuilder.setBuilddir): use an
   explicit method, rather than passing the builddir in __init__ .
   Make sure to update self.basedir too, this was broken before.
   (Bot.remote_setBuilderList): use b.setBuilddir for both new
   builders and for ones that have just had their builddir changed.
   (BotFactory): add a class-level .perspective attribute, so
   BuildSlave.waitUntilDisconnected won't get upset when the
   connection hasn't yet been established
   (BuildSlave.__init__): keep track of the bot.Bot instance, so
   tests can reach through it to inspect the SlaveBuilders

   * buildbot/process/base.py (Build.buildException): explain the
   log.err with a log.msg
   * buildbot/process/builder.py (Builder.startBuild): same
   (Builder._startBuildFailed): improve error message

   * buildbot/pbutil.py (RBCP.failedToGetPerspective): if the failure
   occurred because we lost the brand-new connection, retry instead
   of giving up. If not, it's probably an authorization failure, and
   it makes sense to stop trying. Make sure we log.msg the reason
   that we're log.err'ing the failure, otherwise test failures are
   really hard to figure out.

   * buildbot/master.py: change loadConfig() to return a Deferred
   that doesn't fire until the change has been fully implemented.
   This means any connected slaves have been updated with the new
   builddir. This change makes it easier to test the code which
   actually implements this builddir-updating.
   (BotPerspective.addBuilder): return Deferred
   (BotPerspective.removeBuilder): same
   (BotPerspective.attached): same
   (BotPerspective._attached): same. finish with remote_print before
   starting the getSlaveInfo, instead of doing them in parallel
   (BotPerspective.list_done): same
   (BotMaster.removeSlave): same. Fix the typo that meant we weren't
   actually calling slave.disconnect()
   (BotMaster.addBuilder): same
   (BotMaster.removeBuilder): same
   (BuildMaster.loadConfig): same
   (BuildMaster.loadConfig_Slaves): same
   (BuildMaster.loadConfig_Sources): same
   (BuildMaster.loadConfig_Builders): same
   (BuildMaster.loadConfig_status): same

   * buildbot/changes/changes.py (ChangeMaster.removeSource): return
   a Deferred that fires when the source is finally removed


Index: base.py
===================================================================
RCS file: /cvsroot/buildbot/buildbot/buildbot/process/base.py,v
retrieving revision 1.46
retrieving revision 1.47
diff -u -d -r1.46 -r1.47
--- base.py	19 Apr 2005 07:45:11 -0000	1.46
+++ base.py	22 Apr 2005 21:29:19 -0000	1.47
@@ -466,6 +466,7 @@
         return self.buildFinished(text, color, self.result)
 
     def buildException(self, why):
+        log.msg("%s.buildException" % self)
         log.err(why)
         self.buildFinished(["build", "exception"], "#c000c0", FAILURE)
 

Index: builder.py
===================================================================
RCS file: /cvsroot/buildbot/buildbot/buildbot/process/builder.py,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -d -r1.23 -r1.24
--- builder.py	19 Apr 2005 07:45:19 -0000	1.23
+++ builder.py	22 Apr 2005 21:29:19 -0000	1.24
@@ -357,12 +357,16 @@
         # Finally it will start the actual build process.
         d = build.startBuild(bs, self.expectations, self.remote)
         d.addCallback(self.buildFinished)
-        d.addErrback(log.err)
+        d.addErrback(self._buildNotFinished)
         control = base.BuildControl(build)
         return control
 
+    def _buildNotFinished(self, why):
+        log.msg("_buildNotFinished")
+        log.err()
+
     def _startBuildFailed(self, why, build):
-        log.msg("wanted to start build %s, but "
+        log.msg("I tried to tell the slave that the build %s started, but "
                 "remote_startBuild failed: %s" % (build, why))
 
     def testsFinished(self, results):





More information about the Commits mailing list