2011-04-14 Eric Seidel <eric@webkit.org>
authoreric@webkit.org <eric@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 14 Apr 2011 18:55:31 +0000 (18:55 +0000)
committereric@webkit.org <eric@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 14 Apr 2011 18:55:31 +0000 (18:55 +0000)
        Reviewed by Dimitri Glazkov.

        queues.webkit.org should display when a bot last passed a patch
        https://bugs.webkit.org/show_bug.cgi?id=58546

        I am suspicious that some of our commit-queue instances are never
        actually passing anything.

        This will let us know if those bots are never passing patches.

        * QueueStatusServer/handlers/queuestatus.py:
        * QueueStatusServer/index.yaml:
        * QueueStatusServer/templates/queuestatus.html:

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

Tools/ChangeLog
Tools/QueueStatusServer/handlers/queuestatus.py
Tools/QueueStatusServer/index.yaml
Tools/QueueStatusServer/templates/queuestatus.html

index 46be844..5b9b9b8 100644 (file)
@@ -1,3 +1,19 @@
+2011-04-14  Eric Seidel  <eric@webkit.org>
+
+        Reviewed by Dimitri Glazkov.
+
+        queues.webkit.org should display when a bot last passed a patch
+        https://bugs.webkit.org/show_bug.cgi?id=58546
+
+        I am suspicious that some of our commit-queue instances are never
+        actually passing anything.
+
+        This will let us know if those bots are never passing patches.
+
+        * QueueStatusServer/handlers/queuestatus.py:
+        * QueueStatusServer/index.yaml:
+        * QueueStatusServer/templates/queuestatus.html:
+
 2011-04-14  Dirk Pranke  <dpranke@chromium.org>
 
         Reviewed by Adam Roben.
index e5dc95f..fc838f4 100644 (file)
@@ -63,6 +63,14 @@ class QueueStatus(webapp.RequestHandler):
             statuses.filter("bot_id =", bot_id)
         return statuses.order("-date").fetch(15)
 
+    def _fetch_last_pass(self, queue, bot_id):
+        statuses = queuestatus.QueueStatus.all()
+        statuses = statuses.filter("queue_name =", queue.name())
+        if bot_id:
+            statuses.filter("bot_id =", bot_id)
+        statuses.filter("message =", "Pass")
+        return statuses.order("-date").get()
+
     def _page_title(self, queue, bot_id):
         title = "%s Messages" % queue.display_name()
         if bot_id:
@@ -77,10 +85,12 @@ class QueueStatus(webapp.RequestHandler):
             return
 
         statuses = self._fetch_statuses(queue, bot_id)
+        last_pass = self._fetch_last_pass(queue, bot_id)
         template_values = {
             "page_title": self._page_title(queue, bot_id),
             "work_item_rows": self._rows_for_work_items(queue),
             "status_groups": self._build_status_groups(statuses),
             "bot_id": bot_id,
+            "last_pass": last_pass,
         }
         self.response.out.write(template.render("templates/queuestatus.html", template_values))
index 9724760..55bfb57 100644 (file)
@@ -26,6 +26,21 @@ indexes:
 - kind: QueueStatus
   properties:
   - name: bot_id
+  - name: message
+  - name: queue_name
+  - name: date
+    direction: desc
+
+- kind: QueueStatus
+  properties:
+  - name: bot_id
+  - name: queue_name
+  - name: date
+    direction: desc
+
+- kind: QueueStatus
+  properties:
+  - name: message
   - name: queue_name
   - name: date
     direction: desc
index c68abf1..5ce02e5 100644 (file)
@@ -7,6 +7,11 @@
 <body>
 <h1>{{ page_title }}</h1>
 
+{% if last_pass %}
+<h3>Summary</h3>
+<div>Last Pass: {{ last_pass.date|timesince }} ago</div>
+{% endif %}
+
 <h3>Recent Status</h3>
 
 <div class="status-details">