[Buildbot-commits] buildbot ChangeLog,1.319,1.320

Brian Warner warner at users.sourceforge.net
Fri Dec 3 22:54:52 UTC 2004


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

Modified Files:
	ChangeLog 
Log Message:
Make commands (and builds) interruptible. Improve lost-slave behavior.
Merging in several days of changes from local Arch branch, see ChangeLog for
details about individual files.


Index: ChangeLog
===================================================================
RCS file: /cvsroot/buildbot/buildbot/ChangeLog,v
retrieving revision 1.319
retrieving revision 1.320
diff -u -d -r1.319 -r1.320
--- ChangeLog	28 Nov 2004 01:53:52 -0000	1.319
+++ ChangeLog	3 Dec 2004 22:54:50 -0000	1.320
@@ -1,3 +1,140 @@
+2004-12-03  Brian Warner  <warner at lothar.com>
+
+	* buildbot/master.py: clean up slave-handling code, to handle
+	slave-disconnect and multiple-connect better
+	(BotPerspective): make these long-lasting, exactly one per bot
+	listed in the config file.
+	(BotPerspective.attached): if a slave connects while an existing
+	one appears to still be connected, disconnect the old one first.
+	(BotPerspective.disconnect): new method to forcibly disconnect a
+	buildslave. Use some hacks to empty the transmit buffer quickly to
+	avoid the long (20-min?) TCP timeout that could occur if the old
+	slave has dropped off the net.
+	(BotMaster): Keep persistent BotPerspectives in .slaves, let them
+	own their own SlaveStatus objects. Remove .attached/.detached, add
+	.addSlave/.removeSlave, treat slaves like Builders (config file
+	parsing sends deltas to the BotMaster). Inform the slave
+	instances, i.e. the BotPerspective, about addBuilder and
+	removeBuilder.
+	(BotMaster.getPerspective): turns into a single dict lookup
+	(Dispatcher.requestAvatar): allow .attached to return a Deferred,
+	which gives BotPerspective.attached a chance to disconnect the old
+	slave first.
+	(BuildMaster.loadConfig): add code (disabled) to validate that all
+	builders use known slaves (listed in c['bots']). The check won't
+	work with tuple-specified builders, which are deprecated but not
+	yet invalid, so the check is disabled for now.
+	(BuildMaster.loadConfig_Slaves): move slave-config into a separate
+	routine, do the add/changed/removed dance with them like we do
+	with builders.
+	(BuildMaster.loadConfig_Sources): move source-config into a
+	separate routine too
+
+	* buildbot/status/builder.py (Status.getSlave): get the
+	SlaveStatus object from the BotPerspective, not the BotMaster.
+
+	* buildbot/test/test_run.py: bunch of new tests for losing the
+	buildslave at various points in the build, handling a slave that
+	connects multiple times, and making sure we can interrupt a
+	running build
+
+	* buildbot/slave/bot.py (BuildSlave): make it possible to use
+	something other than 'Bot' for the Bot object, to make certain
+	test cases easier to write.
+	(BuildSlave.waitUntilDisconnected): utility method for testing
+
+2004-11-30  Brian Warner  <warner at lothar.com>
+
+	* buildbot/test/test_run.py (RunMixin): refactor, remove debug msg
+
+	* buildbot/interfaces.py (IBuilderControl.ping): add timeout=
+	argument, return a Deferred that always fires with True or False.
+	I don't use an errback to indicate 'ping failed' so that callers
+	are free to ignore the deferred without causing spurious errors in
+	the logs.
+	* buildbot/process/builder.py (BuilderControl.ping): implement it
+
+	* buildbot/test/test_run.py (Status.testDisappear): test ping
+	(Status.disappearSlave): fix it
+
+2004-11-30  Brian Warner  <warner at lothar.com>
+
+	* buildbot/interfaces.py (IBuildControl): add .stopBuild
+	(IBuilderControl): add .getBuild(num), only works for the current
+	build, of course, although it might be interesting to offer
+	something for builds in the .waiting or .interlocked state.
+
+	* buildbot/process/base.py (Build): have .stopBuild just do the
+	interrupt, then let the build die by itself.
+	(BuildControl): add .stopBuild, and add a point-event named
+	'interrupt' just after the build so status viewers can tell that
+	someone killed it.
+	(BuilderControl): add .getBuild
+
+	* buildbot/process/step.py (Dummy): use haltOnFailure so it really
+	stops when you kill it, good for testing
+	(ShellCommand.interrupt): add a logfile named 'interrupt' which
+	contains the 'reason' text.
+
+	* buildbot/status/html.py: Add Stop Build button, if the build can
+	still be stopped. Send a Redirect (to the top page) one second
+	later, hopefully long enough for the interrupt to have an effect.
+	Move make_row() up to top-level to share it between Stop Build and
+	Force Build.
+
+	* buildbot/slave/commands.py: only kill the child process once
+
+	* buildbot/test/test_run.py: add testInterrupt
+
+2004-11-29  Brian Warner  <warner at lothar.com>
+
+	* buildbot/process/base.py: Refactor command interruption. The
+	Build is now responsible for noticing that the slave has gone
+	away: Build.lostRemote() interrupts the current step and makes
+	sure that no further ones will be started.
+	
+	* buildbot/process/builder.py: When the initial remote_startBuild
+	message fails, log it: this usually indicates that the slave has
+	gone away, but we don't really start paying attention until they
+	fail to respond to the first step's command.
+
+	* buildbot/process/step.py (RemoteCommand): Does *not* watch for
+	slave disconnect. Now sports a new interrupt() method. Error
+	handling was simplified a lot by chaining deferreds, so
+	remoteFailed/remoteComplete were merged into a single
+	remoteComplete method (which can now get a Failure object).
+	Likewise failed/finished were merged into just _finished.
+	(BuildStep): Add interrupt(why) method, and if why is a
+	ConnectionLost Failure then the step is failed with some useful
+	error text.
+
+	* buildbot/slave/bot.py: stop the current command when the remote
+	Step reference is lost, and when the slave is shut down.
+	(Bot): make it a MultiService, so it can have children. Use
+	stopService to tell when the slave is shutting down.
+	(SlaveBuilder): make it a Service, and a child of the Bot. Add
+	remote_interruptCommand (which asks the current SlaveCommand to
+	stop but allows it to keep emitting status messages), and
+	stopCommand (which tells it to shut up and die).
+
+	* buildbot/slave/commands.py: make commands interruptible
+	(ShellCommand.kill): factor out os.kill logic
+	(Command): factor out setup()
+	(Command.sendStatus): don't send status if .running is false, this
+	happens when the command has been halted.
+	(Command.interrupt): new method, used to tell the command to die
+	(SlaveShellCommand): implement .interrupt
+	(DummyCommand): implement .interrupt
+	(SourceBase, etc): factor out setup(), don't continue substeps if
+	.interrupted is set
+
+	* buildbot/status/builder.py: fix all waitUntilFinished() methods
+	so they can be called after finishing
+
+	* buildbot/test/test_run.py: new tests for disconnect behavior,
+	refactor slave-shutdown routines, add different kinds of
+	slave-shutdown
+
 2004-11-27  Brian Warner  <warner at lothar.com>
 
 	* buildbot/status/words.py (IrcStatusBot.convertTime): utility





More information about the Commits mailing list