Cannot trigger Dromaeo tests on internal perf try bots
authorrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 12 Jan 2018 02:13:53 +0000 (02:13 +0000)
committerrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 12 Jan 2018 02:13:53 +0000 (02:13 +0000)
https://bugs.webkit.org/show_bug.cgi?id=179712

Reviewed by Chris Dumez.

The bug was caused by CustomAnalysisTaskConfigurator only showing the top-level tests that are triggerable
instead of the list of highest level tests that are triggerable.

* public/v3/components/custom-analysis-task-configurator.js:
(CustomAnalysisTaskConfigurator.prototype.selectTests): Update the test group name when a new test is picked.
(CustomAnalysisTaskConfigurator.prototype.selectPlatform):
(CustomAnalysisTaskConfigurator.prototype._didUpdateSelectedPlatforms): Extracted from selectPlatform.
(CustomAnalysisTaskConfigurator.prototype._renderTriggerableTests): Include the list of all highest-level tests
which are triggerable.
(CustomAnalysisTaskConfigurator.prototype._renderRadioButtonList): Added labelForObject which returns the label
to be used in the list items. For tests, we want to use the full name, not just its label.
* public/v3/models/analysis-task.js:
(AnalysisTask.fetchById):
* public/v3/models/triggerable.js:
(Triggerable.prototype.acceptedTests): Added.
(Triggerable.prototype.acceptsTest): Deleted.

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

Websites/perf.webkit.org/ChangeLog
Websites/perf.webkit.org/public/v3/components/custom-analysis-task-configurator.js
Websites/perf.webkit.org/public/v3/models/analysis-task.js
Websites/perf.webkit.org/public/v3/models/triggerable.js

index 19f9536..152380c 100644 (file)
@@ -1 +1,25 @@
+2018-01-11  Ryosuke Niwa  <rniwa@webkit.org>
+
+        Cannot trigger Dromaeo tests on internal perf try bots
+        https://bugs.webkit.org/show_bug.cgi?id=179712
+
+        Reviewed by Chris Dumez.
+
+        The bug was caused by CustomAnalysisTaskConfigurator only showing the top-level tests that are triggerable
+        instead of the list of highest level tests that are triggerable.
+
+        * public/v3/components/custom-analysis-task-configurator.js:
+        (CustomAnalysisTaskConfigurator.prototype.selectTests): Update the test group name when a new test is picked.
+        (CustomAnalysisTaskConfigurator.prototype.selectPlatform):
+        (CustomAnalysisTaskConfigurator.prototype._didUpdateSelectedPlatforms): Extracted from selectPlatform.
+        (CustomAnalysisTaskConfigurator.prototype._renderTriggerableTests): Include the list of all highest-level tests
+        which are triggerable.
+        (CustomAnalysisTaskConfigurator.prototype._renderRadioButtonList): Added labelForObject which returns the label
+        to be used in the list items. For tests, we want to use the full name, not just its label.
+        * public/v3/models/analysis-task.js:
+        (AnalysisTask.fetchById):
+        * public/v3/models/triggerable.js:
+        (Triggerable.prototype.acceptedTests): Added.
+        (Triggerable.prototype.acceptsTest): Deleted.
+
 == Rolled over to ChangeLog-2018-01-01 ==
index b70f204..f1c1139 100644 (file)
@@ -40,7 +40,7 @@ class CustomAnalysisTaskConfigurator extends ComponentBase {
         if (this._selectedTests.length && !this._triggerablePlatforms.includes(this._selectedPlatform))
             this._selectedPlatform = null;
 
-        this.enqueueToRender();
+        this._didUpdateSelectedPlatforms();
     }
 
     selectPlatform(selectedPlatform)
@@ -49,6 +49,12 @@ class CustomAnalysisTaskConfigurator extends ComponentBase {
 
         const [triggerable, error] = this._updateTriggerableLazily.evaluate(this._selectedTests, this._selectedPlatform);
         this._updateRepositoryGroups(triggerable);
+
+        this._didUpdateSelectedPlatforms();
+    }
+
+    _didUpdateSelectedPlatforms()
+    {
         this._updateCommitSetMap();
 
         this.enqueueToRender();
@@ -190,8 +196,14 @@ class CustomAnalysisTaskConfigurator extends ComponentBase {
     {
         const enabledTriggerables = Triggerable.all().filter((triggerable) => !triggerable.isDisabled());
 
-        let tests = Test.topLevelTests().filter((test) => test.metrics().length && enabledTriggerables.some((triggerable) => triggerable.acceptsTest(test)));
-        return this._renderRadioButtonList(this.content('test-list'), 'test', tests, this.selectTests.bind(this));
+        const acceptedTests = new Set;
+        for (const triggerable of enabledTriggerables) {
+            for (const test of triggerable.acceptedTests())
+                acceptedTests.add(test);
+        }
+
+        let tests = Test.all().filter((test) => acceptedTests.has(test) && (!test.parentTest() || !acceptedTests.has(test.parentTest())));
+        return this._renderRadioButtonList(this.content('test-list'), 'test', tests, this.selectTests.bind(this), (test) => test.fullName());
     }
 
     _renderTriggerablePlatforms(selectedTests, triggerablePlatforms)
@@ -207,7 +219,7 @@ class CustomAnalysisTaskConfigurator extends ComponentBase {
         });
     }
 
-    _renderRadioButtonList(listContainer, name, objects, callback)
+    _renderRadioButtonList(listContainer, name, objects, callback, labelForObject = (object) => object.label())
     {
         const listItems = [];
         let selectedListItems = [];
@@ -230,7 +242,7 @@ class CustomAnalysisTaskConfigurator extends ComponentBase {
                 callback(selectedListItems.map((item) => item.object));
                 this.enqueueToRender();
             }});
-            const label = element('label', [radioButton, object.label()]);
+            const label = element('label', [radioButton, labelForObject(object)]);
             listItems.push({radioButton, label, object});
             return element('li', label);
         }));
index 574fa7e..6e22285 100644 (file)
@@ -178,7 +178,7 @@ class AnalysisTask extends LabeledObject {
 
     static fetchById(id)
     {
-        return this._fetchSubset({id: id}).then(function (data) { return AnalysisTask.findById(id); });
+        return this._fetchSubset({id: id}, true).then(function (data) { return AnalysisTask.findById(id); });
     }
 
     static fetchByBuildRequestId(id)
index 3cb0f37..3b1fb9c 100644 (file)
@@ -23,7 +23,7 @@ class Triggerable extends LabeledObject {
     isDisabled() { return this._isDisabled; }
     repositoryGroups() { return this._repositoryGroups; }
 
-    acceptsTest(test) { return this._acceptedTests.has(test); }
+    acceptedTests() { return this._acceptedTests; }
 
     static findByTestConfiguration(test, platform)
     {