[Buildbot-commits] buildbot/buildbot interfaces.py,1.29,1.30 scheduler.py,1.5,1.6

Brian Warner warner at users.sourceforge.net
Thu Aug 18 08:30:04 UTC 2005


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

Modified Files:
	interfaces.py scheduler.py 
Log Message:
Revision: arch at buildbot.sf.net--2004/buildbot--dev--0--patch-297
Creator:  Brian Warner <warner at lothar.com>

make 'try' status reporting actually work

	* buildbot/scripts/tryclient.py (Try): make 'try' status reporting
	actually work. It's functional but still kind of clunky. Also, it
	only works with the pb-style.. needs to be made to work with the
	jobdir-style too.

	* buildbot/status/client.py (RemoteBuildSet): new class
	(RemoteBuildRequest): same
	(RemoteBuild.remote_waitUntilFinished): return the RemoteBuild
	object, not the internal BuildStatus object.
	(RemoteBuild.remote_subscribe): new method to subscribe to builds
	outside of the usual buildStarted() return value.
	(BuildSubscriber): support class for RemoteBuild.remote_subscribe

	* buildbot/scheduler.py (Try_Jobdir): convey buildsetID properly
	(Try_Userpass_Perspective.perspective_try): return a remotely
	usable BuildSetStatus object

	* buildbot/interfaces.py (IBuildStatus): remove obsolete
	isStarted()/waitUntilStarted()

--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.29
retrieving revision 1.30
diff -u -d -r1.29 -r1.30
--- interfaces.py	17 Aug 2005 02:15:36 -0000	1.29
+++ interfaces.py	18 Aug 2005 08:30:00 -0000	1.30
@@ -121,8 +121,6 @@
         pass
     def getReason():
         pass
-    def getChanges():
-        pass
     def getID():
         """Return the BuildSet's ID string, if any. The 'try' feature uses a
         random string as a BuildSetID to relate submitted jobs with the
@@ -255,7 +253,7 @@
 
 class IBuildStatus(Interface):
     """I represent the status of a single Build/BuildRequest. It could be
-    finished, in-progress, or not yet started."""
+    in-progress or finished."""
 
     def getBuilder():
         """
@@ -264,15 +262,6 @@
         @rtype: implementor of L{IBuilderStatus}
         """
 
-    def isStarted():
-        """Return a boolean. True means the build has started, False means it
-        is still in the pending queue."""
-
-    def waitUntilStarted():
-        """Return a Deferred that will fire (with this IBuildStatus instance
-        as an argument) when the build starts. If the build has already
-        started, this deferred will fire right away."""
-
     def isFinished():
         """Return a boolean. True means the build has finished, False means
         it is still running."""
@@ -322,8 +311,6 @@
         make the Changes that went into it (build sheriffs, code-domain
         owners)."""
 
-    # once the build has started, the following methods become available
-
     def getNumber():
         """Within each builder, each Build has a number. Return it."""
 

Index: scheduler.py
===================================================================
RCS file: /cvsroot/buildbot/buildbot/buildbot/scheduler.py,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- scheduler.py	11 Aug 2005 08:22:17 -0000	1.5
+++ scheduler.py	18 Aug 2005 08:30:00 -0000	1.6
@@ -376,7 +376,7 @@
         patchlevel = int(patchlevel)
         patch = (patchlevel, diff)
         ss = SourceStamp(branch, baserev, patch)
-        return builderNames, ss
+        return builderNames, ss, buildsetID
 
     def messageReceived(self, filename):
         md = os.path.join(self.parent.basedir, self.jobdir)
@@ -385,7 +385,7 @@
         os.rename(os.path.join(md, "new", filename),
                   os.path.join(md, "cur", filename))
         try:
-            builderNames, ss = self.parseJob(f)
+            builderNames, ss, bsid = self.parseJob(f)
         except BadJobfile:
             log.msg("%s reports a bad jobfile in %s" % (self, filename))
             log.err()
@@ -402,7 +402,8 @@
                         % (self.builderNames,))
                 return
 
-        bs = buildset.BuildSet(builderNames, ss)
+        reason = "'try' job"
+        bs = buildset.BuildSet(builderNames, ss, reason=reason, bsid=bsid)
         self.parent.submitBuildSet(bs)
 
 class Try_Userpass(TryBase):
@@ -456,9 +457,11 @@
                         % (self.parent.builderNames,))
                 return
         ss = SourceStamp(branch, revision, patch)
-        bs = buildset.BuildSet(builderNames, ss)
-        bss = self.parent.submitBuildSet(bs)
+        reason = "'try' job from user %s" % self.username
+        bs = buildset.BuildSet(builderNames, ss, reason=reason)
+        self.parent.submitBuildSet(bs)
 
-        # TODO: return a remotely-usable BuildSetStatus object
-        return bss
+        # return a remotely-usable BuildSetStatus object
+        from buildbot.status.client import makeRemote
+        return makeRemote(bs.status)
 





More information about the Commits mailing list