Bug 137256 - EWS doesn't need to show all the bubbles when a patch fails to apply
Summary: EWS doesn't need to show all the bubbles when a patch fails to apply
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Alexey Proskuryakov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-09-30 11:23 PDT by Alexey Proskuryakov
Modified: 2014-09-30 12:44 PDT (History)
2 users (show)

See Also:


Attachments
proposed patch (5.83 KB, patch)
2014-09-30 11:26 PDT, Alexey Proskuryakov
rniwa: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alexey Proskuryakov 2014-09-30 11:23:04 PDT
When a patch fails to apply, it's usually failing in the same way on all queues. There is no need to show per-queue bubbles then.
Comment 1 Alexey Proskuryakov 2014-09-30 11:26:14 PDT
Created attachment 238941 [details]
proposed patch
Comment 2 Ryosuke Niwa 2014-09-30 11:54:48 PDT
Comment on attachment 238941 [details]
proposed patch

View in context: https://bugs.webkit.org/attachment.cgi?id=238941&action=review

> Tools/QueueStatusServer/app.yaml:2
> -version: 174192 # Bugzilla bug ID of last major change
> +version: ap # Bugzilla bug ID of last major change

Revert?

> Tools/QueueStatusServer/handlers/statusbubble.py:194
> -        return (bubbles, show_submit_to_ews)
> +        return (bubbles, show_submit_to_ews, failed_to_apply and not had_output and not show_submit_to_ews)

I would have written this as:

failed_to_apply = any(map(lambda bubble: 'failed_to_apply' in bubble, bubbles)
had_output = all(map(lambda bubble: 'no_output_yet' in bubble, bubbles)
return (bubbles, show_submit_to_ews, failed_to_apply and not had_output)

instead of updating variables in the loop.  It's much easier to understand.
Comment 3 Alexey Proskuryakov 2014-09-30 12:44:17 PDT
Committed <http://trac.webkit.org/r174114>.