[Buildbot-commits] buildbot/buildbot master.py,1.50,1.51 interfaces.py,1.17,1.18

Brian Warner warner at users.sourceforge.net
Thu Sep 30 07:13:42 UTC 2004


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

Modified Files:
	master.py interfaces.py 
Log Message:
* buildbot/interfaces.py (IStatusLogStub): split out some of the IStatusLog
methods into an Interface that is implemented by "stub" logs, for which all
the actual text chunks are on disk (in the pickled Build instance). To show
the log contents, you must first adapt the stub log to a full IStatusLog
object.

* buildbot/status/builder.py (LogFileStub): create separate stub log
objects, which can be upgraded to a real one if necessary.
(LogFile): make them persistable, and let them stubify themselves
(HTMLLogFile): same
(BuildStepStatus): same
(BuildStatus): same
(BuildStatus.saveYourself): save the whole build out to disk
(BuilderStatus): make it persistable
(BuilderStatus.saveYourself): save the builder to disk
(BuilderStatus.addFullBuildToCache): implement two caches which hold Build
objects: a small one which holds full Builds, and a larger one which holds
"stubbed" Builds (ones with their LogFiles turned into LogFileStubs). This
reduces memory usage by the buildmaster by not keeping more than a few
(default is 2) whole build logs in RAM all the time.
(BuilderStatus.getBuild): rewrite to pull from disk (through the cache)
(BuilderStatus.eventGenerator): rewrite since .builds went away
(BuilderStatus.buildStarted): remove the .builds array. Add the build to the
"full" cache when it starts.
(BuilderStatus._buildFinished): save the build to disk when it finishes
(Status): give it a basedir (same as the BuildMaster's basedir) where the
builder pickles can be saved
(Status.builderAdded): create the BuilderStatus ourselves, by loading a
pickle from disk (or creating a new instance if there was none on disk).
Return the BuilderStatus so the master can glue it into the new Builder
object.

* buildbot/master.py (BotMaster.stopService): on shutdown, tell all
BuilderStatuses to save themselves out to disk. This is in lieu of saving
anything important in the main Application pickle (the -shutdown.tap file).
(BuildMaster.__init__): give Status() a basedir for its files
(BuildMaster.loadConfig_Builders): do status.builderAdded first, to get the
BuilderStatus, then give it to the Builder (instead of doing it the other
way around). It's ok if the status announces the new Builder before it's
really ready, as the outside world can only see the BuilderStatus object
anyway (and it is ready before builderAdded returns). Use the builder's
"builddir" (which normally specifies where the slave will run the builder)
as the master's basedir (for saving serialized builds).

* buildbot/status/html.py (StatusResourceBuildStep.getChild): coerce the
logfile to IStatusLog before trying to get the text chunks out of it. This
will pull the full (non-stubified) Build in from disk if necessary.
(TextLog): fix the adapter registration

* buildbot/test/test_control.py (Force.setUp): create the basedir
* buildbot/test/test_web.py: same
* buildbot/test/test_vc.py (SetupMixin.setUp): same
* buildbot/test/test_status.py (Mail.makeBuild): match new setup
* buildbot/test/test_run.py (Run.testMaster): same
(Status.setUp): same








More information about the Commits mailing list