New issue
Advanced search Search tips

Issue 595414 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Sep 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Feature



Sign in to add a comment

Create script to automatically remove stale entries in TestExpectations

Project Member Reported by bokan@chromium.org, Mar 16 2016

Issue description

This bug tracks creating a tool to remove lines in TestExpectations that no longer match the results on actual build bots.
 

Comment 1 by sshru...@google.com, Mar 18 2016

Components: -Blink>Tools>Test Blink>ToolsTest
Fixing component name after Monorail migration

Comment 2 by sshru...@google.com, Apr 18 2016

Components: -Blink>ToolsTest Blink>Infra
Blink>ToolsTest renamed to Blink>Infra
Project Member

Comment 3 by bugdroid1@chromium.org, May 5 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/2e290a5019d0e50540503c18f660cb44d117e0d6

commit 2e290a5019d0e50540503c18f660cb44d117e0d6
Author: bokan <bokan@chromium.org>
Date: Thu May 05 15:25:47 2016

Replace webkitpy standalone builders functions with instantiable class.

This patch replaces the standalone functions and global _exact_matches
dictionary with an instantiable Builders class. By default, a new Builders
object uses the dictionary that was previously globally defined so there should
be no behavioral change. Subclasses of Builders can provide a new dictionary
for tests.

I've replaced uses of the global by instantiating a Builders object in the Host
class and modifying BotTestExpectations and BotTestExpectationsFactory to take
a Builders as an argument.

This was suggested in https://codereview.chromium.org/1766583002/ and makes the
builders more straightfoward to fake in unit tests.

BUG= 595414 

