A/B testing bots should prioritize user created test groups
authorrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 8 Apr 2016 03:19:22 +0000 (03:19 +0000)
committerrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 8 Apr 2016 03:19:22 +0000 (03:19 +0000)
commitcc14fad747423a14bbe016a2f08f93d08be9b9b0
tree6545f0f742deb6ad902e5a2fde1fa37ef41d7a62
parente1c2dd8a2b10f4459ff215df1aafd0daeed7105c
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
Websites/perf.webkit.org/ChangeLog
Websites/perf.webkit.org/public/include/build-requests-fetcher.php
Websites/perf.webkit.org/server-tests/api-build-requests-tests.js
Websites/perf.webkit.org/server-tests/resources/mock-data.js
Websites/perf.webkit.org/server-tests/tools-buildbot-triggerable-tests.js
Websites/perf.webkit.org/tools/js/buildbot-syncer.js
Websites/perf.webkit.org/unit-tests/buildbot-syncer-tests.js