build.webkit.org/dashboard: Switch EWS view to using actual retry count
authorap@apple.com <ap@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 30 Sep 2014 19:48:09 +0000 (19:48 +0000)
committerap@apple.com <ap@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 30 Sep 2014 19:48:09 +0000 (19:48 +0000)
https://bugs.webkit.org/show_bug.cgi?id=137240

Reviewed by Ryosuke Niwa.

* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/EWSQueue.js:
(EWSQueue.prototype.loadDetailedStatus):
* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/EWSQueueView.js:
(EWSQueueView.prototype._popoverContentForEWSQueue):
Use the new retry_count data member from JSON.

* QueueStatusServer/app.yaml: Updating the version.

* QueueStatusServer/handlers/queuestatusjson.py: (QueueStatusJSON._rows_for_work_items):
Instead of message_count, produce retry_count.

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

Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/EWSQueue.js
Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/EWSQueueView.js
Tools/ChangeLog
Tools/QueueStatusServer/app.yaml
Tools/QueueStatusServer/handlers/queuestatusjson.py
Tools/QueueStatusServer/templates/statusbubble.html

index 19ff84b..9a28a83 100644 (file)
@@ -105,7 +105,7 @@ EWSQueue.prototype = {
                     latestMessage: patch.latest_message,
                     latestMessageTime: patch.latest_message_time ? new Date(patch.latest_message_time) : null,
                     detailedResultsURLForLatestMessage: patch.latest_results,
-                    messageCount: patch.message_count,
+                    retryCount: patch.retry_count,
                     active: patch.active,
                     activeSince: new Date(activeSinceTime),
                 });
index d766683..d5b078f 100644 (file)
@@ -154,8 +154,8 @@ EWSQueueView.prototype = {
 
             this.addLinkToRow(rowElement, "patch-details-link", patch.attachmentID, patch.statusPageURL);
 
-            if (patch.messageCount)
-                this.addTextToRow(rowElement, "failure-count", patch.messageCount + "\xa0" + (patch.messageCount === 1 ? "attempt" : "attempts"));
+            if (patch.retryCount)
+                this.addTextToRow(rowElement, "failure-count", patch.retryCount + "\xa0" + (patch.retryCount === 1 ? "attempt" : "attempts"));
 
             if (patch.detailedResultsURLForLatestMessage)
                 this.addLinkToRow(rowElement, "latest-status-with-link", patch.latestMessage, patch.detailedResultsURLForLatestMessage);
index e3c5da3..67565f1 100644 (file)
@@ -1,5 +1,23 @@
 2014-09-30  Alexey Proskuryakov  <ap@apple.com>
 
+        build.webkit.org/dashboard: Switch EWS view to using actual retry count
+        https://bugs.webkit.org/show_bug.cgi?id=137240
+
+        Reviewed by Ryosuke Niwa.
+
+        * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/EWSQueue.js:
+        (EWSQueue.prototype.loadDetailedStatus):
+        * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/EWSQueueView.js:
+        (EWSQueueView.prototype._popoverContentForEWSQueue):
+        Use the new retry_count data member from JSON.
+
+        * QueueStatusServer/app.yaml: Updating the version.
+
+        * QueueStatusServer/handlers/queuestatusjson.py: (QueueStatusJSON._rows_for_work_items):
+        Instead of message_count, produce retry_count.
+
+2014-09-30  Alexey Proskuryakov  <ap@apple.com>
+
         EWS doesn't need to show all the bubbles when a patch fails to apply
         https://bugs.webkit.org/show_bug.cgi?id=137256
 
index 3135e4b..4c6940c 100644 (file)
@@ -1,5 +1,5 @@
 application: webkit-queues
-version: 174114 # Bugzilla bug ID of last major change
+version: 174115 # Bugzilla bug ID of last major change
 runtime: python
 api_version: 1
 
index 723c276..3f1fcf2 100644 (file)
@@ -26,6 +26,7 @@ import itertools
 from google.appengine.ext import webapp
 from google.appengine.ext.webapp import template
 
+from model.patchlog import PatchLog
 from model.queues import Queue
 from model.queuestatus import QueueStatus
 
@@ -57,17 +58,22 @@ class QueueStatusJSON(webapp.RequestHandler):
                 bug_id = statuses[0].active_bug_id
                 results_url = self.request.host_url + "/results/" + str(statuses[0].key().id()) if statuses[0].results_file else None
 
-            rows.append({
+            row = {
                 "attachment_id": item_id,
                 "bug_id": bug_id,
                 "active": active_items and active_items.time_for_item(item_id) != None,
                 "active_since": active_items and active_items.time_for_item(item_id),
                 "latest_message": message,
                 "latest_message_time": message_time,
-                "message_count": patchStatusQuery.count(),
                 "status_page": self.request.host_url + "/patch/" + str(item_id),
                 "latest_results": results_url,
-            })
+            }
+
+            patch_log = PatchLog.lookup_if_exists(item_id, queue.name())
+            if patch_log and patch_log.retry_count:
+                row["retry_count"] = patch_log.retry_count
+
+            rows.append(row)
         return rows
 
     def _bots(self, queue):
index 5f5aa57..ef3ecb0 100644 (file)
@@ -36,7 +36,7 @@ body {
     background-color: #E98080;
 }
 .started {
-    background-color: #D8FFFA;
+    background-color: #E1F5FF;
 }
 .provisional-fail {
     background-color: #FFAF05;