<!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>[174158] 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/174158">174158</a></dd>
<dt>Author</dt> <dd>ap@apple.com</dd>
<dt>Date</dt> <dd>2014-10-01 10:18:10 -0700 (Wed, 01 Oct 2014)</dd>
</dl>
<h3>Log Message</h3>
<pre>EWS is too eager to say that a patch does not apply to trunk of repository
https://bugs.webkit.org/show_bug.cgi?id=137290
Reviewed by Ryosuke Niwa.
* QueueStatusServer/app.yaml: Updated app version.
* QueueStatusServer/handlers/statusbubble.py:
(StatusBubble._build_bubble):
(StatusBubble._build_bubbles_for_attachment):
Rewrote to make more sense.</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>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkToolsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Tools/ChangeLog (174157 => 174158)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/ChangeLog        2014-10-01 16:17:21 UTC (rev 174157)
+++ trunk/Tools/ChangeLog        2014-10-01 17:18:10 UTC (rev 174158)
</span><span class="lines">@@ -1,3 +1,17 @@
</span><ins>+2014-10-01 Alexey Proskuryakov <ap@apple.com>
+
+ EWS is too eager to say that a patch does not apply to trunk of repository
+ https://bugs.webkit.org/show_bug.cgi?id=137290
+
+ Reviewed by Ryosuke Niwa.
+
+ * QueueStatusServer/app.yaml: Updated app version.
+
+ * QueueStatusServer/handlers/statusbubble.py:
+ (StatusBubble._build_bubble):
+ (StatusBubble._build_bubbles_for_attachment):
+ Rewrote to make more sense.
+
</ins><span class="cx"> 2014-09-30 Eva Balazsfalvi <evab.u-szeged@partner.samsung.com>
</span><span class="cx">
</span><span class="cx"> Remove thirdparty/unittest2 from webkitpy
</span></span></pre></div>
<a id="trunkToolsQueueStatusServerappyaml"></a>
<div class="modfile"><h4>Modified: trunk/Tools/QueueStatusServer/app.yaml (174157 => 174158)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/QueueStatusServer/app.yaml        2014-10-01 16:17:21 UTC (rev 174157)
+++ trunk/Tools/QueueStatusServer/app.yaml        2014-10-01 17:18:10 UTC (rev 174158)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><span class="cx"> application: webkit-queues
</span><del>-version: 174124 # Bugzilla bug ID of last major change
</del><ins>+version: 174158 # 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 (174157 => 174158)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/QueueStatusServer/handlers/statusbubble.py        2014-10-01 16:17:21 UTC (rev 174157)
+++ trunk/Tools/QueueStatusServer/handlers/statusbubble.py        2014-10-01 17:18:10 UTC (rev 174158)
</span><span class="lines">@@ -115,18 +115,20 @@
</span><span class="cx"> # 10 recent statuses is enough to always include a resultative one, if there were any at all.
</span><span class="cx"> statuses = QueueStatus.all().filter('queue_name =', queue.name()).filter('active_patch_id =', attachment.id).order('-date').fetch(limit=10)
</span><span class="cx"> if not statuses:
</span><ins>+ bubble["had_resultative_status_other_than_failure_to_apply"] = False
</ins><span class="cx"> if attachment.id in queue.active_work_items().item_ids:
</span><span class="cx"> bubble["state"] = "started"
</span><span class="cx"> bubble["details_message"] = "Started processing, no output yet.\n\n" + self._iso_time(queue.active_work_items().time_for_item(attachment.id))
</span><del>- bubble["may_fail_to_apply"] = True
</del><span class="cx"> else:
</span><span class="cx"> real_queue_position = self._real_queue_position(queue, queue_position)
</span><span class="cx"> bubble["state"] = "none"
</span><span class="cx"> bubble["details_message"] = "Waiting in queue, processing has not started yet.\n\nPosition in queue: " + str(real_queue_position)
</span><span class="cx"> bubble["queue_position"] = real_queue_position
</span><del>- bubble["may_fail_to_apply"] = True
</del><span class="cx"> else:
</span><span class="cx"> latest_resultative_status = self._latest_resultative_status(statuses)
</span><ins>+ bubble["had_resultative_status_other_than_failure_to_apply"] = any(map(lambda status:
+ latest_resultative_status and latest_resultative_status.message != "Error: " + queue.name() + " unable to apply patch.",
+ statuses))
</ins><span class="cx"> if not latest_resultative_status:
</span><span class="cx"> bubble["state"] = "started"
</span><span class="cx"> bubble["details_message"] = ("Started processing.\n\nRecent messages:\n\n"
</span><span class="lines">@@ -146,7 +148,6 @@
</span><span class="cx"> else:
</span><span class="cx"> bubble["details_message"] += " Some messages were logged while the patch was still eligible:\n\n"
</span><span class="cx"> bubble["details_message"] += "\n".join([status.message for status in statuses[1:]]) + "\n\n" + self._iso_time(statuses[0].date)
</span><del>- bubble["may_fail_to_apply"] = True
</del><span class="cx"> elif statuses[0].message == "Error: " + queue.name() + " unable to apply patch.":
</span><span class="cx"> bubble["state"] = "fail"
</span><span class="cx"> bubble["details_message"] = statuses[1].message + "\n\n" + self._iso_time(statuses[0].date)
</span><span class="lines">@@ -189,9 +190,9 @@
</span><span class="cx"> show_submit_to_ews = False
</span><span class="cx">
</span><span class="cx"> failed_to_apply = any(map(lambda bubble: "failed_to_apply" in bubble, bubbles))
</span><del>- had_output = all(map(lambda bubble: not "may_fail_to_apply" in bubble and not "failed_to_apply" in bubble, bubbles))
</del><ins>+ had_resultative_status_other_than_failure_to_apply = any(map(lambda bubble: bubble["had_resultative_status_other_than_failure_to_apply"], bubbles))
</ins><span class="cx">
</span><del>- return (bubbles, show_submit_to_ews, failed_to_apply and (not had_output) and (not show_submit_to_ews))
</del><ins>+ return (bubbles, show_submit_to_ews, failed_to_apply and not had_resultative_status_other_than_failure_to_apply)
</ins><span class="cx">
</span><span class="cx"> def get(self, attachment_id_string):
</span><span class="cx"> attachment_id = int(attachment_id_string)
</span></span></pre>
</div>
</div>
</body>
</html>