Title: [174114] trunk/Tools
- Revision
- 174114
- Author
- [email protected]
- Date
- 2014-09-30 12:43:58 -0700 (Tue, 30 Sep 2014)
Log Message
EWS doesn't need to show all the bubbles when a patch fails to apply
https://bugs.webkit.org/show_bug.cgi?id=137256
Reviewed by Ryosuke Niwa.
* QueueStatusServer/app.yaml: Updated app version.
* QueueStatusServer/handlers/statusbubble.py:
(StatusBubble._build_bubble):
(StatusBubble._build_bubbles_for_attachment):
(StatusBubble.get):
* QueueStatusServer/templates/statusbubble.html:
When some queues fail to apply, and no queues had meaningful output (meaning that
they will almost certainly fail to apply later), we can show a single bubble
telling the user just that.
Modified Paths
Diff
Modified: trunk/Tools/ChangeLog (174113 => 174114)
--- trunk/Tools/ChangeLog 2014-09-30 19:21:25 UTC (rev 174113)
+++ trunk/Tools/ChangeLog 2014-09-30 19:43:58 UTC (rev 174114)
@@ -1,3 +1,21 @@
+2014-09-30 Alexey Proskuryakov <[email protected]>
+
+ EWS doesn't need to show all the bubbles when a patch fails to apply
+ https://bugs.webkit.org/show_bug.cgi?id=137256
+
+ Reviewed by Ryosuke Niwa.
+
+ * QueueStatusServer/app.yaml: Updated app version.
+
+ * QueueStatusServer/handlers/statusbubble.py:
+ (StatusBubble._build_bubble):
+ (StatusBubble._build_bubbles_for_attachment):
+ (StatusBubble.get):
+ * QueueStatusServer/templates/statusbubble.html:
+ When some queues fail to apply, and no queues had meaningful output (meaning that
+ they will almost certainly fail to apply later), we can show a single bubble
+ telling the user just that.
+
2014-09-30 Tibor Meszaros <[email protected]>
[EFL] Bump EFL version to 1.11.2
Modified: trunk/Tools/QueueStatusServer/app.yaml (174113 => 174114)
--- trunk/Tools/QueueStatusServer/app.yaml 2014-09-30 19:21:25 UTC (rev 174113)
+++ trunk/Tools/QueueStatusServer/app.yaml 2014-09-30 19:43:58 UTC (rev 174114)
@@ -1,5 +1,5 @@
application: webkit-queues
-version: 174192 # Bugzilla bug ID of last major change
+version: 174114 # Bugzilla bug ID of last major change
runtime: python
api_version: 1
Modified: trunk/Tools/QueueStatusServer/handlers/statusbubble.py (174113 => 174114)
--- trunk/Tools/QueueStatusServer/handlers/statusbubble.py 2014-09-30 19:21:25 UTC (rev 174113)
+++ trunk/Tools/QueueStatusServer/handlers/statusbubble.py 2014-09-30 19:43:58 UTC (rev 174114)
@@ -118,11 +118,13 @@
if attachment.id in queue.active_work_items().item_ids:
bubble["state"] = "started"
bubble["details_message"] = "Started processing, no output yet.\n\n" + self._iso_time(queue.active_work_items().time_for_item(attachment.id))
+ bubble["may_fail_to_apply"] = True
else:
real_queue_position = self._real_queue_position(queue, queue_position)
bubble["state"] = "none"
bubble["details_message"] = "Waiting in queue, processing has not started yet.\n\nPosition in queue: " + str(real_queue_position)
bubble["queue_position"] = real_queue_position
+ bubble["may_fail_to_apply"] = True
else:
latest_resultative_status = self._latest_resultative_status(statuses)
if not latest_resultative_status:
@@ -144,9 +146,11 @@
else:
bubble["details_message"] += " Some messages were logged while the patch was still eligible:\n\n"
bubble["details_message"] += "\n".join([status.message for status in statuses[1:]]) + "\n\n" + self._iso_time(statuses[0].date)
+ bubble["may_fail_to_apply"] = True
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)
+ bubble["failed_to_apply"] = True
elif statuses[0].message.startswith("Error: "):
bubble["state"] = "error"
bubble["details_message"] = "\n".join([status.message for status in statuses]) + "\n\n" + self._iso_time(statuses[0].date)
@@ -157,6 +161,7 @@
bubble["state"] = "error"
bubble["details_message"] = ("Internal error. Latest status implies that the patch should be in queue, but it is not. Recent messages:\n\n"
+ "\n".join([status.message for status in statuses]) + "\n\n" + self._iso_time(statuses[0].date))
+ bubble["may_fail_to_apply"] = True
if "details_message" in bubble:
bubble["details_message"] = queue.display_name() + "\n\n" + bubble["details_message"]
@@ -184,16 +189,20 @@
if queue.is_ews():
show_submit_to_ews = False
- return (bubbles, show_submit_to_ews)
+ failed_to_apply = any(map(lambda bubble: "failed_to_apply" in bubble, bubbles))
+ had_output = all(map(lambda bubble: not "may_fail_to_apply" in bubble and not "failed_to_apply" in bubble, bubbles))
+ return (bubbles, show_submit_to_ews, failed_to_apply and (not had_output) and (not show_submit_to_ews))
+
def get(self, attachment_id_string):
attachment_id = int(attachment_id_string)
attachment = Attachment(attachment_id)
- bubbles, show_submit_to_ews = self._build_bubbles_for_attachment(attachment)
+ bubbles, show_submit_to_ews, show_failure_to_apply = self._build_bubbles_for_attachment(attachment)
template_values = {
"bubbles": bubbles,
"attachment_id": attachment_id,
"show_submit_to_ews": show_submit_to_ews,
+ "show_failure_to_apply": show_failure_to_apply,
}
self.response.out.write(template.render("templates/statusbubble.html", template_values))
Modified: trunk/Tools/QueueStatusServer/templates/statusbubble.html (174113 => 174114)
--- trunk/Tools/QueueStatusServer/templates/statusbubble.html 2014-09-30 19:21:25 UTC (rev 174113)
+++ trunk/Tools/QueueStatusServer/templates/statusbubble.html 2014-09-30 19:43:58 UTC (rev 174114)
@@ -63,6 +63,14 @@
</head>
<body>
<div id="bubbleContainer">
+ {% if show_failure_to_apply %}
+ <a class="status fail" target="_top"
+ href="" attachment_id }}"
+ title="None of the queues could apply the patch"
+ >
+ patch does not apply to trunk of repository
+ </a>
+ {% else %}
{% for bubble in bubbles %}
<a class="status {{ bubble.state }}" target="_top"
href="" bubble.attachment_id }}"
@@ -76,6 +84,7 @@
{% endif %}
</a>
{% endfor %}
+ {% endif %}
{% if show_submit_to_ews %}
<form name="submit_to_ews" method="POST" action=""
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes