Changeset 161090 in webkit


Ignore:
Timestamp:
Dec 26, 2013 10:01:50 AM (10 years ago)
Author:
ap@apple.com
Message:

Please clarify "pending" reporting at build.webkit.org/dashboard
https://bugs.webkit.org/show_bug.cgi?id=122191

Reviewed by Timothy Hatcher.

Reporting the count of pending runs didn't make a lot of sense - first, runs are
coalesced and sometimes even out of order, and second, buildbot's notion of pending
run was confusingly different from dashboard's.

Let's display how many SVN revisions are pending. This can be somewhat misleading
too, because some revisions (like those for other platforms) don't trigger builds,
but it's better than what we had.

This patch also lays the groundwork for displaying detailed information about
pending revisions.

  • BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotBuilderQueueView.js:

(BuildbotBuilderQueueView.prototype.update.appendBuilderQueueStatus): Instead of
building pending status line directly, call newly added base class method.

  • BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotTesterQueueView.js:

(BuildbotTesterQueueView.prototype.update.appendBuilderQueueStatus): Ditto.

  • BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotQueueView.js:

(BuildbotQueueView): Listen for events when new SVN revisions are landed, and update the view.
(BuildbotQueueView.prototype._appendPendingRevisionCount): Add a line for pending
SVN revisions. It uses a new style, StatusLineView.Status.NoBubble, because this
information is secondary, and doesn't need as much attention.
(BuildbotQueueView.prototype.revisionLinksForIteration): Build revisionURL through
Trac, not through Buildbot.
(BuildbotQueueView.prototype._newCommitsRecorded): Schedule an update, just like when
iterations are updated.

  • BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/Initialization.js:

Initialize a global webkitTrac object.

  • BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/StatusLineView.js:
  • BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Styles/StatusLineView.css:

Added a new style for messages without a bubble.

  • BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/Trac.js:

Added a model class for Trac, which keeps track of SVN timeline, and notifies
listeners of changes. It uses an RSS interface to Trac, because there is no JSON one.

  • BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/Utilities.js:

(loadXML): Added a function to load XML asynchronouly, just like existing JSON.load.

  • BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/WebKitBuildbot.js:

Removed tracRevisionURL() function. Now that we have a Trac object, it just makes
more sense to build trac URLs through it.

  • BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/index.html:

Load Trac.js.

