[Buildbot-commits] buildbot/buildbot interfaces.py,1.30,1.31 scheduler.py,1.6,1.7
Brian Warner
warner at users.sourceforge.net
Wed Aug 31 01:51:44 UTC 2005
Update of /cvsroot/buildbot/buildbot/buildbot
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16253/buildbot
Modified Files:
interfaces.py scheduler.py
Log Message:
Revision: arch at buildbot.sf.net--2004/buildbot--dev--0--patch-302
Creator: Brian Warner <warner at lothar.com>
add pending/upcoming builds to the HTML "Current Activity" row
* buildbot/status/html.py: add pending/upcoming builds to CurrentBox
* buildbot/interfaces.py (IScheduler.getPendingBuildTimes): new method
(IStatus.getSchedulers): new method
* buildbot/status/builder.py (BuilderStatus): track pendingBuilds
(Status.getSchedulers): implement
* buildbot/process/builder.py (Builder): maintain
BuilderStatus.pendingBuilds
* buildbot/scheduler.py (Scheduler.getPendingBuildTimes): new method
(TryBase.addChange): Try schedulers should ignore Changes
--This line, and those below, will be ignored--
Files to commit:
<can't compute list>
This list might be incomplete or outdated if editing the log
message was not invoked from an up-to-date changes buffer!
Index: interfaces.py
===================================================================
RCS file: /cvsroot/buildbot/buildbot/buildbot/interfaces.py,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -d -r1.30 -r1.31
--- interfaces.py 18 Aug 2005 08:30:00 -0000 1.30
+++ interfaces.py 31 Aug 2005 01:51:41 -0000 1.31
@@ -48,6 +48,15 @@
"""Return a list of strings indicating the Builders that this
Scheduler might feed."""
+ def getPendingBuildTimes():
+ """Return a list of timestamps for any builds that are waiting in the
+ tree-stable-timer queue. This is only relevant for Change-based
+ schedulers, all others can just return an empty list."""
+ # TODO: it might be nice to make this into getPendingBuildSets, which
+ # would let someone subscribe to the buildset being finished.
+ # However, the Scheduler doesn't actually create the buildset until
+ # it gets submitted, so doing this would require some major rework.
+
class IUpstreamScheduler(Interface):
"""This marks an IScheduler as being eligible for use as the 'upstream='
argument to a buildbot.scheduler.Dependent instance."""
@@ -88,6 +97,10 @@
"""Return the URL of the top-most Buildbot status page, or None if
this Buildbot does not provide a web status page."""
+ def getSchedulers():
+ """Return a list of ISchedulerStatus objects for all
+ currently-registered Schedulers."""
+
def getBuilderNames(categories=None):
"""Return a list of the names of all current Builders."""
def getBuilder(name):
Index: scheduler.py
===================================================================
RCS file: /cvsroot/buildbot/buildbot/buildbot/scheduler.py,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- scheduler.py 18 Aug 2005 08:30:00 -0000 1.6
+++ scheduler.py 31 Aug 2005 01:51:41 -0000 1.7
@@ -116,6 +116,11 @@
def listBuilderNames(self):
return self.builderNames
+ def getPendingBuildTimes(self):
+ if self.nextBuildTime is not None:
+ 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
@@ -225,6 +230,13 @@
def listBuilderNames(self):
return self.builderNames
+ def getPendingBuildTimes(self):
+ bts = []
+ for s in self.schedulers.values():
+ if s.nextBuildTime is not None:
+ bts.append(s.nextBuildTime)
+ return bts
+
def addChange(self, change):
branch = change.branch
if self.branches and branch not in self.branches:
@@ -263,6 +275,10 @@
def listBuilderNames(self):
return self.builderNames
+ def getPendingBuildTimes(self):
+ # report the upstream's value
+ return self.upstream.getPendingBuildTimes()
+
def startService(self):
service.MultiService.startService(self)
self.upstream.subscribeToSuccessfulBuilds(self.upstreamBuilt)
@@ -302,6 +318,11 @@
def listBuilderNames(self):
return self.builderNames
+ def getPendingBuildTimes(self):
+ # TODO: figure out when self.timer is going to fire next and report
+ # that
+ return []
+
def doPeriodicBuild(self):
bs = buildset.BuildSet(self.builderNames,
SourceStamp(branch=self.branch))
@@ -322,6 +343,14 @@
def listBuilderNames(self):
return self.builderNames
+ def getPendingBuildTimes(self):
+ # we can't predict what the developers are going to do in the future
+ return []
+
+ def addChange(self, change):
+ # Try schedulers ignore Changes
+ pass
+
class BadJobfile(Exception):
pass
More information about the Commits
mailing list