[Buildbot-devel] Accessing a Builder queue
Neil Hemingway
neil.hemingway at googlemail.com
Mon Sep 8 16:48:42 UTC 2008
This patch has saved me a chunk of work on #99 (Thanks Christian). I have
found a couple of issues though:
1. The logic to calculate which index in the buildables list didn't work
for me, but I've fixed that
2. There's a race condition. Say a build is running with three pending.
The user looks the builder page and decides to remove the middle pending
one. By the time, the remove function tries to the entry from the buildable
list, the build that was running has finished and the first pending one is
now running, making the index for the one the user wants to remove one not
two. (My test builds consist of a 'ls', so they run quickly ;-)
I think resolving (2) will require more fundamental changes to a builder, in
that I think the build number needs to be allocated at the point where the
request goes onto the pending queue, not when it starts running. Then we
can refer to pending builds by their build number just like actual builds
(avoiding both the race condition _and_ logic to work out which entry they
are in the queue). I also think this change will be required to do just
about anything to the pending queue.
Giving pending builds "real" numbers does leave the possibility that build
numbers stop being sequential (Say build 123 gets created, but then
manually removed from the pending queue leaving 124 to follow 122). This
will break any code that assumes that build numbers are sequential (I
believe there's somewhere in the code that assumes the last run build was
build.getNumber() - 1 ?). I'm not sure what to do about that just yet. An
an aside, I'm also developing a patch to prioritize build requests, which
means that they may even run out of order (1, 3, 2 etc.)
I'm digging into what is involved in allocating build numbers when they get
queued to see what will break (and whether it can be fixed)
Neil
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://buildbot.net/pipermail/devel/attachments/20080908/20d993cd/attachment.html>
More information about the devel
mailing list