[Buildbot-devel] SourceStamp question
Dustin J. Mitchell
dustin at zmanda.com
Thu Jul 26 20:43:59 UTC 2007
I have a number of interdependent builders which all need to build from
the same source revision, even if more changes intervene.
Let me introduce the terms "original SourceStamp" and "specific
SourceStamp"; an original SourceStamp might be
orig = SourceStamp(changes=[ch1, ch2])
while the corresponding specific SourceStamp (after a Source step
executs) would be
spec = SourceStamp(branch="foo", revision=1234, patch=None)
In my triggerable schedulers patch (http://buildbot.net/trac/ticket/56),
I solved this problem by optionally calculating the specific SourceStamp
when triggering new schedulers, using the got_revision property of the
triggering build (see start() in triggers/buildbot/steps/trigger.py in
the patch on that ticket).
However, it seems that it would make sense to have this information more
generally available -- isn't it almost always more useful to have the
specific SourceStamp than the original?
I have a few ideas *how* this could be done, and I'd be interested to
hear reactions to them (especially from Brian and other devs).
1. add an update() method to a SourceStamp, and actualy mutate the
original SourceStamp object into a specific one.
2. make the Build(Status) classes' getSourceStamp return a specific
SourceStamp when available.
3. give the Build(Status) classes' getSourceStamp method an optional
argument, specific=False, to determine whether they should return the
original or specific SourceStamp.
I should note that I've already written a patch to make all
getSourceStamp functions actually return a SourceStamp object. I'll
post that patch along with the results of the work discussed in this
thread.
Dustin
--
Dustin J. Mitchell
Storage Software Engineer, Zmanda, Inc.
http://www.zmanda.com/
More information about the devel
mailing list