[Buildbot-devel] Enable force build of arbitrary revision

Brian Warner warner-buildbot at lothar.com
Thu Oct 20 23:50:19 UTC 2005


> Any chance we could get a "redo last build" button while you're in
> there?

Hrm. I was thinking about this (since I've been adding other status data to
the per-Build web page anyway).. if the last build was triggered by Changes,
or by someone requesting a build of a specific revision, then the answer is
"yes". If the build was effectively a "build HEAD", then the answer is "no",
at least for right now, because the buildmaster has no way of capturing
whatever time-varying state was utilized for that build.

To do the latter, I guess you'd want the Source checkout step to report back
with a revision number or other time-invariant string that describes a
specific source tree, and then stuff that into the BuildStatus somehow (maybe
into the SourceStamp as a "derived SourceStamp" or something). Not sure..
more than I'll be able to figure out by the time 0.7.0 gets out (hopefully
this weekend). It would probably be cleaner to have the buildmaster query the
VC system directly to get this information, but so far I've been able to keep
the buildmaster from having to run any VC commands itself, and it would be
nice to keep it that way a little while longer.

But I'll put the simpler form of the "redo build" in tonight. It will be a
button on the per-Build page, accessible from the yellow "Build NN" box on
the web page.

> and I'm a little dubious about putting up a "build arbitrary
> revision" button. 

I was going to ask about this.. the code I'm checking in now provides
unrestricted branch= and revision= fields in both the HTML page and the IRC
'force' command. I've got regexps in there to prevent the normal
escaped-stuff attacks, but it means that enabling build-forcing will allow
anyone to start a build of any revision along any branch that your VC step
knows how to check out.

Does this seem like a bad idea? I've considered a more complicated API, like
some kind of allowed_branches=[] list, or a checkBranch callback function,
etc, but it seemed like a better idea to wait on that sort of complexity
until after we had the basic functionality in place and people see what it's
like to work with.

Would anyone who is currently exposing force-build controls and who also
plans to take advantage of the multiple-branch stuff in the next release be
concerned about that force-build button allowing builds of arbitrary branches
to be started? If so, would a simple "allowBranches" flag next to the
existing "allowForce" flag ease that concern?


thanks,
 -Brian




More information about the devel mailing list