<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[174114] trunk/Tools</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/174114">174114</a></dd>
<dt>Author</dt> <dd>ap@apple.com</dd>
<dt>Date</dt> <dd>2014-09-30 12:43:58 -0700 (Tue, 30 Sep 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>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.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkToolsChangeLog">trunk/Tools/ChangeLog</a></li>
<li><a href="#trunkToolsQueueStatusServerappyaml">trunk/Tools/QueueStatusServer/app.yaml</a></li>
<li><a href="#trunkToolsQueueStatusServerhandlersstatusbubblepy">trunk/Tools/QueueStatusServer/handlers/statusbubble.py</a></li>
<li><a href="#trunkToolsQueueStatusServertemplatesstatusbubblehtml">trunk/Tools/QueueStatusServer/templates/statusbubble.html</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkToolsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Tools/ChangeLog (174113 => 174114)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/ChangeLog        2014-09-30 19:21:25 UTC (rev 174113)
+++ trunk/Tools/ChangeLog        2014-09-30 19:43:58 UTC (rev 174114)
</span><span class="lines">@@ -1,3 +1,21 @@
</span><ins>+2014-09-30  Alexey Proskuryakov  &lt;ap@apple.com&gt;
+
+        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.
+
</ins><span class="cx"> 2014-09-30  Tibor Meszaros  &lt;tmeszaros.u-szeged@partner.samsung.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [EFL] Bump EFL version to 1.11.2
</span></span></pre></div>
<a id="trunkToolsQueueStatusServerappyaml"></a>
<div class="modfile"><h4>Modified: trunk/Tools/QueueStatusServer/app.yaml (174113 => 174114)</h4>
<pre class="diff"><span>
<span class="info">--- 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)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><span class="cx"> application: webkit-queues
</span><del>-version: 174192 # Bugzilla bug ID of last major change
</del><ins>+version: 174114 # Bugzilla bug ID of last major change
</ins><span class="cx"> runtime: python
</span><span class="cx"> api_version: 1
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkToolsQueueStatusServerhandlersstatusbubblepy"></a>
<div class="modfile"><h4>Modified: trunk/Tools/QueueStatusServer/handlers/statusbubble.py (174113 => 174114)</h4>
<pre class="diff"><span>
<span class="info">--- 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)
</span><span class="lines">@@ -118,11 +118,13 @@
</span><span class="cx">             if attachment.id in queue.active_work_items().item_ids:
</span><span class="cx">                 bubble[&quot;state&quot;] = &quot;started&quot;
</span><span class="cx">                 bubble[&quot;details_message&quot;] = &quot;Started processing, no output yet.\n\n&quot; + self._iso_time(queue.active_work_items().time_for_item(attachment.id))
</span><ins>+                bubble[&quot;may_fail_to_apply&quot;] = True
</ins><span class="cx">             else:
</span><span class="cx">                 real_queue_position = self._real_queue_position(queue, queue_position)
</span><span class="cx">                 bubble[&quot;state&quot;] = &quot;none&quot;
</span><span class="cx">                 bubble[&quot;details_message&quot;] = &quot;Waiting in queue, processing has not started yet.\n\nPosition in queue: &quot; + str(real_queue_position)
</span><span class="cx">                 bubble[&quot;queue_position&quot;] = real_queue_position
</span><ins>+                bubble[&quot;may_fail_to_apply&quot;] = True
</ins><span class="cx">         else:
</span><span class="cx">             latest_resultative_status = self._latest_resultative_status(statuses)
</span><span class="cx">             if not latest_resultative_status:
</span><span class="lines">@@ -144,9 +146,11 @@
</span><span class="cx">                     else:
</span><span class="cx">                         bubble[&quot;details_message&quot;] += &quot; Some messages were logged while the patch was still eligible:\n\n&quot;
</span><span class="cx">                     bubble[&quot;details_message&quot;] += &quot;\n&quot;.join([status.message for status in statuses[1:]]) + &quot;\n\n&quot; + self._iso_time(statuses[0].date)
</span><ins>+                bubble[&quot;may_fail_to_apply&quot;] = True
</ins><span class="cx">             elif statuses[0].message == &quot;Error: &quot; + queue.name() + &quot; unable to apply patch.&quot;:
</span><span class="cx">                 bubble[&quot;state&quot;] = &quot;fail&quot;
</span><span class="cx">                 bubble[&quot;details_message&quot;] = statuses[1].message + &quot;\n\n&quot; + self._iso_time(statuses[0].date)
</span><ins>+                bubble[&quot;failed_to_apply&quot;] = True
</ins><span class="cx">             elif statuses[0].message.startswith(&quot;Error: &quot;):
</span><span class="cx">                 bubble[&quot;state&quot;] = &quot;error&quot;
</span><span class="cx">                 bubble[&quot;details_message&quot;] = &quot;\n&quot;.join([status.message for status in statuses]) + &quot;\n\n&quot; + self._iso_time(statuses[0].date)
</span><span class="lines">@@ -157,6 +161,7 @@
</span><span class="cx">                 bubble[&quot;state&quot;] = &quot;error&quot;
</span><span class="cx">                 bubble[&quot;details_message&quot;] = (&quot;Internal error. Latest status implies that the patch should be in queue, but it is not. Recent messages:\n\n&quot;
</span><span class="cx">                     + &quot;\n&quot;.join([status.message for status in statuses]) + &quot;\n\n&quot; + self._iso_time(statuses[0].date))
</span><ins>+            bubble[&quot;may_fail_to_apply&quot;] = True
</ins><span class="cx"> 
</span><span class="cx">         if &quot;details_message&quot; in bubble:
</span><span class="cx">             bubble[&quot;details_message&quot;] = queue.display_name() + &quot;\n\n&quot; + bubble[&quot;details_message&quot;]
</span><span class="lines">@@ -184,16 +189,20 @@
</span><span class="cx">             if queue.is_ews():
</span><span class="cx">                 show_submit_to_ews = False
</span><span class="cx"> 
</span><del>-        return (bubbles, show_submit_to_ews)
</del><ins>+        failed_to_apply = any(map(lambda bubble: &quot;failed_to_apply&quot; in bubble, bubbles))
+        had_output = all(map(lambda bubble: not &quot;may_fail_to_apply&quot; in bubble and not &quot;failed_to_apply&quot; in bubble, bubbles))
</ins><span class="cx"> 
</span><ins>+        return (bubbles, show_submit_to_ews, failed_to_apply and (not had_output) and (not show_submit_to_ews))
+
</ins><span class="cx">     def get(self, attachment_id_string):
</span><span class="cx">         attachment_id = int(attachment_id_string)
</span><span class="cx">         attachment = Attachment(attachment_id)
</span><del>-        bubbles, show_submit_to_ews = self._build_bubbles_for_attachment(attachment)
</del><ins>+        bubbles, show_submit_to_ews, show_failure_to_apply = self._build_bubbles_for_attachment(attachment)
</ins><span class="cx"> 
</span><span class="cx">         template_values = {
</span><span class="cx">             &quot;bubbles&quot;: bubbles,
</span><span class="cx">             &quot;attachment_id&quot;: attachment_id,
</span><span class="cx">             &quot;show_submit_to_ews&quot;: show_submit_to_ews,
</span><ins>+            &quot;show_failure_to_apply&quot;: show_failure_to_apply,
</ins><span class="cx">         }
</span><span class="cx">         self.response.out.write(template.render(&quot;templates/statusbubble.html&quot;, template_values))
</span></span></pre></div>
<a id="trunkToolsQueueStatusServertemplatesstatusbubblehtml"></a>
<div class="modfile"><h4>Modified: trunk/Tools/QueueStatusServer/templates/statusbubble.html (174113 => 174114)</h4>
<pre class="diff"><span>
<span class="info">--- 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)
</span><span class="lines">@@ -63,6 +63,14 @@
</span><span class="cx"> &lt;/head&gt;
</span><span class="cx"> &lt;body&gt;
</span><span class="cx"> &lt;div id=&quot;bubbleContainer&quot;&gt;
</span><ins>+  {% if show_failure_to_apply %}
+  &lt;a class=&quot;status fail&quot; target=&quot;_top&quot;
+      href=&quot;/patch/{{ attachment_id }}&quot;
+      title=&quot;None of the queues could apply the patch&quot;
+  &gt;
+    patch does not apply to trunk of repository
+  &lt;/a&gt;
+  {% else %}
</ins><span class="cx">   {% for bubble in bubbles %}
</span><span class="cx">   &lt;a class=&quot;status {{ bubble.state }}&quot; target=&quot;_top&quot;
</span><span class="cx">       href=&quot;/patch/{{ bubble.attachment_id }}&quot;
</span><span class="lines">@@ -76,6 +84,7 @@
</span><span class="cx">     {% endif %}
</span><span class="cx">   &lt;/a&gt;
</span><span class="cx">   {% endfor %}
</span><ins>+  {% endif %}
</ins><span class="cx"> 
</span><span class="cx"> {% if show_submit_to_ews %}
</span><span class="cx">   &lt;form name=&quot;submit_to_ews&quot; method=&quot;POST&quot; action=&quot;/submit-to-ews&quot;&gt;
</span></span></pre>
</div>
</div>

</body>
</html>