Update syncing script to be able to build binary for commit set with owned commits.
authordewei_zhu@apple.com <dewei_zhu@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 29 Sep 2017 07:34:41 +0000 (07:34 +0000)
committerdewei_zhu@apple.com <dewei_zhu@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 29 Sep 2017 07:34:41 +0000 (07:34 +0000)
commita584f831e8790fe1ba2d9e96a91792ee527d6350
tree0788b926fb4f4aafea3b085b39bb2dcc391f4304
parent14442565511c2cede52cc19153d228c01cb01a90
Update syncing script to be able to build binary for commit set with owned commits.
https://bugs.webkit.org/show_bug.cgi?id=177225

Reviewed by Ryosuke Niwa.

Added support for syncing script to be able to schedule builds to build binary for owned commits.
Introduces 'ifRepositorySet' and 'ownedRevisions' in 'buildProperties'.
'ifRepositorySet' will conditionaly set a build property if at least one of the repositories it specified requires build.
'ownedRevisions' specifies owned commits revision informations.

* public/v3/models/commit-set.js:
(CommitSet): Added '_ownerRepositoryToOwnedRepositoriesMap'.
(CommitSet.prototype.updateSingleton): Reset '_ownerRepositoryToOwnedRepositoriesMap'.
(CommitSet.prototype._updateFromObject): Only update '_repositoryToCommitOwnerMap' and '_ownerRepositoryToOwnedRepositoriesMap' when 'commitOwner' exists.
(CommitSet.prototype.ownerCommitForRepository): Returns a sorted list of top level repositories.
(CommitSet.prototype.ownedRepositoriesForOwnerRepository): Returns owned repositories given a owner repository.
(CustomCommitSet.prototype.ownerCommitForRepository): Returns a sorted list of top level repositories.
* public/v3/models/triggerable.js:
(prototype.accepts): It should only check against top-level repositories. Removed a deprecated 'FIXME'.
* server-tests/tools-sync-buildbot-integration-tests.js: Added unit test for building owned commits binary.
(createTriggerable): Added conditional 'ifRepositorySet' and 'ownedRevisions' in the repository groups.
* tools/js/buildbot-syncer.js:
(BuildbotSyncer.prototype._propertiesForBuildRequest):
    Added logic to conditionaly create build property for 'ifRepositorySet'.
    Added logic to create 'ownedRevisions' based on the owner repositories it specified.
(BuildbotSyncer._parseRepositoryGroup): Build property template should be able to handle 'ifRepositorySet' and 'ownedRevisions'.
* unit-tests/buildbot-syncer-tests.js: Added unit tests for 'ifRepositorySet' and 'ownedRevisions'.
* unit-tests/commit-set-tests.js: Added unit tests for 'topLevelRepositoriesSortedByNamePreferringOnesWithURL'.
* unit-tests/resources/mock-v3-models.js: Added a repository group contains 'ios', 'webkit' and 'ownerRepository'.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@222648 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Websites/perf.webkit.org/ChangeLog
Websites/perf.webkit.org/public/v3/models/commit-set.js
Websites/perf.webkit.org/public/v3/models/triggerable.js
Websites/perf.webkit.org/server-tests/tools-sync-buildbot-integration-tests.js
Websites/perf.webkit.org/tools/js/buildbot-syncer.js
Websites/perf.webkit.org/unit-tests/buildbot-syncer-tests.js
Websites/perf.webkit.org/unit-tests/commit-set-tests.js
Websites/perf.webkit.org/unit-tests/resources/mock-v3-models.js