Bug 159903 - EWS error message "Error: * did not process patch" should include explanation
Summary: EWS error message "Error: * did not process patch" should include explanation
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: WebKit Local Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Aakash Jain
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2016-07-18 16:06 PDT by Aakash Jain
Modified: 2016-08-06 11:32 PDT (History)
6 users (show)

See Also:


Attachments
Proposed patch (8.55 KB, patch)
2016-07-18 16:19 PDT, Aakash Jain
ap: review-
ap: commit-queue-
Details | Formatted Diff | Diff
Logs from staging server (42.74 KB, image/png)
2016-07-18 16:32 PDT, Aakash Jain
no flags Details
Updated patch (12.08 KB, patch)
2016-07-27 18:22 PDT, Aakash Jain
ap: review-
ap: commit-queue-
Details | Formatted Diff | Diff
Updated patch (12.18 KB, patch)
2016-07-28 12:40 PDT, Aakash Jain
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Aakash Jain 2016-07-18 16:06:39 PDT
The ews error message is "Error: * did not process patch." is confusing/misleading. It gives no information about why the queue did not process patch, no information about location of the logs.

What actually happens, is that the patch fails validation. We should improve the error message to make it more readable/meaningful.. something like “Patch fails validation”.

Also, if possible we should add more information to this error message indicating why the patch failed validation.

See <rdar://problem/27410788>
Comment 1 Aakash Jain 2016-07-18 16:19:12 PDT
Created attachment 283950 [details]
Proposed patch

Tested on a staging server. Also test-webkitpy passes.


Logs from staging server:

Patch 283778 from bug 159824:                    0 minutes ago (testbot-aakash) 
Error: Patch fails validation. Bug is already closed.
Comment 2 Aakash Jain 2016-07-18 16:32:21 PDT
Created attachment 283953 [details]
Logs from staging server
Comment 3 Alexey Proskuryakov 2016-07-18 16:50:17 PDT
Comment on attachment 283950 [details]
Proposed patch

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

I think that this will break reporting, because it matches log lines by name:

$ grep -r "did not process patch" Tools/
Tools//QueueStatusServer/handlers/processingtimesjson.py:        elif status_message == "Error: " + queue_name + " did not process patch.":
Tools//QueueStatusServer/handlers/statusbubble.py:            elif statuses[0].message == "Error: " + queue.name() + " did not process patch.":
...

> Tools/Scripts/webkitpy/tool/commands/earlywarningsystem.py:91
> +            self._did_error(patch, "Patch fails validation. %s" % error.failure_message)

I think that "fails validation" text may also be confusing to people looking at the bubbles in Bugzilla.
Comment 4 Alexey Proskuryakov 2016-07-18 16:51:22 PDT
Perhaps something like "Bug was already closed when EWS attempted to process it."?
Comment 5 Aakash Jain 2016-07-27 18:22:36 PDT
Created attachment 284750 [details]
Updated patch

Previous patch did not modify the messages shown in bubbles in bugzilla.

This patch will add some more information in the message shown in bubbles. The exact messages are in QueueStatusServer/handlers/statusbubble.py
Comment 6 Alexey Proskuryakov 2016-07-28 09:43:55 PDT
Comment on attachment 284750 [details]
Updated patch

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

> Tools/QueueStatusServer/handlers/processingtimesjson.py:43
> -        elif status_message == "Error: " + queue_name + " did not process patch.":
> +        elif "Error: Patch fails validation" in status_message:

We should preserve support for the old style too, as there are patches with old style statuses in the database.

> Tools/QueueStatusServer/handlers/statusbubble.py:143
> -            elif statuses[0].message == "Error: " + queue.name() + " did not process patch.":
> +            elif "Error: Patch fails validation" in statuses[0].message:

Ditto.

> Tools/QueueStatusServer/handlers/statusbubble.py:154
> +                    bubble["details_message"] += " EWS could not determine the committer information."

This one seems unclear. What does this mean? Is this only for commit queue when the person who marked the patch cq+ is not a committer?

> Tools/Scripts/webkitpy/tool/commands/earlywarningsystem.py:91
> +            self._did_error(patch, "Patch fails validation. %s" % error.failure_message)

Why "fails" and not "failed"? Looks like other statuses use past tense.
Comment 7 Aakash Jain 2016-07-28 12:40:25 PDT
Created attachment 284803 [details]
Updated patch

Reverted the error message to "did not process patch." as it is easier to maintain backward compatibility and it's anyways not shown on the bubbles.

The additional explanation about why the queue did not process patch, should make it easier to debug/understand. 

Made the missing committer error message similar to the perfalizer.py:run()
Comment 8 WebKit Commit Bot 2016-07-28 13:13:45 PDT
Comment on attachment 284803 [details]
Updated patch

Clearing flags on attachment: 284803

Committed r203830: <http://trac.webkit.org/changeset/203830>
Comment 9 WebKit Commit Bot 2016-07-28 13:13:49 PDT
All reviewed patches have been landed.  Closing bug.