<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Chris,<br>
<br>
If I understood your original question, you want to only build the
most recent code. Buildbot 0.9.x doesn't do this by default. You'll
find the relevant code in buildbot/process/buildrequest.py, down
around line 275 or so, in the function canBeCollapsed().<br>
<br>
The original code (for 0.9.3, at least) reads:<br>
<br>
for c, selfSS in iteritems(selfSources):<br>
otherSS = otherSources[c]<br>
if selfSS['revision'] != otherSS['revision']:<br>
defer.returnValue(False)<br>
return<br>
if selfSS['repository'] != otherSS['repository']:<br>
defer.returnValue(False)<br>
return<br>
if selfSS['branch'] != otherSS['branch']:<br>
defer.returnValue(False)<br>
return<br>
if selfSS['project'] != otherSS['project']:<br>
defer.returnValue(False)<br>
return<br>
# anything with a patch won't be collapsed<br>
if selfSS['patch'] or otherSS['patch']:<br>
defer.returnValue(False)<br>
return<br>
<br>
This means that builds with different revisions cannot be collapsed.
You'll need a collapse request function. In our case, we just
commented out the first clause in the original function in
preference to providing a collapse request function (I may change
that later if I get to it). If all the rest of the conditions are
ones you want, you could just copy the original function and remove
that first clause. You probably also want to change the returns from
using defer to just returning the value.<br>
<br>
Neil Gilmore<br>
<a class="moz-txt-link-abbreviated" href="mailto:raito@raito.com">raito@raito.com</a><br>
<br>
<div class="moz-cite-prefix">On 4/2/2017 11:54 AM, Chris Spencer
wrote:<br>
</div>
<blockquote
cite="mid:CANe40g+TwS_1MzZ8fDJZTLEovk+7bwAEWTM_nywBGtE0GL4V6g@mail.gmail.com"
type="cite">
<div dir="ltr">Thanks, that's exactly what I was looking for.<br>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Sat, Apr 1, 2017 at 6:10 PM, Bob
Drummond <span dir="ltr"><<a moz-do-not-send="true"
href="mailto:bob.drummond@netronome.com" target="_blank">bob.drummond@netronome.com</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="auto">This functionality exists. I've only used it
with a function that always returns true, not any tricky
logic.
<div dir="auto"><br>
<div dir="auto"><a moz-do-not-send="true"
href="http://docs.buildbot.net/latest/manual/cfg-builders.html#collapsing-build-requests"
target="_blank">http://docs.buildbot.net/<wbr>latest/manual/cfg-builders.<wbr>html#collapsing-build-requests</a>
<div dir="auto"><br>
<br>
<div data-smartmail="gmail_signature" dir="auto">Bob
Drummond<br>
Software Engineer<br>
<br>
<br>
Netronome | 3159 Unionville Road, Suite 100
Cranberry Twp., PA 16066<br>
<br>
Phone: <a moz-do-not-send="true"
href="tel:%28724%29%20778-3295"
value="+17247783295" target="_blank">+1 (724)
778-3295</a> | <a moz-do-not-send="true"
href="http://www.netronome.com" target="_blank">www.netronome.com</a></div>
</div>
</div>
</div>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">
<div>
<div class="h5">On Apr 1, 2017 15:23, "Chris Spencer"
<<a moz-do-not-send="true"
href="mailto:chrisspen@gmail.com" target="_blank">chrisspen@gmail.com</a>>
wrote:<br type="attribution">
</div>
</div>
<blockquote class="m_-6160507644994612852quote"
style="margin:0 0 0 .8ex;border-left:1px #ccc
solid;padding-left:1ex">
<div>
<div class="h5">
<div dir="ltr">
<div>
<div>Is there any configuration option to
cancel pending builds to a branch if there's
a more recent pending build for that same
branch?<br>
<br>
</div>
I'm seeing a case where there might be several
commits made to a branch of the course of an
hour. I have my treeStableTimer set to 60
seconds, so each commit is far enough apart to
create separate builds. I could fix this by
increasing my treeStableTimer to an hour or
more, but then it'll take too long to start
the build.<br>
<br>
</div>
Ideally, I'd like it to cancel older pending
builds to a branch if a newer one exists.<br>
</div>
<br>
</div>
</div>
______________________________<wbr>_________________<br>
users mailing list<br>
<a moz-do-not-send="true"
href="mailto:users@buildbot.net" target="_blank">users@buildbot.net</a><br>
<a moz-do-not-send="true"
href="https://lists.buildbot.net/mailman/listinfo/users"
rel="noreferrer" target="_blank">https://lists.buildbot.net/mai<wbr>lman/listinfo/users</a><br>
</blockquote>
</div>
<br>
</div>
</blockquote>
</div>
<br>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:users@buildbot.net">users@buildbot.net</a>
<a class="moz-txt-link-freetext" href="https://lists.buildbot.net/mailman/listinfo/users">https://lists.buildbot.net/mailman/listinfo/users</a></pre>
</blockquote>
<br>
</body>
</html>