<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[210909] trunk/Websites/perf.webkit.org</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/210909">210909</a></dd>
<dt>Author</dt> <dd>dewei_zhu@apple.com</dd>
<dt>Date</dt> <dd>2017-01-18 19:19:37 -0800 (Wed, 18 Jan 2017)</dd>
</dl>
<h3>Log Message</h3>
<pre>'buildbot-syncer.js' should be able to determine force build argument from a list of possible repositories.
https://bugs.webkit.org/show_bug.cgi?id=167152
Reviewed by Ryosuke Niwa.
Add 'rootOptions' key which maps to a list of possible repositories.
For a build request, only one of the repositories in the list is valid.
* tools/js/buildbot-syncer.js:
(BuildbotSyncer.prototype._propertiesForBuildRequest):
(BuildbotSyncer._validateAndMergeProperties):
(BuildbotSyncer):
* unit-tests/buildbot-syncer-tests.js:
(sampleiOSConfig):
(sampleiOSConfigWithExpansions):
(createSampleBuildRequest):
(Promise.resolve.then):
* unit-tests/resources/mock-v3-models.js:
(MockModels.inject):</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkWebsitesperfwebkitorgChangeLog">trunk/Websites/perf.webkit.org/ChangeLog</a></li>
<li><a href="#trunkWebsitesperfwebkitorgtoolsjsbuildbotsyncerjs">trunk/Websites/perf.webkit.org/tools/js/buildbot-syncer.js</a></li>
<li><a href="#trunkWebsitesperfwebkitorgunittestsbuildbotsyncertestsjs">trunk/Websites/perf.webkit.org/unit-tests/buildbot-syncer-tests.js</a></li>
<li><a href="#trunkWebsitesperfwebkitorgunittestsresourcesmockv3modelsjs">trunk/Websites/perf.webkit.org/unit-tests/resources/mock-v3-models.js</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkWebsitesperfwebkitorgChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Websites/perf.webkit.org/ChangeLog (210908 => 210909)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Websites/perf.webkit.org/ChangeLog        2017-01-19 03:07:09 UTC (rev 210908)
+++ trunk/Websites/perf.webkit.org/ChangeLog        2017-01-19 03:19:37 UTC (rev 210909)
</span><span class="lines">@@ -1,3 +1,25 @@
</span><ins>+2017-01-18 Dewei Zhu <dewei_zhu@apple.com>
+
+ 'buildbot-syncer.js' should be able to determine force build argument from a list of possible repositories.
+ https://bugs.webkit.org/show_bug.cgi?id=167152
+
+ Reviewed by Ryosuke Niwa.
+
+ Add 'rootOptions' key which maps to a list of possible repositories.
+ For a build request, only one of the repositories in the list is valid.
+
+ * tools/js/buildbot-syncer.js:
+ (BuildbotSyncer.prototype._propertiesForBuildRequest):
+ (BuildbotSyncer._validateAndMergeProperties):
+ (BuildbotSyncer):
+ * unit-tests/buildbot-syncer-tests.js:
+ (sampleiOSConfig):
+ (sampleiOSConfigWithExpansions):
+ (createSampleBuildRequest):
+ (Promise.resolve.then):
+ * unit-tests/resources/mock-v3-models.js:
+ (MockModels.inject):
+
</ins><span class="cx"> 2017-01-17 Ryosuke Niwa <rniwa@webkit.org>
</span><span class="cx">
</span><span class="cx"> Make calls to render() functions async
</span></span></pre></div>
<a id="trunkWebsitesperfwebkitorgtoolsjsbuildbotsyncerjs"></a>
<div class="modfile"><h4>Modified: trunk/Websites/perf.webkit.org/tools/js/buildbot-syncer.js (210908 => 210909)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Websites/perf.webkit.org/tools/js/buildbot-syncer.js        2017-01-19 03:07:09 UTC (rev 210908)
+++ trunk/Websites/perf.webkit.org/tools/js/buildbot-syncer.js        2017-01-19 03:19:37 UTC (rev 210909)
</span><span class="lines">@@ -222,9 +222,14 @@
</span><span class="cx"> else if ('root' in value) {
</span><span class="cx"> let repositoryName = value['root'];
</span><span class="cx"> let repository = repositoryByName[repositoryName];
</span><del>- assert(repository, '"${repositoryName}" must be specified');
</del><ins>+ assert(repository, `"${repositoryName}" must be specified`);
</ins><span class="cx"> properties[key] = rootSet.revisionForRepository(repository);
</span><del>- } else if ('rootsExcluding' in value) {
</del><ins>+ } else if ('rootOptions' in value) {
+ const filteredOptions = value['rootOptions'].filter((option) => option in repositoryByName);
+ assert.equal(filteredOptions.length, 1, `There should be exactly one valid root among "${value['rootOptions']}".`);
+ properties[key] = rootSet.revisionForRepository(repositoryByName[filteredOptions[0]]);
+ }
+ else if ('rootsExcluding' in value) {
</ins><span class="cx"> let revisionSet = this._revisionSetFromRootSetWithExclusionList(rootSet, value['rootsExcluding']);
</span><span class="cx"> properties[key] = JSON.stringify(revisionSet);
</span><span class="cx"> }
</span><span class="lines">@@ -334,7 +339,7 @@
</span><span class="cx"> continue;
</span><span class="cx">
</span><span class="cx"> switch (name) {
</span><del>- case 'properties': // fallthrough
</del><ins>+ case 'properties': // Fallthrough
</ins><span class="cx"> case 'arguments':
</span><span class="cx"> assert.equal(typeof(value), 'object', 'arguments should be a dictionary');
</span><span class="cx"> if (!config['properties'])
</span><span class="lines">@@ -341,8 +346,8 @@
</span><span class="cx"> config['properties'] = {};
</span><span class="cx"> this._validateAndMergeProperties(config['properties'], value);
</span><span class="cx"> break;
</span><del>- case 'test': // fallthrough
- case 'slaveList': // fallthrough
</del><ins>+ case 'test': // Fallthrough
+ case 'slaveList': // Fallthrough
</ins><span class="cx"> case 'platforms':
</span><span class="cx"> case 'types':
</span><span class="cx"> assert(value instanceof Array, `${name} should be an array`);
</span><span class="lines">@@ -349,10 +354,10 @@
</span><span class="cx"> assert(value.every(function (part) { return typeof part == 'string'; }), `${name} should be an array of strings`);
</span><span class="cx"> config[name] = value.slice();
</span><span class="cx"> break;
</span><del>- case 'type': // fallthrough
- case 'builder': // fallthrough
- case 'platform': // fallthrough
- case 'slaveArgument': // fallthrough
</del><ins>+ case 'type': // Fallthrough
+ case 'builder': // Fallthrough
+ case 'platform': // Fallthrough
+ case 'slaveArgument': // Fallthrough
</ins><span class="cx"> case 'buildRequestArgument':
</span><span class="cx"> assert.equal(typeof(value), 'string', `${name} should be of string type`);
</span><span class="cx"> config[name] = value;
</span><span class="lines">@@ -373,7 +378,7 @@
</span><span class="cx"> continue;
</span><span class="cx"> }
</span><span class="cx"> assert.equal(typeof(value), 'object', 'A argument value must be either a string or a dictionary');
</span><del>-
</del><ins>+
</ins><span class="cx"> let keys = Object.keys(value);
</span><span class="cx"> assert.equal(keys.length, 1, 'arguments value cannot contain more than one key');
</span><span class="cx"> let namedValue = value[keys[0]];
</span><span class="lines">@@ -381,10 +386,11 @@
</span><span class="cx"> case 'root':
</span><span class="cx"> assert.equal(typeof(namedValue), 'string', 'root name must be a string');
</span><span class="cx"> break;
</span><ins>+ case 'rootOptions': // Fallthrough
</ins><span class="cx"> case 'rootsExcluding':
</span><del>- assert(namedValue instanceof Array, 'rootsExcluding must specify an array');
</del><ins>+ assert(namedValue instanceof Array, `${keys[0]} must specify an array`);
</ins><span class="cx"> for (let excludedRootName of namedValue)
</span><del>- assert.equal(typeof(excludedRootName), 'string', 'rootsExcluding must specify an array of strings');
</del><ins>+ assert.equal(typeof(excludedRootName), 'string', `${keys[0]} must specify an array of strings`);
</ins><span class="cx"> namedValue = namedValue.slice();
</span><span class="cx"> break;
</span><span class="cx"> default:
</span></span></pre></div>
<a id="trunkWebsitesperfwebkitorgunittestsbuildbotsyncertestsjs"></a>
<div class="modfile"><h4>Modified: trunk/Websites/perf.webkit.org/unit-tests/buildbot-syncer-tests.js (210908 => 210909)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Websites/perf.webkit.org/unit-tests/buildbot-syncer-tests.js        2017-01-19 03:07:09 UTC (rev 210908)
+++ trunk/Websites/perf.webkit.org/unit-tests/buildbot-syncer-tests.js        2017-01-19 03:19:37 UTC (rev 210909)
</span><span class="lines">@@ -16,6 +16,7 @@
</span><span class="cx"> {
</span><span class="cx"> 'arguments': {
</span><span class="cx"> 'desired_image': {'root': 'iOS'},
</span><ins>+ 'opensource': {'rootOptions': ['WebKit-SVN', 'WebKit-Git']},
</ins><span class="cx"> 'roots_dict': {'rootsExcluding': ['iOS']}
</span><span class="cx"> },
</span><span class="cx"> 'slaveArgument': 'slavename',
</span><span class="lines">@@ -107,7 +108,6 @@
</span><span class="cx"> },
</span><span class="cx"> ]
</span><span class="cx"> }
</span><del>-
</del><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> let sampleRootSetData = {
</span><span class="lines">@@ -122,7 +122,13 @@
</span><span class="cx"> 'time': 1456931874000,
</span><span class="cx"> 'repository': 'Shared',
</span><span class="cx"> 'revision': '80229',
</span><del>- }
</del><ins>+ },
+ 'WebKit-Git': {
+ "id":"111239",
+ "time":1456931874000,
+ "repository":"WebKit-Git",
+ "revision":"9abcdef",
+ },
</ins><span class="cx"> };
</span><span class="cx">
</span><span class="cx"> function smallConfiguration()
</span><span class="lines">@@ -204,6 +210,7 @@
</span><span class="cx"> let rootSet = RootSet.ensureSingleton('4197', {roots: [
</span><span class="cx"> {'id': '111127', 'time': 1456955807334, 'repository': MockModels.webkit, 'revision': '197463'},
</span><span class="cx"> {'id': '111237', 'time': 1456931874000, 'repository': MockModels.sharedRepository, 'revision': '80229'},
</span><ins>+ {'id': '111239', 'time': 1456931874000, 'repository': MockModels.webkitGit, 'revision': '9abcdef'},
</ins><span class="cx"> {'id': '88930', 'time': 0, 'repository': MockModels.ios, 'revision': '13A452'},
</span><span class="cx"> ]});
</span><span class="cx">
</span><span class="lines">@@ -564,7 +571,7 @@
</span><span class="cx"> it('should include all properties specified in a given configuration', function () {
</span><span class="cx"> let syncers = BuildbotSyncer._loadConfig(RemoteAPI, sampleiOSConfig());
</span><span class="cx"> let properties = syncers[0]._propertiesForBuildRequest(createSampleBuildRequest(MockModels.iphone, MockModels.speedometer));
</span><del>- assert.deepEqual(Object.keys(properties), ['desired_image', 'roots_dict', 'test_name', 'forcescheduler', 'build_request_id']);
</del><ins>+ assert.deepEqual(Object.keys(properties), ['desired_image', 'opensource', 'roots_dict', 'test_name', 'forcescheduler', 'build_request_id']);
</ins><span class="cx"> });
</span><span class="cx">
</span><span class="cx"> it('should preserve non-parametric property values', function () {
</span><span class="lines">@@ -584,6 +591,12 @@
</span><span class="cx"> assert.equal(properties['desired_image'], '13A452');
</span><span class="cx"> });
</span><span class="cx">
</span><ins>+ it('should resolve "rootOptions"', function () {
+ let syncers = BuildbotSyncer._loadConfig(RemoteAPI, sampleiOSConfig());
+ let properties = syncers[0]._propertiesForBuildRequest(createSampleBuildRequest(MockModels.iphone, MockModels.speedometer));
+ assert.equal(properties['roots_dict'], JSON.stringify(sampleRootSetData));
+ });
+
</ins><span class="cx"> it('should resolve "rootsExcluding"', function () {
</span><span class="cx"> let syncers = BuildbotSyncer._loadConfig(RemoteAPI, sampleiOSConfig());
</span><span class="cx"> let properties = syncers[0]._propertiesForBuildRequest(createSampleBuildRequest(MockModels.iphone, MockModels.speedometer));
</span><span class="lines">@@ -892,9 +905,11 @@
</span><span class="cx"> assert.deepEqual(requests[0].data, {
</span><span class="cx"> 'build_request_id': '16733-' + MockModels.iphone.id(),
</span><span class="cx"> 'desired_image': '13A452',
</span><ins>+ "opensource": "9abcdef",
</ins><span class="cx"> 'forcescheduler': 'ABTest-iPhone-RunBenchmark-Tests-ForceScheduler',
</span><span class="cx"> 'roots_dict': '{"WebKit":{"id":"111127","time":1456955807334,"repository":"WebKit","revision":"197463"},'
</span><del>- + '"Shared":{"id":"111237","time":1456931874000,"repository":"Shared","revision":"80229"}}',
</del><ins>+ + '"Shared":{"id":"111237","time":1456931874000,"repository":"Shared","revision":"80229"},'
+ + '"WebKit-Git":{"id":"111239","time":1456931874000,"repository":"WebKit-Git","revision":"9abcdef"}}',
</ins><span class="cx"> 'slavename': 'some-slave',
</span><span class="cx"> 'test_name': 'speedometer'
</span><span class="cx"> });
</span></span></pre></div>
<a id="trunkWebsitesperfwebkitorgunittestsresourcesmockv3modelsjs"></a>
<div class="modfile"><h4>Modified: trunk/Websites/perf.webkit.org/unit-tests/resources/mock-v3-models.js (210908 => 210909)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Websites/perf.webkit.org/unit-tests/resources/mock-v3-models.js        2017-01-19 03:07:09 UTC (rev 210908)
+++ trunk/Websites/perf.webkit.org/unit-tests/resources/mock-v3-models.js        2017-01-19 03:19:37 UTC (rev 210909)
</span><span class="lines">@@ -18,6 +18,7 @@
</span><span class="cx"> MockModels.ios = Repository.ensureSingleton(22, {name: 'iOS'});
</span><span class="cx"> MockModels.webkit = Repository.ensureSingleton(11, {name: 'WebKit', url: 'http://trac.webkit.org/changeset/$1'});
</span><span class="cx"> MockModels.sharedRepository = Repository.ensureSingleton(16, {name: 'Shared'});
</span><ins>+ MockModels.webkitGit = Repository.ensureSingleton(17, {name: 'WebKit-Git'});
</ins><span class="cx"> MockModels.builder = new Builder(176, {name: 'WebKit Perf Builder', buildUrl: 'http://build.webkit.org/builders/$builderName/$buildNumber'});
</span><span class="cx">
</span><span class="cx"> MockModels.someTest = Test.ensureSingleton(1, {name: 'Some test'});
</span></span></pre>
</div>
</div>
</body>
</html>