Bugzilla status bubble displays an exception showing attachment 175738
authorap@apple.com <ap@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 3 Oct 2014 23:48:52 +0000 (23:48 +0000)
committerap@apple.com <ap@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 3 Oct 2014 23:48:52 +0000 (23:48 +0000)
https://bugs.webkit.org/show_bug.cgi?id=137410

Reviewed by Tim Horton.

* QueueStatusServer/app.yaml: Update version.

* QueueStatusServer/handlers/statusbubble.py: (StatusBubble._build_bubble):
Don't fail even if expected status message is missing.

* QueueStatusServer/model/patchlog.py: (PatchLog): Quick unrelated fix - define
the field in the same way it's defined in QueueStatus table.

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

Tools/QueueStatusServer/app.yaml
Tools/QueueStatusServer/handlers/statusbubble.py
Tools/QueueStatusServer/model/patchlog.py

index 1600cda..31645d9 100644 (file)
@@ -1,5 +1,5 @@
 application: webkit-queues
-version: 174302 # Bugzilla bug ID of last major change
+version: 174304 # Bugzilla bug ID of last major change
 runtime: python
 api_version: 1
 
index 6551f92..aff302a 100644 (file)
@@ -138,7 +138,8 @@ class StatusBubble(webapp.RequestHandler):
                 bubble["details_message"] = "Pass\n\n" + self._iso_time(statuses[0].date)
             elif statuses[0].message == "Fail":
                 bubble["state"] = "fail"
-                bubble["details_message"] = statuses[1].message + "\n\n" + self._iso_time(statuses[0].date)
+                message_to_display = statuses[1].message if len(statuses) > 1 else statuses[0].message
+                bubble["details_message"] = message_to_display + "\n\n" + self._iso_time(statuses[0].date)
             elif statuses[0].message == "Error: " + queue.name() + " did not process patch.":
                 bubble["state"] = "none"
                 bubble["details_message"] = "The patch is no longer eligible for processing."
@@ -150,7 +151,8 @@ class StatusBubble(webapp.RequestHandler):
                     bubble["details_message"] += "\n".join([status.message for status in statuses[1:]]) + "\n\n" + self._iso_time(statuses[0].date)
             elif statuses[0].message == "Error: " + queue.name() + " unable to apply patch.":
                 bubble["state"] = "fail"
-                bubble["details_message"] = statuses[1].message + "\n\n" + self._iso_time(statuses[0].date)
+                message_to_display = statuses[1].message if len(statuses) > 1 else statuses[0].message
+                bubble["details_message"] = message_to_display + "\n\n" + self._iso_time(statuses[0].date)
                 bubble["failed_to_apply"] = True
             elif statuses[0].message.startswith("Error: "):
                 bubble["state"] = "error"
index 2ca0869..b633494 100644 (file)
@@ -41,7 +41,7 @@ class PatchLog(db.Model):
     finished = db.BooleanProperty(default=False)
     wait_duration = db.IntegerProperty()
     process_duration = db.IntegerProperty()
-    latest_message = db.StringProperty()
+    latest_message = db.StringProperty(multiline=True)
 
     @classmethod
     def lookup(cls, attachment_id, queue_name):