Bug 206194 - webkitpy: Pass ImageDiff commands in a single write
Summary: webkitpy: Pass ImageDiff commands in a single write
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Jonathan Bedard
URL:
Keywords: InRadar
: 206179 (view as bug list)
Depends on:
Blocks:
 
Reported: 2020-01-13 14:14 PST by Jonathan Bedard
Modified: 2020-01-14 22:57 PST (History)
6 users (show)

See Also:


Attachments
Patch (1.25 KB, patch)
2020-01-13 14:17 PST, Jonathan Bedard
no flags Details | Formatted Diff | Diff
Patch (7.51 KB, patch)
2020-01-14 12:15 PST, Jonathan Bedard
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Bedard 2020-01-13 14:14:54 PST
It seems that ImageDiff can get misaligned and timeout after the Python 3 transition.
Comment 1 Jonathan Bedard 2020-01-13 14:17:40 PST
Created attachment 387566 [details]
Patch
Comment 2 Alexey Proskuryakov 2020-01-13 19:31:20 PST
The patch appears incomplete. But also, how can this be caused by Python3, does this imply a bug elsewhere.
Comment 3 Jonathan Bedard 2020-01-14 08:50:33 PST
(In reply to Alexey Proskuryakov from comment #2)
> The patch appears incomplete. But also, how can this be caused by Python3,
> does this imply a bug elsewhere.

The uploaded patch was actually intended to test EWS.

The bug is real, though.

I think this could be caused by a bug elsewhere (especially since it flakily reproduces), but I can bisect this to the Python 3 compatibility change, and I've made some significant progress towards narrowing down what part of that change actually causes the problem.
Comment 4 Alexey Proskuryakov 2020-01-14 09:30:01 PST
It is also possible that the flakiness is caused by actually getting different results (e.g. there is a preceding test that changes color settings permanently, affecting subsequent tests).
Comment 5 Jonathan Bedard 2020-01-14 10:21:04 PST
(In reply to Alexey Proskuryakov from comment #4)
> It is also possible that the flakiness is caused by actually getting
> different results (e.g. there is a preceding test that changes color
> settings permanently, affecting subsequent tests).

The root cause seems to be comparing images with different sizes, though. I've narrowed it down to a few lines of code that have changed in image_diff.py, so I'll have a fix shortly.
Comment 6 Alexey Proskuryakov 2020-01-14 10:42:37 PST
if all of these are different sizes, we should also file a bug to get the tests fixed, it's not really OK for them to rely on automatic resizing.
Comment 7 Jonathan Bedard 2020-01-14 11:28:40 PST
(In reply to Alexey Proskuryakov from comment #6)
> if all of these are different sizes, we should also file a bug to get the
> tests fixed, it's not really OK for them to rely on automatic resizing.

If it is the fault of the tests, then yes, we should/ But I'm not certain that's the root of the problem. I think the root of the problem might actually be ImageDiff getting tripped up when we feed it one image at a time instead of both images at the same time, ImageDiff is reporting one of the images to be exactly twice the size of the other.
Comment 8 Jonathan Bedard 2020-01-14 12:15:30 PST
Created attachment 387686 [details]
Patch
Comment 9 Radar WebKit Bug Importer 2020-01-14 13:15:20 PST
<rdar://problem/58578775>
Comment 10 Jonathan Bedard 2020-01-14 13:32:13 PST
Committed r254532: <https://trac.webkit.org/changeset/254532>
Comment 11 Alexey Proskuryakov 2020-01-14 22:56:05 PST
*** Bug 206179 has been marked as a duplicate of this bug. ***
Comment 12 Alexey Proskuryakov 2020-01-14 22:57:11 PST
> If it is the fault of the tests, then yes, we should/ But I'm not certain
> that's the root of the problem.

I agree that this is not the root of the problem at hand, but the tests are broken too, I don't think that they need to do this, or are allowed to.