A/B testing bots should prioritize user created test groups
https://bugs.webkit.org/show_bug.cgi?id=156375
Reviewed by Chris Dumez.
Order build requests preferring user created ones over ones automatically created by detect-changes.js.
Also fixed a bug in BuildbotSyncer.scheduleFirstRequestInGroupIfAvailable that it was scheduling a new
build request on a builder/slave even when we had previously scheduled another build request.
* public/include/build-requests-fetcher.php:
(BuildRequestsFetcher::fetch_incomplete_requests_for_triggerable): Order build requested based on
author_order which is 0 when it's created by an user and 1 when it's created by detect-changes.js.
Since we're using ascending order, this would put user created test groups first.
* server-tests/api-build-requests-tests.js: Updated an existing test case and added a new test case
for testing that build requests for an user created test group shows up first.
* server-tests/resources/mock-data.js:
(MockData.addAnotherMockTestGroup): Takes an extra argument to specify the author name.
* server-tests/tools-buildbot-triggerable-tests.js: Added a test case for testing that build requests
for an user created test group shows up first.
* tools/js/buildbot-syncer.js:
(BuildbotSyncer): Added _slavesWithNewRequests to keep track of build slaves on which we have already
scheduled new build requests. Don't schedule more requests on these slaves.
(BuildbotSyncer.prototype.scheduleRequest):
(BuildbotSyncer.prototype.scheduleFirstRequestInGroupIfAvailable): Add the specified slave name (or null
when slaveList is not specified) to _slavesWithNewRequests.
(BuildbotSyncer.prototype.pullBuildbot): Clear the set after pulling buildbot since any build request
we have previously scheduled should be included in one of the entires now.
* unit-tests/buildbot-syncer-tests.js: Added test cases for the aforementioned bug.
(sampleiOSConfig): Added a second slave for new test cases.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@199210
268f45cc-cd09-0410-ab3c-
d52691b4dbfc