[cig-commits] r6919 - cs/buildbot/trunk/buildbot

leif at geodynamics.org leif at geodynamics.org
Thu May 17 21:20:54 PDT 2007


Author: leif
Date: 2007-05-17 21:20:53 -0700 (Thu, 17 May 2007)
New Revision: 6919

Modified:
   cs/buildbot/trunk/buildbot/scheduler.py
Log:
Tweaked scheduler.Dependent so that it will actually work for, e.g.,
the PyLith -> spatialdata dependency.  The problem was, when a
spatialdata check-in triggered a PyLith build, BuildBot checked-out
spatialdata source in the PyLith column (one might say it tried to
build PyLith from spatialdata's source).

This builder/source mismatch is a frequent problem with BuildBot
whenever I try to do anything even a little bit fancy.
AnyBranchScheduler seems to be useless b/c of this problem (among
others).

Also: scheduler.Dependent doesn't work at all if even a single builder
is offline.  I don't understand BuildBot well enough to know how to
fix this.

The only reason I'm monkeying with scheduler.Dependent in the first
place is because it is seemingly impossible to build both PyLith and
spatialdata in the same column (i.e., as a part of the same Builder).
This is because BuildBot couples "build steps" with Builders, instead
of with the source code being built.  It seems that supporting
multiple projects cleanly requires a much deeper refactoring than I
initially thought.


Modified: cs/buildbot/trunk/buildbot/scheduler.py
===================================================================
--- cs/buildbot/trunk/buildbot/scheduler.py	2007-05-18 00:37:24 UTC (rev 6918)
+++ cs/buildbot/trunk/buildbot/scheduler.py	2007-05-18 04:20:53 UTC (rev 6919)
@@ -295,11 +295,12 @@
 
     compare_attrs = ('name', 'upstream', 'builders')
 
-    def __init__(self, name, upstream, builderNames):
+    def __init__(self, name, upstream, builderNames, restamp=False):
         assert providedBy(upstream, interfaces.IUpstreamScheduler)
         BaseUpstreamScheduler.__init__(self, name)
         self.upstream = upstream
         self.builderNames = builderNames
+        self.restamp = restamp
 
     def listBuilderNames(self):
         return self.builderNames
@@ -318,6 +319,8 @@
         return d
 
     def upstreamBuilt(self, ss):
+        if self.restamp:
+            ss = SourceStamp()
         bs = buildset.BuildSet(self.builderNames, ss)
         self.submit(bs)
 



More information about the cig-commits mailing list