Changeset 174114 in webkit
- Timestamp:
- Sep 30, 2014 12:43:58 PM (10 years ago)
- Location:
- trunk/Tools
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Tools/ChangeLog
r174107 r174114 1 2014-09-30 Alexey Proskuryakov <ap@apple.com> 2 3 EWS doesn't need to show all the bubbles when a patch fails to apply 4 https://bugs.webkit.org/show_bug.cgi?id=137256 5 6 Reviewed by Ryosuke Niwa. 7 8 * QueueStatusServer/app.yaml: Updated app version. 9 10 * QueueStatusServer/handlers/statusbubble.py: 11 (StatusBubble._build_bubble): 12 (StatusBubble._build_bubbles_for_attachment): 13 (StatusBubble.get): 14 * QueueStatusServer/templates/statusbubble.html: 15 When some queues fail to apply, and no queues had meaningful output (meaning that 16 they will almost certainly fail to apply later), we can show a single bubble 17 telling the user just that. 18 1 19 2014-09-30 Tibor Meszaros <tmeszaros.u-szeged@partner.samsung.com> 2 20 -
trunk/Tools/QueueStatusServer/app.yaml
r174092 r174114 1 1 application: webkit-queues 2 version: 1741 92# Bugzilla bug ID of last major change2 version: 174114 # Bugzilla bug ID of last major change 3 3 runtime: python 4 4 api_version: 1 -
trunk/Tools/QueueStatusServer/handlers/statusbubble.py
r174092 r174114 119 119 bubble["state"] = "started" 120 120 bubble["details_message"] = "Started processing, no output yet.\n\n" + self._iso_time(queue.active_work_items().time_for_item(attachment.id)) 121 bubble["may_fail_to_apply"] = True 121 122 else: 122 123 real_queue_position = self._real_queue_position(queue, queue_position) … … 124 125 bubble["details_message"] = "Waiting in queue, processing has not started yet.\n\nPosition in queue: " + str(real_queue_position) 125 126 bubble["queue_position"] = real_queue_position 127 bubble["may_fail_to_apply"] = True 126 128 else: 127 129 latest_resultative_status = self._latest_resultative_status(statuses) … … 145 147 bubble["details_message"] += " Some messages were logged while the patch was still eligible:\n\n" 146 148 bubble["details_message"] += "\n".join([status.message for status in statuses[1:]]) + "\n\n" + self._iso_time(statuses[0].date) 149 bubble["may_fail_to_apply"] = True 147 150 elif statuses[0].message == "Error: " + queue.name() + " unable to apply patch.": 148 151 bubble["state"] = "fail" 149 152 bubble["details_message"] = statuses[1].message + "\n\n" + self._iso_time(statuses[0].date) 153 bubble["failed_to_apply"] = True 150 154 elif statuses[0].message.startswith("Error: "): 151 155 bubble["state"] = "error" … … 158 162 bubble["details_message"] = ("Internal error. Latest status implies that the patch should be in queue, but it is not. Recent messages:\n\n" 159 163 + "\n".join([status.message for status in statuses]) + "\n\n" + self._iso_time(statuses[0].date)) 164 bubble["may_fail_to_apply"] = True 160 165 161 166 if "details_message" in bubble: … … 185 190 show_submit_to_ews = False 186 191 187 return (bubbles, show_submit_to_ews) 192 failed_to_apply = any(map(lambda bubble: "failed_to_apply" in bubble, bubbles)) 193 had_output = all(map(lambda bubble: not "may_fail_to_apply" in bubble and not "failed_to_apply" in bubble, bubbles)) 194 195 return (bubbles, show_submit_to_ews, failed_to_apply and (not had_output) and (not show_submit_to_ews)) 188 196 189 197 def get(self, attachment_id_string): 190 198 attachment_id = int(attachment_id_string) 191 199 attachment = Attachment(attachment_id) 192 bubbles, show_submit_to_ews = self._build_bubbles_for_attachment(attachment)200 bubbles, show_submit_to_ews, show_failure_to_apply = self._build_bubbles_for_attachment(attachment) 193 201 194 202 template_values = { … … 196 204 "attachment_id": attachment_id, 197 205 "show_submit_to_ews": show_submit_to_ews, 206 "show_failure_to_apply": show_failure_to_apply, 198 207 } 199 208 self.response.out.write(template.render("templates/statusbubble.html", template_values)) -
trunk/Tools/QueueStatusServer/templates/statusbubble.html
r174087 r174114 64 64 <body> 65 65 <div id="bubbleContainer"> 66 {% if show_failure_to_apply %} 67 <a class="status fail" target="_top" 68 href="/patch/{{ attachment_id }}" 69 title="None of the queues could apply the patch" 70 > 71 patch does not apply to trunk of repository 72 </a> 73 {% else %} 66 74 {% for bubble in bubbles %} 67 75 <a class="status {{ bubble.state }}" target="_top" … … 77 85 </a> 78 86 {% endfor %} 87 {% endif %} 79 88 80 89 {% if show_submit_to_ews %}
Note: See TracChangeset
for help on using the changeset viewer.