Review-Url: https://codereview.chromium.org/1939843002
Cr-Commit-Position: refs/heads/master@{#391805}

[modify] https://crrev.com/2e290a5019d0e50540503c18f660cb44d117e0d6/third_party/WebKit/Tools/Scripts/webkitpy/common/host.py
[modify] https://crrev.com/2e290a5019d0e50540503c18f660cb44d117e0d6/third_party/WebKit/Tools/Scripts/webkitpy/common/host_mock.py
[add] https://crrev.com/2e290a5019d0e50540503c18f660cb44d117e0d6/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/builders.py
[rename] https://crrev.com/2e290a5019d0e50540503c18f660cb44d117e0d6/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/builders_unittest.py
[modify] https://crrev.com/2e290a5019d0e50540503c18f660cb44d117e0d6/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/layout_package/bot_test_expectations.py
[modify] https://crrev.com/2e290a5019d0e50540503c18f660cb44d117e0d6/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/layout_package/bot_test_expectations_unittest.py
[modify] https://crrev.com/2e290a5019d0e50540503c18f660cb44d117e0d6/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/base.py
[delete] https://crrev.com/331cbe0e04f124affaec2c52fe38c6f22c7b6c69/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/builders.py
[modify] https://crrev.com/2e290a5019d0e50540503c18f660cb44d117e0d6/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/factory.py
[modify] https://crrev.com/2e290a5019d0e50540503c18f660cb44d117e0d6/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/factory_unittest.py
[modify] https://crrev.com/2e290a5019d0e50540503c18f660cb44d117e0d6/third_party/WebKit/Tools/Scripts/webkitpy/tool/commands/flakytests.py
[modify] https://crrev.com/2e290a5019d0e50540503c18f660cb44d117e0d6/third_party/WebKit/Tools/Scripts/webkitpy/tool/commands/flakytests_unittest.py
[modify] https://crrev.com/2e290a5019d0e50540503c18f660cb44d117e0d6/third_party/WebKit/Tools/Scripts/webkitpy/tool/commands/rebaseline.py
[modify] https://crrev.com/2e290a5019d0e50540503c18f660cb44d117e0d6/third_party/WebKit/Tools/Scripts/webkitpy/tool/commands/rebaseline_unittest.py

Project Member

Comment 4 by bugdroid1@chromium.org, Jul 7 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/c3b32bfae7846d76e84f33f119d5762c9f556a35

commit c3b32bfae7846d76e84f33f119d5762c9f556a35
Author: bokan <bokan@chromium.org>
Date: Thu Jul 07 19:36:35 2016

Refactor test.py to be easier to fake.

Moved some of the data returned by TestPort into public instance
variables that can be replaced for testing.

BUG= 595414 

Review-Url: https://codereview.chromium.org/2121823003
Cr-Commit-Position: refs/heads/master@{#404212}

[modify] https://crrev.com/c3b32bfae7846d76e84f33f119d5762c9f556a35/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/test.py

Project Member

Comment 5 by bugdroid1@chromium.org, Jul 8 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/d70d9e2e8f1c9efb80d1dd1146816d5f265f367a

commit d70d9e2e8f1c9efb80d1dd1146816d5f265f367a
Author: bokan <bokan@chromium.org>
Date: Fri Jul 08 16:03:53 2016

Create the harness and shell of update_test_expectations

This patch creates the main classes and stubs out the main methods. The meat of the
process is left for the next patch. update_test_expectations is a script that looks
at the TestExpectations file and checks each line against results from the build
waterfall to determine if a line is still flaky. Non-flaky entries in TestExpectations
are then removed.

BUG= 595414 

Review-Url: https://codereview.chromium.org/2119303003
Cr-Commit-Position: refs/heads/master@{#404402}

[add] https://crrev.com/d70d9e2e8f1c9efb80d1dd1146816d5f265f367a/third_party/WebKit/Tools/Scripts/update-test-expectations
[modify] https://crrev.com/d70d9e2e8f1c9efb80d1dd1146816d5f265f367a/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/models/test_expectations.py
[add] https://crrev.com/d70d9e2e8f1c9efb80d1dd1146816d5f265f367a/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/update_test_expectations.py
[add] https://crrev.com/d70d9e2e8f1c9efb80d1dd1146816d5f265f367a/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/update_test_expectations_unittest.py

Project Member

Comment 6 by bugdroid1@chromium.org, Jul 8 2016

So, I think that this issue is considered done, since the script exists, and I think it works (e.g. http://crrev.com/2300703006).

However, there are a couple of TODOs in that file, and it might be more conservative than it needs to be, since it currently won't delete any lines that have matching configurations for which there are no builders (see http://crrev.com/2380173002 for a proposed change).

Long-term, does it make sense to call this script regularly from somewhere? David, would you like to leave this as-is now and revisit this sometime in the future?
Project Member

Comment 8 by bugdroid1@chromium.org, Sep 30 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/89ff824cd7a145611011394e0bf8a90957cee81e

commit 89ff824cd7a145611011394e0bf8a90957cee81e
Author: qyearsley <qyearsley@chromium.org>
Date: Thu Sep 29 23:58:37 2016

Change update_test_expectations to not require builders for all configurations.

This makes the update-test-expectations script less conservative.

The rationale is that there are some configurations for which we
don't have any builders, which are checked. Specifically:

  [icecreamsandwich, x86, debug]
  [icecreamsandwich, x86, release]
  [mac10.10, x86, debug]
  [mac10.9, x86, debug]
  [retina, x86, debug]
  [trusty, x86_64, debug]
  [win10, x86, debug]

But if a test that's marked as flaky appears to be non-flaky on all builders that actually do exist, this seems like it might be adequate reason to remove the line.

Also in this CL:
  Add more logging and a --verbose option, so that:
  (1) by default when running the script would log what it's deleting.
  (2) if --verbose is passed it will also log more information about why.

BUG= 595414 

Review-Url: https://codereview.chromium.org/2380173002
Cr-Commit-Position: refs/heads/master@{#421983}

[modify] https://crrev.com/89ff824cd7a145611011394e0bf8a90957cee81e/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/update_test_expectations.py
[modify] https://crrev.com/89ff824cd7a145611011394e0bf8a90957cee81e/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/update_test_expectations_unittest.py

Comment 9 by bokan@chromium.org, Sep 30 2016

Status: Fixed (was: Started)
Yup, I've got one more minor patch at https://codereview.chromium.org/2381093003/ but I think this is done. It'd be super cool if we could add this to one of the bots so it could run at some (daily?) interval but I think we can make that a separate work item and maybe after a few more manual runs to ensure it's working smoothly.

Thanks for your help Quinten!
Project Member

Comment 10 by bugdroid1@chromium.org, Oct 5 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/4bec15a584aedce4f4d92033983db81b0c3a8034

commit 4bec15a584aedce4f4d92033983db81b0c3a8034
Author: bokan <bokan@chromium.org>
Date: Wed Oct 05 23:27:36 2016

Add switch to update-test-expectations to show removed lines in dashboard

Added a --show-results switch. When added to a run of update-test-expectations,
the script will open the layout test flakiness dashboard with all the tests the
script removed. This allows users to manually verify the removed lines.

BUG= 595414 

Review-Url: https://codereview.chromium.org/2381093003
Cr-Commit-Position: refs/heads/master@{#423336}

[modify] https://crrev.com/4bec15a584aedce4f4d92033983db81b0c3a8034/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/update_test_expectations.py
[modify] https://crrev.com/4bec15a584aedce4f4d92033983db81b0c3a8034/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/update_test_expectations_unittest.py

Project Member

Comment 11 by bugdroid1@chromium.org, Oct 27 2016

Labels: merge-merged-2840
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/4bec15a584aedce4f4d92033983db81b0c3a8034

commit 4bec15a584aedce4f4d92033983db81b0c3a8034
Author: bokan <bokan@chromium.org>
Date: Wed Oct 05 23:27:36 2016

Add switch to update-test-expectations to show removed lines in dashboard

Added a --show-results switch. When added to a run of update-test-expectations,
the script will open the layout test flakiness dashboard with all the tests the
script removed. This allows users to manually verify the removed lines.

BUG= 595414 

Review-Url: https://codereview.chromium.org/2381093003
Cr-Commit-Position: refs/heads/master@{#423336}

[modify] https://crrev.com/4bec15a584aedce4f4d92033983db81b0c3a8034/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/update_test_expectations.py
[modify] https://crrev.com/4bec15a584aedce4f4d92033983db81b0c3a8034/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/update_test_expectations_unittest.py

Comment 12 by dimu@google.com, Nov 4 2016

Labels: -merge-merged-2840
[Automated comment] removing mislabelled merge-merged-2840

Sign in to add a comment