Build fix after r215061.
authorrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 19 Apr 2017 05:58:44 +0000 (05:58 +0000)
committerrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 19 Apr 2017 05:58:44 +0000 (05:58 +0000)
There was a mismatch between the format updateTriggerable and /api/update-triggerable were using.
Namely, each repository group was assumed to contain a name field in /api/update-triggerable
but updateTriggerable was not including that at all.

We didn't catch this because the test for updateTriggerable also used the wrong format :(

* server-tests/tools-buildbot-triggerable-tests.js:
* tools/js/buildbot-triggerable.js:
(BuildbotTriggerable.prototype.updateTriggerable):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@215503 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Websites/perf.webkit.org/ChangeLog
Websites/perf.webkit.org/server-tests/tools-buildbot-triggerable-tests.js
Websites/perf.webkit.org/tools/js/buildbot-triggerable.js

index 1926ecc..513961b 100644 (file)
@@ -1,3 +1,17 @@
+2017-04-18  Ryosuke Niwa  <rniwa@webkit.org>
+
+        Build fix after r215061.
+
+        There was a mismatch between the format updateTriggerable and /api/update-triggerable were using.
+        Namely, each repository group was assumed to contain a name field in /api/update-triggerable
+        but updateTriggerable was not including that at all.
+
+        We didn't catch this because the test for updateTriggerable also used the wrong format :(
+
+        * server-tests/tools-buildbot-triggerable-tests.js:
+        * tools/js/buildbot-triggerable.js:
+        (BuildbotTriggerable.prototype.updateTriggerable):
+
 2017-04-14  Dewei Zhu  <dewei_zhu@apple.com>
 
         Add sub-commit UI in commit log viewer.
index 66f086b..5d76f8b 100644 (file)
@@ -954,10 +954,10 @@ describe('BuildbotTriggerable', function () {
                 assert.deepEqual(groups[0].repositories(), [webkit, macos]);
 
                 const config = MockData.mockTestSyncConfigWithSingleBuilder();
-                config.repositoryGroups = [
-                    {name: 'system-only', repositories: ['macOS'], properties: {'os': '<macOS>'}},
-                    {name: 'system-and-webkit', repositories: ['WebKit', 'macOS'], properties: {'os': '<macOS>', 'wk': '<WebKit>'}},
-                ]
+                config.repositoryGroups = {
+                    'system-only': {repositories: ['macOS'], properties: {'os': '<macOS>'}},
+                    'system-and-webkit': {repositories: ['WebKit', 'macOS'], properties: {'os': '<macOS>', 'wk': '<WebKit>'}}
+                }
 
                 const logger = new MockLogger;
                 const slaveInfo = {name: 'sync-slave', password: 'password'};
index 15d3899..429a41e 100644 (file)
@@ -44,7 +44,9 @@ class BuildbotTriggerable {
             'slavePassword': this._slaveInfo.password,
             'triggerable': this._name,
             'configurations': Array.from(map.values()),
-            'repositoryGroups': Object.keys(repositoryGroups).map((groupName) => repositoryGroups[groupName])});
+            'repositoryGroups': Object.keys(repositoryGroups).map((groupName) => {
+                return {name: groupName, repositories: repositoryGroups[groupName].repositories};
+            })});
     }
 
     syncOnce()