tl;dr - as of yesterday we've limited coalescing on all builds/tests to merge at most 3 pending jobs together
Coalescing (aka queue collapsing aka merging) has been part of Mozilla's build/test CI for a long, long time. Back in the days of Tinderbox, a single machine would do a checkout/build/upload loop. If there were more checkins while the build was taking place, well, they would get built on the next iteration through the loop.
Fast forward a few years later to our move to buildbot, and having pools of machines all able to do the same builds. Now we create separate jobs in the queue for each build for each push. However, we didn't always have capacity to do all these builds in a reasonable amount of time, so we left buildbot's default behaviour (merging all pending jobs together) enabled for the majority of jobs. This means that if there are pending jobs for a particular build type, the first free machine skips all but the most recent item on the queue. The skipped jobs are "merged" into the job that was actually run.
In the case that all builds and tests are green, coalescing is actually a good thing most of the time. It saves you from doing a bunch of extra useless work.
However, not all pushes are perfect (just see how often the tree is closed due to build/test failures), and coalescing makes bisecting the failure very painful and time consuming, especially in the case that we've coalesced away intermediate build jobs.
To try and find a balance between capacity and sane results, we've recently added a limit to how many jobs can be coalesced at once.
By rigorous statistical analysis:
@catlee so it's easiest to pick a single upper bound for coalescing and go with that at first @catlee did you have any ideas for what that should be? @catlee I was thinking 3 edmorley|sheriffduty catlee: that sounds good to me as a first go :-) mshal chosen by fair dice roll? :) @catlee 1d4 bhearsum Saving throw failed. You are dead. philor wfm
we've chosen 3 as the upper bound on the number of jobs we'll coalesce, and we can tweak this as necessary.
I hope this makes the trees a bit more manageable! Please let us know what you think!
As always, all our work is done in the open. See the bug with the patch here: https://bugzilla.mozilla.org/show_bug.cgi?id=1008213