Title: [179106] trunk/Tools
Revision
179106
Author
[email protected]
Date
2015-01-25 23:59:09 -0800 (Sun, 25 Jan 2015)

Log Message

Would like leaks bot results at build.webkit.org/dashboard
https://bugs.webkit.org/show_bug.cgi?id=122657

Reviewed by Darin Adler.

* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotIteration.js:
Record links provided by buildbot steps. Currently, the dashboard hardcodes more links
than necessary, could use the ones from buildbot in more places.

* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotQueue.js:
(BuildbotQueue): Reflect configuration option for leaks queues.

* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/Main.js:
Add leaks queues to performance column. First, leaks are about performance indeed,
and second, this is where we have some space to spare.

* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/WebKitBuildbot.js:
(WebKitBuildbot): Added Yosemite Leaks queue, which was sitting neglected for at
least a year.

* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Styles/Main.css:
(table.queue-grid td): Moved height from queue-view - we can now have more than one
queue view per cell. The heigt is needed to avoid ugly overlapping while loading
results - once the results are loaded, all rows are currently higher than that.

* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Styles/QueueView.css:
(.leaks-popover): Added.

* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotLeaksQueueView.js:
Added.

* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/index.html:
Load BuildbotLeaksQueueView.js.

Modified Paths

Added Paths

Diff

Modified: trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotIteration.js (179105 => 179106)


--- trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotIteration.js	2015-01-26 07:10:31 UTC (rev 179105)
+++ trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotIteration.js	2015-01-26 07:59:09 UTC (rev 179106)
@@ -305,6 +305,14 @@
         var bindingTestResults = collectTestResults.call(this, data, "bindings-generation-tests");
         this.bindingTestResults = bindingTestResults ? new BuildbotTestResults(this, bindingTestResults) : null;
 
+        var masterShellCommandStep = data.steps.findFirst(function(step) { return step.name === "MasterShellCommand"; });
+        this.resultURLs = masterShellCommandStep ? masterShellCommandStep.urls : null;
+        for (var linkName in this.resultURLs) {
+            var url = ""
+            if (!url.startsWith("http"))
+                this.resultURLs[linkName] = this.queue.buildbot.baseURL + url;
+        }
+
         this.loaded = true;
 
         this._firstFailedStep = data.steps.findFirst(function(step) { return step.results[0] === BuildbotIteration.FAILURE; });

Added: trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotLeaksQueueView.js (0 => 179106)


--- trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotLeaksQueueView.js	                        (rev 0)
+++ trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotLeaksQueueView.js	2015-01-26 07:59:09 UTC (rev 179106)
@@ -0,0 +1,148 @@
+/*
+ * Copyright (C) 2015 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+BuildbotLeaksQueueView = function(queues)
+{
+    BuildbotQueueView.call(this, [], queues);
+    this.update();
+};
+
+BaseObject.addConstructorFunctions(BuildbotLeaksQueueView);
+
+BuildbotLeaksQueueView.prototype = {
+    constructor: BuildbotLeaksQueueView,
+    __proto__: BuildbotQueueView.prototype,
+
+    update: function()
+    {
+        QueueView.prototype.update.call(this);
+
+        this.element.removeChildren();
+
+        function appendLeaksQueueStatus(queue)
+        {
+            var appendedStatus = false;
+
+            for (var i = 0; i < queue.iterations.length; ++i) {
+                var iteration = queue.iterations[i];
+                if (!iteration.loaded || !iteration.finished)
+                    continue;
+
+                var messageElement = this.revisionContentForIteration(iteration, null);
+
+                var buildPageURL = iteration.queue.buildbot.buildPageURLForIteration(iteration);
+
+                if (iteration.successful)
+                    var status = new StatusLineView(messageElement, StatusLineView.Status.Good, "no leaks", null, buildPageURL);
+                else if (!iteration.productive)
+                    var status = new StatusLineView(messageElement, StatusLineView.Status.Danger, iteration.text, null, buildPageURL);
+                else if (iteration.failed) {
+                    var url = ""
+                    var leakCount = iteration.layoutTestResults.uniqueLeakCount;
+                    if (leakCount) {
+                        var leaksViewerURL = iteration.resultURLs["view leaks"];
+                        var status = new StatusLineView(messageElement, StatusLineView.Status.Neutral, leakCount === 1 ? "unique leak" : "unique leaks", leakCount, leaksViewerURL);
+                    } else
+                        var status = new StatusLineView(messageElement, StatusLineView.Status.Good, iteration.text, null, buildPageURL);
+                } else {
+                    var url = ""
+                    var status = new StatusLineView(messageElement, StatusLineView.Status.Danger, iteration.text, null, buildPageURL);
+                }
+
+                this.element.appendChild(status.element);
+                appendedStatus = true;
+                break;
+            }
+
+            if (!appendedStatus) {
+                var status = new StatusLineView("unknown", StatusLineView.Status.Neutral, "last passing build");
+                this.element.appendChild(status.element);
+            }
+
+            new PopoverTracker(status.statusBubbleElement, this._presentPopoverForLeaksQueue.bind(this), iteration);
+        }
+
+        function appendBuild(queues, label)
+        {
+            queues.forEach(function(queue) {
+                var releaseLabel = document.createElement("a");
+                releaseLabel.classList.add("queueLabel");
+                releaseLabel.textContent = queue.LeaksTestName ? queue.LeaksTestName : label;
+                releaseLabel.href = ""
+                releaseLabel.target = "_blank";
+                this.element.appendChild(releaseLabel);
+
+                appendLeaksQueueStatus.call(this, queue);
+            }.bind(this));
+        }
+
+        appendBuild.call(this, this.releaseQueues, "Leaks");
+    },
+
+    addLinkToRow: function(rowElement, className, text, url)
+    {
+        var linkElement = document.createElement("a");
+        linkElement.className = className;
+        linkElement.textContent = text;
+        linkElement.href = ""
+        linkElement.target = "_blank";
+        rowElement.appendChild(linkElement);
+    },
+
+    _popoverContentForLeaksQueue: function(iteration)
+    {
+        var content = document.createElement("div");
+
+        content.className = "leaks-popover";
+
+        this._addIterationHeadingToPopover(iteration, content, "");
+        this._addDividerToPopover(content);
+
+        var row = document.createElement("div");
+        row.textContent = iteration.text;
+        content.appendChild(row);
+
+        this._addDividerToPopover(content);
+
+        for (var linkName in iteration.resultURLs) {
+            var row = document.createElement("div");
+            this.addLinkToRow(row, "result-link", linkName, iteration.resultURLs[linkName]);
+            content.appendChild(row);
+        }
+
+        return content;
+    },
+
+    _presentPopoverForLeaksQueue: function(element, popover, iteration)
+    {
+        var content = this._popoverContentForLeaksQueue(iteration);
+
+        var rect = Dashboard.Rect.rectFromClientRect(element.getBoundingClientRect());
+        popover.content = content;
+        popover.present(rect, [Dashboard.RectEdge.MIN_Y, Dashboard.RectEdge.MAX_Y, Dashboard.RectEdge.MAX_X, Dashboard.RectEdge.MIN_X]);
+        return true;
+    }
+
+};

Modified: trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotQueue.js (179105 => 179106)


--- trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotQueue.js	2015-01-26 07:10:31 UTC (rev 179105)
+++ trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotQueue.js	2015-01-26 07:59:09 UTC (rev 179106)
@@ -39,6 +39,7 @@
     this.builder = info.builder || false;
     this.tester = info.tester || false;
     this.performance = info.performance || false;
+    this.leaks = info.leaks || false;
     this.architecture = info.architecture || null;
     this.testCategory = info.testCategory || null;
     this.performanceTestName = info.performanceTestName || null;

Modified: trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/Main.js (179105 => 179106)


--- trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/Main.js	2015-01-26 07:10:31 UTC (rev 179105)
+++ trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/Main.js	2015-01-26 07:59:09 UTC (rev 179106)
@@ -39,13 +39,15 @@
             platform.builders = {};
 
         var categoryName;
-        if (queue.builder) {
+        if (queue.builder)
             categoryName = "builders";
-        } else if (queue.tester) {
+        else if (queue.tester)
             categoryName = queue.testCategory;
-        } else if (queue.performance) {
+        else if (queue.performance)
             categoryName = "performance";
-        } else {
+        else if (queue.leaks)
+            categoryName = "leaks";
+        else {
             console.assert("Unknown queue type.");
             continue;
         }
@@ -156,7 +158,6 @@
 
     if (hasBubbles) {
         // Currently, EWS and commit queues are the only items in Other category.
-        // To add more (e.g. leaks bot), we'll need to refactor view classes.
         var header = document.createElement("th");
         header.textContent = "Other";
         row.appendChild(header);
@@ -220,6 +221,11 @@
             cell.appendChild(view.element);
         }
 
+        if (platformQueues.leaks && platformQueues.leaks.debug) {
+            var view = new BuildbotLeaksQueueView(platformQueues.leaks.debug);
+            cell.appendChild(view.element);
+        }
+
         row.appendChild(cell);
 
         if (hasBubbles) {

Modified: trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/WebKitBuildbot.js (179105 => 179106)


--- trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/WebKitBuildbot.js	2015-01-26 07:10:31 UTC (rev 179105)
+++ trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/WebKitBuildbot.js	2015-01-26 07:59:09 UTC (rev 179106)
@@ -41,6 +41,7 @@
         "Apple Yosemite Release WK1 (Tests)": {platform: Dashboard.Platform.MacOSXYosemite, debug: false, tester: true, testCategory: Buildbot.TestCategory.WebKit1},
         "Apple Yosemite Release WK2 (Tests)": {platform: Dashboard.Platform.MacOSXYosemite, debug: false, tester: true, testCategory: Buildbot.TestCategory.WebKit2},
         "Apple Yosemite Release (Perf)": {platform: Dashboard.Platform.MacOSXYosemite, debug: false, performance: true},
+        "Apple Yosemite (Leaks)": {platform: Dashboard.Platform.MacOSXYosemite, debug: true, leaks: true},
         "Apple Win Debug (Build)": {platform: Dashboard.Platform.Windows7, debug: true, builder: true, architecture: Buildbot.BuildArchitecture.ThirtyTwoBit},
         "Apple Win Release (Build)": {platform: Dashboard.Platform.Windows7, builder: true, architecture: Buildbot.BuildArchitecture.ThirtyTwoBit},
         "Apple Win 7 Debug (Tests)": {platform: Dashboard.Platform.Windows7, debug: true, tester: true, testCategory: Buildbot.TestCategory.WebKit1},

Modified: trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Styles/Main.css (179105 => 179106)


--- trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Styles/Main.css	2015-01-26 07:10:31 UTC (rev 179105)
+++ trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Styles/Main.css	2015-01-26 07:59:09 UTC (rev 179106)
@@ -131,6 +131,7 @@
 }
 
 table.queue-grid td {
+    height: 200px;
     width: 200px;
     vertical-align: top;
 }

Modified: trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Styles/QueueView.css (179105 => 179106)


--- trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Styles/QueueView.css	2015-01-26 07:10:31 UTC (rev 179105)
+++ trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Styles/QueueView.css	2015-01-26 07:59:09 UTC (rev 179106)
@@ -25,7 +25,6 @@
 
 .queue-view {
     width: 200px;
-    min-height: 200px;
     padding: 10px 20px;
 }
 
@@ -121,7 +120,8 @@
 }
 
 .bubble-server-popover,
-.performance-popover {
+.performance-popover,
+.leaks-popover {
     font-family: "HelveticaNeue-Light", "Helvetica Neue", sans-serif;
     color: rgb(145, 135, 95);
     font-size: 12px;

Modified: trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/index.html (179105 => 179106)


--- trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/index.html	2015-01-26 07:10:31 UTC (rev 179105)
+++ trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/index.html	2015-01-26 07:59:09 UTC (rev 179106)
@@ -51,6 +51,7 @@
     <script src=""
     <script src=""
     <script src=""
+    <script src=""
     <script src=""
     <script src=""
     <script src=""

Modified: trunk/Tools/ChangeLog (179105 => 179106)


--- trunk/Tools/ChangeLog	2015-01-26 07:10:31 UTC (rev 179105)
+++ trunk/Tools/ChangeLog	2015-01-26 07:59:09 UTC (rev 179106)
@@ -1,3 +1,39 @@
+2015-01-25  Alexey Proskuryakov  <[email protected]>
+
+        Would like leaks bot results at build.webkit.org/dashboard
+        https://bugs.webkit.org/show_bug.cgi?id=122657
+
+        Reviewed by Darin Adler.
+
+        * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotIteration.js:
+        Record links provided by buildbot steps. Currently, the dashboard hardcodes more links
+        than necessary, could use the ones from buildbot in more places.
+
+        * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotQueue.js:
+        (BuildbotQueue): Reflect configuration option for leaks queues.
+
+        * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/Main.js:
+        Add leaks queues to performance column. First, leaks are about performance indeed,
+        and second, this is where we have some space to spare.
+
+        * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/WebKitBuildbot.js:
+        (WebKitBuildbot): Added Yosemite Leaks queue, which was sitting neglected for at
+        least a year.
+
+        * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Styles/Main.css:
+        (table.queue-grid td): Moved height from queue-view - we can now have more than one
+        queue view per cell. The heigt is needed to avoid ugly overlapping while loading
+        results - once the results are loaded, all rows are currently higher than that.
+
+        * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Styles/QueueView.css:
+        (.leaks-popover): Added.
+
+        * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotLeaksQueueView.js:
+        Added.
+
+        * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/index.html:
+        Load BuildbotLeaksQueueView.js.
+
 2015-01-25  [email protected]  <[email protected]>
 
         [Win] Add WebKit message loop interface.
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to