Location:
trunk/Tools
Files:
1 added
10 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotBuilderQueueView.js

    r159484 r161090  
    6161        function appendBuilderQueueStatus(queue)
    6262        {
    63             var pendingBuildCount = queue.pendingIterationsCount;
    64             if (pendingBuildCount) {
    65                 var message = pendingBuildCount === 1 ? "pending build" : "pending builds";
    66                 var status = new StatusLineView(message, StatusLineView.Status.Neutral, null, pendingBuildCount);
    67                 this.element.appendChild(status.element);
    68             }
     63            this._appendPendingRevisionCount(queue)
    6964
    7065            var firstRecentFailedIteration = queue.firstRecentFailedIteration;
  • trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotQueueView.js

    r161078 r161090  
    5151    }.bind(this));
    5252
     53    webkitTrac.addEventListener(Trac.Event.NewCommitsRecorded, this._newCommitsRecorded, this);
     54    if (typeof internalTrac != "undefined")
     55        internalTrac.addEventListener(Trac.Event.NewCommitsRecorded, this._newCommitsRecorded, this);
     56
    5357    this.updateTimer = null;
    5458    this._updateHiddenState();
     
    8286    },
    8387
     88    _appendPendingRevisionCount: function(queue)
     89    {
     90        for (var i = 0; i < queue.iterations.length; ++i) {
     91            var iteration = queue.iterations[i];
     92            if (!iteration.loaded || !iteration.finished)
     93                continue;
     94
     95            var latestRecordedOpenSourceRevisionNumber = webkitTrac.latestRecordedRevisionNumber;
     96            if (!latestRecordedOpenSourceRevisionNumber)
     97                return;
     98
     99            var openSourceRevisionsBehind = latestRecordedOpenSourceRevisionNumber - iteration.openSourceRevision;
     100            if (openSourceRevisionsBehind < 0)
     101                openSourceRevisionsBehind = 0;
     102
     103            if (iteration.internalRevision) {
     104                var latestRecordedInternalRevisionNumber = internalTrac.latestRecordedRevisionNumber;
     105                if (!latestRecordedInternalRevisionNumber)
     106                    return;
     107
     108                var internalRevisionsBehind = latestRecordedInternalRevisionNumber - iteration.internalRevision;
     109                if (internalRevisionsBehind < 0)
     110                    internalRevisionsBehind = 0;
     111                if (openSourceRevisionsBehind || internalRevisionsBehind) {
     112                    var message = openSourceRevisionsBehind + " \uff0b " + internalRevisionsBehind + " revisions behind";
     113                    var status = new StatusLineView(message, StatusLineView.Status.NoBubble);
     114                    this.element.appendChild(status.element);
     115                }
     116            } else if (openSourceRevisionsBehind) {
     117                var message = openSourceRevisionsBehind + " " + (openSourceRevisionsBehind === 1 ? "revision behind" : "revisions behind");
     118                var status = new StatusLineView(message, StatusLineView.Status.NoBubble);
     119                this.element.appendChild(status.element);
     120            }
     121
     122            return;
     123        }
     124    },
     125
    84126    revisionLinksForIteration: function(iteration)
    85127    {
    86         function linkForRevision(revision, internal)
     128        function linkForRevision(revision, trac)
    87129        {
    88130            var linkElement = document.createElement("a");
    89             linkElement.href = iteration.queue.buildbot.tracRevisionURL(revision, internal);
     131            linkElement.href = trac.revisionURL(revision);
    90132            linkElement.target = "_blank";
    91133            linkElement.textContent = "r" + revision;
     
    96138
    97139        console.assert(iteration.openSourceRevision);
    98         var openSourceLink = linkForRevision(iteration.openSourceRevision, false);
     140        var openSourceLink = linkForRevision(iteration.openSourceRevision, webkitTrac);
    99141
    100142        if (!iteration.internalRevision)
    101143            return openSourceLink;
    102144
    103         var internalLink = linkForRevision(iteration.internalRevision, true);
     145        var internalLink = linkForRevision(iteration.internalRevision, internalTrac);
    104146
    105147        var fragment = document.createDocumentFragment();
     
    142184    {
    143185        this.updateSoon();
     186    },
     187   
     188    _newCommitsRecorded: function(event)
     189    {
     190        this.updateSoon();
    144191    }
    145192};
  • trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotTesterQueueView.js

    r159484 r161090  
    4545        function appendBuilderQueueStatus(queue)
    4646        {
    47             var pendingRunsCount = queue.pendingIterationsCount;
    48             if (pendingRunsCount) {
    49                 var message = pendingRunsCount === 1 ? "pending test run" : "pending test runs";
    50                 var status = new StatusLineView(message, StatusLineView.Status.Neutral, null, pendingRunsCount);
    51                 this.element.appendChild(status.element);
    52             }
     47            this._appendPendingRevisionCount(queue);
    5348
    5449            var appendedStatus = false;
  • trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/Initialization.js

    r159352 r161090  
    2626var settings = new Settings;
    2727var buildbot = new WebKitBuildbot;
     28var webkitTrac = new Trac("http://trac.webkit.org/");
  • trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/StatusLineView.js

    r159382 r161090  
    3636    this._statusBubbleElement = document.createElement("div");
    3737    this._statusBubbleElement.classList.add("bubble");
    38     this.element.appendChild(this._statusBubbleElement);
     38    if (status != StatusLineView.Status.NoBubble)
     39        this.element.appendChild(this._statusBubbleElement);
    3940
    4041    this._labelElement = document.createElement("div");
     
    5859
    5960StatusLineView.Status = {
     61    NoBubble: "no-bubble",
    6062    Neutral: "neutral",
    6163    Good: "good",
  • trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/Utilities.js

    r156685 r161090  
    5151};
    5252
     53function loadXML(url, callback) {
     54    console.assert(url);
     55
     56    if (!(callback instanceof Function))
     57        return;
     58
     59    var request = new XMLHttpRequest;
     60    request.onreadystatechange = function() {
     61        if (this.readyState !== 4)
     62            return;
     63
     64        // Allow a status of 0 for easier testing with local files.
     65        if (!this.status || this.status === 200)
     66            callback(request.responseXML);
     67    };
     68
     69    request.open("GET", url);
     70    request.send();
     71};
     72
    5373Element.prototype.removeChildren = function()
    5474{
  • trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/WebKitBuildbot.js

    r158192 r161090  
    6060    __proto__: Buildbot.prototype,
    6161
    62     tracRevisionURL: function(revision)
    63     {
    64         return "http://trac.webkit.org/changeset/" + revision;
    65     },
    66 
    6762    buildLogURLForIteration: function(iteration)
    6863    {
  • trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Styles/StatusLineView.css

    r159601 r161090  
    122122
    123123.status-line.neutral .label,
    124 .status-line.neutral .message {
     124.status-line.neutral .message,
     125.status-line.no-bubble .label,
     126.status-line.no-bubble .message {
    125127    color: rgb(145, 135, 95);
    126128}
  • trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/index.html

    r159352 r161090  
    4646    <script src="Scripts/StatusLineView.js"></script>
    4747    <script src="Scripts/Settings.js"></script>
     48    <script src="Scripts/Trac.js"></script>
    4849    <script src="Scripts/Initialization.js"></script>
    4950    <script src="Scripts/Main.js"></script>
  • trunk/Tools/ChangeLog

    r161082 r161090  
     12013-12-25  Alexey Proskuryakov  <ap@apple.com>
     2
     3        Please clarify "pending" reporting at build.webkit.org/dashboard
     4        https://bugs.webkit.org/show_bug.cgi?id=122191
     5
     6        Reviewed by Timothy Hatcher.
     7
     8        Reporting the count of pending runs didn't make a lot of sense - first, runs are
     9        coalesced and sometimes even out of order, and second, buildbot's notion of pending
     10        run was confusingly different from dashboard's.
     11
     12        Let's display how many SVN revisions are pending. This can be somewhat misleading
     13        too, because some revisions (like those for other platforms) don't trigger builds,
     14        but it's better than what we had.
     15
     16        This patch also lays the groundwork for displaying detailed information about
     17        pending revisions.
     18
     19        * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotBuilderQueueView.js:
     20        (BuildbotBuilderQueueView.prototype.update.appendBuilderQueueStatus): Instead of
     21        building pending status line directly, call newly added base class method.
     22
     23        * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotTesterQueueView.js:
     24        (BuildbotTesterQueueView.prototype.update.appendBuilderQueueStatus): Ditto.
     25
     26        * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotQueueView.js:
     27        (BuildbotQueueView): Listen for events when new SVN revisions are landed, and update the view.
     28        (BuildbotQueueView.prototype._appendPendingRevisionCount): Add a line for pending
     29        SVN revisions. It uses a new style, StatusLineView.Status.NoBubble, because this
     30        information is secondary, and doesn't need as much attention.
     31        (BuildbotQueueView.prototype.revisionLinksForIteration): Build revisionURL through
     32        Trac, not through Buildbot.
     33        (BuildbotQueueView.prototype._newCommitsRecorded): Schedule an update, just like when
     34        iterations are updated.
     35
     36        * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/Initialization.js:
     37        Initialize a global webkitTrac object.
     38
     39        * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/StatusLineView.js:
     40        * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Styles/StatusLineView.css:
     41        Added a new style for messages without a bubble.
     42
     43        * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/Trac.js:
     44        Added a model class for Trac, which keeps track of SVN timeline, and notifies
     45        listeners of changes. It uses an RSS interface to Trac, because there is no JSON one.
     46
     47        * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/Utilities.js:
     48        (loadXML): Added a function to load XML asynchronouly, just like existing JSON.load.
     49
     50        * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/WebKitBuildbot.js:
     51        Removed tracRevisionURL() function. Now that we have a Trac object, it just makes
     52        more sense to build trac URLs through it.
     53
     54        * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/index.html:
     55        Load Trac.js.
     56
    1572013-12-25  Jongwoo Choi  <jw0330.choi@samsung.com>
    258
Note: See TracChangeset for help on using the changeset viewer.