Changeset 174114 in webkit


Ignore:
Timestamp:
Sep 30, 2014 12:43:58 PM (10 years ago)
Author:
ap@apple.com
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.

Location:
trunk/Tools
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/ChangeLog

    r174107 r174114  
     12014-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
    1192014-09-30  Tibor Meszaros  <tmeszaros.u-szeged@partner.samsung.com>
    220
  • trunk/Tools/QueueStatusServer/app.yaml

    r174092 r174114  
    11application: webkit-queues
    2 version: 174192 # Bugzilla bug ID of last major change
     2version: 174114 # Bugzilla bug ID of last major change
    33runtime: python
    44api_version: 1
  • trunk/Tools/QueueStatusServer/handlers/statusbubble.py

    r174092 r174114  
    119119                bubble["state"] = "started"
    120120                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
    121122            else:
    122123                real_queue_position = self._real_queue_position(queue, queue_position)
     
    124125                bubble["details_message"] = "Waiting in queue, processing has not started yet.\n\nPosition in queue: " + str(real_queue_position)
    125126                bubble["queue_position"] = real_queue_position
     127                bubble["may_fail_to_apply"] = True
    126128        else:
    127129            latest_resultative_status = self._latest_resultative_status(statuses)
     
    145147                        bubble["details_message"] += " Some messages were logged while the patch was still eligible:\n\n"
    146148                    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
    147150            elif statuses[0].message == "Error: " + queue.name() + " unable to apply patch.":
    148151                bubble["state"] = "fail"
    149152                bubble["details_message"] = statuses[1].message + "\n\n" + self._iso_time(statuses[0].date)
     153                bubble["failed_to_apply"] = True
    150154            elif statuses[0].message.startswith("Error: "):
    151155                bubble["state"] = "error"
     
    158162                bubble["details_message"] = ("Internal error. Latest status implies that the patch should be in queue, but it is not. Recent messages:\n\n"
    159163                    + "\n".join([status.message for status in statuses]) + "\n\n" + self._iso_time(statuses[0].date))
     164            bubble["may_fail_to_apply"] = True
    160165
    161166        if "details_message" in bubble:
     
    185190                show_submit_to_ews = False
    186191
    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))
    188196
    189197    def get(self, attachment_id_string):
    190198        attachment_id = int(attachment_id_string)
    191199        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)
    193201
    194202        template_values = {
     
    196204            "attachment_id": attachment_id,
    197205            "show_submit_to_ews": show_submit_to_ews,
     206            "show_failure_to_apply": show_failure_to_apply,
    198207        }
    199208        self.response.out.write(template.render("templates/statusbubble.html", template_values))
  • trunk/Tools/QueueStatusServer/templates/statusbubble.html

    r174087 r174114  
    6464<body>
    6565<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 %}
    6674  {% for bubble in bubbles %}
    6775  <a class="status {{ bubble.state }}" target="_top"
     
    7785  </a>
    7886  {% endfor %}
     87  {% endif %}
    7988
    8089{% if show_submit_to_ews %}
Note: See TracChangeset for help on using the changeset viewer.