[Buildbot-devel] Killing running build automatically

Martijn van Oosterhout kleptog at gmail.com
Thu Jan 8 13:18:56 UTC 2015

Ok, this is what I have. It appears to work, but I'm not sure if it counts
as pretty. It took me a while since I didn't quite get the distinction
between BuildStatus and Build and that you can't get from the former to the
latter easily.

It's called the GerritRescheduler, and you define it as a scheduler, so you
can use all the normal filtering stuff (not tested). For a real patch it
should probably get a different name since it's not really Gerrit specific.
It has one new parameter which indicates which property should be used to
link the changes and builds.

It's not what I would call neat, but I think this is the right place to do
it. It's not really a scheduler though. It's also for the version of
Buildbot we're running (0.8.7p1) so maybe the interfaces changed. It's
probably missing some imports too.

Feel free to blow holes in it, but hopefully this gives you guys some ideas
(and solves my problem for the time being).

Have a nice day,

On 8 January 2015 at 00:09, Jim Rowan <jmr at computing.com> wrote:

> On Jan 7, 2015, at 12:24 PM, Martijn van Oosterhout <kleptog at gmail.com>
> wrote:
> Ok, if there's nothing there now I'll see if I can make it work somehow.
> I’m interested in whatever you invent here.   We also use gerrit, and run
> into the same problem.   Right now we just burn more buildslaves, but it
> would be nice to cancel the old build.

Martijn van Oosterhout <kleptog at gmail.com> http://svana.org/kleptog/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://buildbot.net/pipermail/devel/attachments/20150108/fefb2847/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gerrit_resched.py
Type: text/x-python
Size: 1970 bytes
Desc: not available
URL: <http://buildbot.net/pipermail/devel/attachments/20150108/fefb2847/attachment.py>

More information about the devel mailing list