New issue
Advanced search Search tips

Issue 713987 link

Starred by 3 users

Issue metadata

Status: Fixed
Owner:
Closed: Jul 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Task



Sign in to add a comment

Convert W3CImportExpectations [ Pass ] entries to OWNERS files

Project Member Reported by foolip@chromium.org, Apr 21 2017

Issue description

W3CImportExpectations is currently fairly hard to read, as it mixed Pass and Skip, and also includes the owners.

This could be improved in a few steps:

1. Write a script to create OWNERS files based on the annotations in W3CImportExpectations
2. Delete all [ Pass ] entries, effectively leaving it as a skip-list only
 

Comment 1 by foolip@chromium.org, Apr 21 2017

qyearsley@, WDYT? I guess this would require changes to the importer as well, since it lists owners in the import commits. (I just got one of those emails, very fast import after I added some things, yay.)
Labels: -Type-Bug Type-Task
Status: Available (was: Untriaged)
Definitely, this should be done.

After step 1 and before step 2, we have to change https://cs.chromium.org/chromium/src/third_party/WebKit/Tools/Scripts/webkitpy/w3c/directory_owners_extractor.py so that it reads OWNERS files.
Components: Blink>Infra>Ecosystem
Components: -Blink>Infra>Predictability
Description: Show this description
New and hopefully complete list of steps to resolve:

1. Update https://cs.chromium.org/chromium/src/third_party/WebKit/Tools/Scripts/webkitpy/w3c/test_importer.py to use OWNERS files if they exist. If existing scripts to parse OWNERS files can be reused, do so.

2. Make sure that adding or modifying OWNERS files does not result in export PRs being created. (jeffcarp can advise)

3. Convert the W3CImportExpectations [ Pass ] entries to OWNERS files and remove the entries.

4. Delete https://cs.chromium.org/chromium/src/third_party/WebKit/Tools/Scripts/webkitpy/w3c/directory_owners_extractor.py and the code that uses it.

This could be done as separate CLs, or all together, that's not important.
Yep, that list of steps looks correct to me!

Note, I think that it might be just as easy to keep directory_owners_extractor.py, but transform it into a module that extracts from OWNERS files instead of W3CImportExpectations. That class already has access to a FileSystem object and has a list_owners method which could be modified to support OWNERS files.

For step 2, sergiyb@ added logic for skipping OWNERS files in Chromium commits before, but we have duplicate logic in the GerritCL class, and this needs to be updated: https://cs.chromium.org/chromium/src/third_party/WebKit/Tools/Scripts/webkitpy/w3c/gerrit.py?l=173
Thanks Quinten!
Owner: robertma@chromium.org
Status: Started (was: Available)
Starting to work on this bug for starters. I'm planning to do this in 3 steps/CLs:

1. Batch converting [ Pass ] entries -> OWNERS files
2. All necessary changes in our Python scripts to switch to reading from OWNERS files
3. Removing all [ Pass ] entries after everything is verified to work as intended (and check if there's any new [ Pass ] entries added during this period)
Project Member

Comment 10 by bugdroid1@chromium.org, Jul 20 2017

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

commit 9f186b0baa9c9bb4eeb7baf8c8a2624ac79ec158
Author: Robert Ma <robertma@chromium.org>
Date: Thu Jul 20 23:54:30 2017

Fix some small syntax issues in W3CImportExpectations

Currently there are some entries in W3CImportExpectations that do not closely
follow the syntax and hence cannot be picked up by DirectoryOwnersExtractor.
This CL fixes these entries. It is also in prepartion for converting the [Pass]
entries to OWNERS files, as the conversion script will be based on
DirectoryOwnersExtractor. (I could make these changes locally and then run the
script, but that would make the conversion process harder to trace and debug, in
case there is any need in the future.)

Bug:  713987 
Change-Id: Iab1ed744e6fedbf9e805113badd4ff50e9e0347c
Reviewed-on: https://chromium-review.googlesource.com/580395
Reviewed-by: Quinten Yearsley <qyearsley@chromium.org>
Commit-Queue: Robert Ma <robertma@chromium.org>
Cr-Commit-Position: refs/heads/master@{#488495}
[modify] https://crrev.com/9f186b0baa9c9bb4eeb7baf8c8a2624ac79ec158/third_party/WebKit/LayoutTests/W3CImportExpectations

Project Member

Comment 11 by bugdroid1@chromium.org, Jul 21 2017

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

commit 281fecb605f9398a182e30992f7348025168c023
Author: Robert Ma <robertma@chromium.org>
Date: Fri Jul 21 14:31:08 2017

Batch convert [ Pass ] entries to OWNERS files

Conversion script is based on directory_owners_extractor.py, and can be found at
https://gist.github.com/Hexcles/ce7110a8d07bf81378e254914ae8cbb2

Verification:
git show HEAD --name-only | sed 's|third_party/WebKit/LayoutTests/||' | sed 's|/OWNERS||' | sort > list1
grep 'external.*\[ Pass \]' W3CImportExpectations | grep -o -E 'external[^ ]+' | sort > list2
diff list1 list2

The diff output:
5a6
> external/wpt/common
51a53
> external/wpt/fonts
61a64
> external/wpt/images
64a68
> external/wpt/interfaces
65a70
> external/wpt/media

All five directories are explicitly marked as "Owners: none; No tests in the directory." in W3CImportExpectations.

Bug:  713987 
Change-Id: Ic00f2eb971ed2ba3cc1a44aef59e2a32586a5e24
Reviewed-on: https://chromium-review.googlesource.com/580535
Reviewed-by: Quinten Yearsley <qyearsley@chromium.org>
Commit-Queue: Robert Ma <robertma@chromium.org>
Cr-Commit-Position: refs/heads/master@{#488651}
[add] https://crrev.com/281fecb605f9398a182e30992f7348025168c023/third_party/WebKit/LayoutTests/external/wpt/2dcontext/OWNERS
[modify] https://crrev.com/281fecb605f9398a182e30992f7348025168c023/third_party/WebKit/LayoutTests/external/wpt/FileAPI/OWNERS
[modify] https://crrev.com/281fecb605f9398a182e30992f7348025168c023/third_party/WebKit/LayoutTests/external/wpt/IndexedDB/OWNERS
[add] https://crrev.com/281fecb605f9398a182e30992f7348025168c023/third_party/WebKit/LayoutTests/external/wpt/WebCryptoAPI/OWNERS
[add] https://crrev.com/281fecb605f9398a182e30992f7348025168c023/third_party/WebKit/LayoutTests/external/wpt/WebIDL/OWNERS
[add] https://crrev.com/281fecb605f9398a182e30992f7348025168c023/third_party/WebKit/LayoutTests/external/wpt/XMLHttpRequest/OWNERS
[add] https://crrev.com/281fecb605f9398a182e30992f7348025168c023/third_party/WebKit/LayoutTests/external/wpt/battery-status/OWNERS
[modify] https://crrev.com/281fecb605f9398a182e30992f7348025168c023/third_party/WebKit/LayoutTests/external/wpt/bluetooth/OWNERS
[add] https://crrev.com/281fecb605f9398a182e30992f7348025168c023/third_party/WebKit/LayoutTests/external/wpt/clear-site-data/OWNERS
[add] https://crrev.com/281fecb605f9398a182e30992f7348025168c023/third_party/WebKit/LayoutTests/external/wpt/clipboard-apis/OWNERS
[add] https://crrev.com/281fecb605f9398a182e30992f7348025168c023/third_party/WebKit/LayoutTests/external/wpt/compat/OWNERS
[add] https://crrev.com/281fecb605f9398a182e30992f7348025168c023/third_party/WebKit/LayoutTests/external/wpt/console/OWNERS
[add] https://crrev.com/281fecb605f9398a182e30992f7348025168c023/third_party/WebKit/LayoutTests/external/wpt/content-security-policy/OWNERS
[add] https://crrev.com/281fecb605f9398a182e30992f7348025168c023/third_party/WebKit/LayoutTests/external/wpt/cookies/OWNERS
[add] https://crrev.com/281fecb605f9398a182e30992f7348025168c023/third_party/WebKit/LayoutTests/external/wpt/cors/OWNERS
[add] https://crrev.com/281fecb605f9398a182e30992f7348025168c023/third_party/WebKit/LayoutTests/external/wpt/css-font-loading/OWNERS
[add] https://crrev.com/281fecb605f9398a182e30992f7348025168c023/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/OWNERS
[add] https://crrev.com/281fecb605f9398a182e30992f7348025168c023/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/abspos/OWNERS
[add] https://crrev.com/281fecb605f9398a182e30992f7348025168c023/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/floats-clear/OWNERS
[add] https://crrev.com/281fecb605f9398a182e30992f7348025168c023/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/floats/OWNERS
[add] https://crrev.com/281fecb605f9398a182e30992f7348025168c023/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/linebox/OWNERS
[add] https://crrev.com/281fecb605f9398a182e30992f7348025168c023/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/normal-flow/OWNERS
[add] https://crrev.com/281fecb605f9398a182e30992f7348025168c023/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/positioning/OWNERS
[add] https://crrev.com/281fecb605f9398a182e30992f7348025168c023/third_party/WebKit/LayoutTests/external/wpt/css/CSS2/text/OWNERS
[add] https://crrev.com/281fecb605f9398a182e30992f7348025168c023/third_party/WebKit/LayoutTests/external/wpt/css/css-align-3/OWNERS
[add] https://crrev.com/281fecb605f9398a182e30992f7348025168c023/third_party/WebKit/LayoutTests/external/wpt/css/css-display-3/OWNERS
[add] https://crrev.com/281fecb605f9398a182e30992f7348025168c023/third_party/WebKit/LayoutTests/external/wpt/css/css-flexbox-1/OWNERS
[add] https://crrev.com/281fecb605f9398a182e30992f7348025168c023/third_party/WebKit/LayoutTests/external/wpt/css/css-grid-1/OWNERS
[add] https://crrev.com/281fecb605f9398a182e30992f7348025168c023/third_party/WebKit/LayoutTests/external/wpt/css/css-position-3/OWNERS
[add] https://crrev.com/281fecb605f9398a182e30992f7348025168c023/third_party/WebKit/LayoutTests/external/wpt/css/css-rhythm-1/OWNERS
[add] https://crrev.com/281fecb605f9398a182e30992f7348025168c023/third_party/WebKit/LayoutTests/external/wpt/css/css-scoping-1/OWNERS
[add] https://crrev.com/281fecb605f9398a182e30992f7348025168c023/third_party/WebKit/LayoutTests/external/wpt/css/css-shapes-1/OWNERS
[add] https://crrev.com/281fecb605f9398a182e30992f7348025168c023/third_party/WebKit/LayoutTests/external/wpt/css/css-tables-3/OWNERS
[add] https://crrev.com/281fecb605f9398a182e30992f7348025168c023/third_party/WebKit/LayoutTests/external/wpt/css/css-text-3/i18n/OWNERS
[add] https://crrev.com/281fecb605f9398a182e30992f7348025168c023/third_party/WebKit/LayoutTests/external/wpt/css/css-text-3/line-break/OWNERS
[add] https://crrev.com/281fecb605f9398a182e30992f7348025168c023/third_party/WebKit/LayoutTests/external/wpt/css/css-text-3/overflow-wrap/OWNERS
[add] https://crrev.com/281fecb605f9398a182e30992f7348025168c023/third_party/WebKit/LayoutTests/external/wpt/css/css-text-decor-3/OWNERS
[add] https://crrev.com/281fecb605f9398a182e30992f7348025168c023/third_party/WebKit/LayoutTests/external/wpt/css/css-ui-3/OWNERS
[add] https://crrev.com/281fecb605f9398a182e30992f7348025168c023/third_party/WebKit/LayoutTests/external/wpt/css/css-writing-modes-3/OWNERS
[add] https://crrev.com/281fecb605f9398a182e30992f7348025168c023/third_party/WebKit/LayoutTests/external/wpt/css/geometry-1/OWNERS
[add] https://crrev.com/281fecb605f9398a182e30992f7348025168c023/third_party/WebKit/LayoutTests/external/wpt/css/selectors4/OWNERS
[add] https://crrev.com/281fecb605f9398a182e30992f7348025168c023/third_party/WebKit/LayoutTests/external/wpt/css/vendor-imports/mozilla/mozilla-central-reftests/flexbox/OWNERS
[add] https://crrev.com/281fecb605f9398a182e30992f7348025168c023/third_party/WebKit/LayoutTests/external/wpt/css/vendor-imports/mozilla/mozilla-central-reftests/selectors4/OWNERS
[add] https://crrev.com/281fecb605f9398a182e30992f7348025168c023/third_party/WebKit/LayoutTests/external/wpt/css/vendor-imports/mozilla/mozilla-central-reftests/variables/OWNERS
[add] https://crrev.com/281fecb605f9398a182e30992f7348025168c023/third_party/WebKit/LayoutTests/external/wpt/cssom-view/OWNERS
[add] https://crrev.com/281fecb605f9398a182e30992f7348025168c023/third_party/WebKit/LayoutTests/external/wpt/cssom/OWNERS
[add] https://crrev.com/281fecb605f9398a182e30992f7348025168c023/third_party/WebKit/LayoutTests/external/wpt/custom-elements/OWNERS
[modify] https://crrev.com/281fecb605f9398a182e30992f7348025168c023/third_party/WebKit/LayoutTests/external/wpt/dom/OWNERS
[add] https://crrev.com/281fecb605f9398a182e30992f7348025168c023/third_party/WebKit/LayoutTests/external/wpt/domparsing/OWNERS
[add] https://crrev.com/281fecb605f9398a182e30992f7348025168c023/third_party/WebKit/LayoutTests/external/wpt/domxpath/OWNERS
[add] https://crrev.com/281fecb605f9398a182e30992f7348025168c023/third_party/WebKit/LayoutTests/external/wpt/editing/OWNERS
[modify] https://crrev.com/281fecb605f9398a182e30992f7348025168c023/third_party/WebKit/LayoutTests/external/wpt/encoding/OWNERS
[add] https://crrev.com/281fecb605f9398a182e30992f7348025168c023/third_party/WebKit/LayoutTests/external/wpt/encrypted-media/OWNERS
[add] https://crrev.com/281fecb605f9398a182e30992f7348025168c023/third_party/WebKit/LayoutTests/external/wpt/eventsource/OWNERS
[add] https://crrev.com/281fecb605f9398a182e30992f7348025168c023/third_party/WebKit/LayoutTests/external/wpt/fetch/OWNERS
[add] https://crrev.com/281fecb605f9398a182e30992f7348025168c023/third_party/WebKit/LayoutTests/external/wpt/fullscreen/OWNERS
[modify] https://crrev.com/281fecb605f9398a182e30992f7348025168c023/third_party/WebKit/LayoutTests/external/wpt/gamepad/OWNERS
[add] https://crrev.com/281fecb605f9398a182e30992f7348025168c023/third_party/WebKit/LayoutTests/external/wpt/generic-sensor/OWNERS
[add] https://crrev.com/281fecb605f9398a182e30992f7348025168c023/third_party/WebKit/LayoutTests/external/wpt/geolocation-API/OWNERS
[add] https://crrev.com/281fecb605f9398a182e30992f7348025168c023/third_party/WebKit/LayoutTests/external/wpt/hr-time/OWNERS
[add] https://crrev.com/281fecb605f9398a182e30992f7348025168c023/third_party/WebKit/LayoutTests/external/wpt/html-imports/OWNERS
[add] https://crrev.com/281fecb605f9398a182e30992f7348025168c023/third_party/WebKit/LayoutTests/external/wpt/html-media-capture/OWNERS
[add] https://crrev.com/281fecb605f9398a182e30992f7348025168c023/third_party/WebKit/LayoutTests/external/wpt/html/OWNERS
[add] https://crrev.com/281fecb605f9398a182e30992f7348025168c023/third_party/WebKit/LayoutTests/external/wpt/http/OWNERS
[add] https://crrev.com/281fecb605f9398a182e30992f7348025168c023/third_party/WebKit/LayoutTests/external/wpt/imagebitmap-renderingcontext/OWNERS
[add] https://crrev.com/281fecb605f9398a182e30992f7348025168c023/third_party/WebKit/LayoutTests/external/wpt/infrastructure/OWNERS
[add] https://crrev.com/281fecb605f9398a182e30992f7348025168c023/third_party/WebKit/LayoutTests/external/wpt/innerText/OWNERS
[add] https://crrev.com/281fecb605f9398a182e30992f7348025168c023/third_party/WebKit/LayoutTests/external/wpt/keyboard-lock/OWNERS
[add] https://crrev.com/281fecb605f9398a182e30992f7348025168c023/third_party/WebKit/LayoutTests/external/wpt/media-source/OWNERS
[add] https://crrev.com/281fecb605f9398a182e30992f7348025168c023/third_party/WebKit/LayoutTests/external/wpt/mediacapture-record/OWNERS
[add] https://crrev.com/281fecb605f9398a182e30992f7348025168c023/third_party/WebKit/LayoutTests/external/wpt/mediacapture-streams/OWNERS
[modify] https://crrev.com/281fecb605f9398a182e30992f7348025168c023/third_party/WebKit/LayoutTests/external/wpt/mediasession/OWNERS
[add] https://crrev.com/281fecb605f9398a182e30992f7348025168c023/third_party/WebKit/LayoutTests/external/wpt/mixed-content/OWNERS
[add] https://crrev.com/281fecb605f9398a182e30992f7348025168c023/third_party/WebKit/LayoutTests/external/wpt/navigation-timing/OWNERS
[add] https://crrev.com/281fecb605f9398a182e30992f7348025168c023/third_party/WebKit/LayoutTests/external/wpt/notifications/OWNERS
[add] https://crrev.com/281fecb605f9398a182e30992f7348025168c023/third_party/WebKit/LayoutTests/external/wpt/offscreen-canvas/OWNERS
[modify] https://crrev.com/281fecb605f9398a182e30992f7348025168c023/third_party/WebKit/LayoutTests/external/wpt/orientation-event/OWNERS
[add] https://crrev.com/281fecb605f9398a182e30992f7348025168c023/third_party/WebKit/LayoutTests/external/wpt/page-visibility/OWNERS
[add] https://crrev.com/281fecb605f9398a182e30992f7348025168c023/third_party/WebKit/LayoutTests/external/wpt/payment-request/OWNERS
[add] https://crrev.com/281fecb605f9398a182e30992f7348025168c023/third_party/WebKit/LayoutTests/external/wpt/performance-timeline/OWNERS
[modify] https://crrev.com/281fecb605f9398a182e30992f7348025168c023/third_party/WebKit/LayoutTests/external/wpt/pointerevents/OWNERS
[modify] https://crrev.com/281fecb605f9398a182e30992f7348025168c023/third_party/WebKit/LayoutTests/external/wpt/pointerlock/OWNERS
[add] https://crrev.com/281fecb605f9398a182e30992f7348025168c023/third_party/WebKit/LayoutTests/external/wpt/presentation-api/OWNERS
[add] https://crrev.com/281fecb605f9398a182e30992f7348025168c023/third_party/WebKit/LayoutTests/external/wpt/progress-events/OWNERS
[add] https://crrev.com/281fecb605f9398a182e30992f7348025168c023/third_party/WebKit/LayoutTests/external/wpt/quirks-mode/OWNERS
[add] https://crrev.com/281fecb605f9398a182e30992f7348025168c023/third_party/WebKit/LayoutTests/external/wpt/referrer-policy/OWNERS
[add] https://crrev.com/281fecb605f9398a182e30992f7348025168c023/third_party/WebKit/LayoutTests/external/wpt/remote-playback/OWNERS
[add] https://crrev.com/281fecb605f9398a182e30992f7348025168c023/third_party/WebKit/LayoutTests/external/wpt/resource-timing/OWNERS
[add] https://crrev.com/281fecb605f9398a182e30992f7348025168c023/third_party/WebKit/LayoutTests/external/wpt/resources/OWNERS
[add] https://crrev.com/281fecb605f9398a182e30992f7348025168c023/third_party/WebKit/LayoutTests/external/wpt/screen-orientation/OWNERS
[add] https://crrev.com/281fecb605f9398a182e30992f7348025168c023/third_party/WebKit/LayoutTests/external/wpt/secure-contexts/OWNERS
[add] https://crrev.com/281fecb605f9398a182e30992f7348025168c023/third_party/WebKit/LayoutTests/external/wpt/selection/OWNERS
[add] https://crrev.com/281fecb605f9398a182e30992f7348025168c023/third_party/WebKit/LayoutTests/external/wpt/selectors/OWNERS
[modify] https://crrev.com/281fecb605f9398a182e30992f7348025168c023/third_party/WebKit/LayoutTests/external/wpt/service-workers/OWNERS
[add] https://crrev.com/281fecb605f9398a182e30992f7348025168c023/third_party/WebKit/LayoutTests/external/wpt/service-workers/cache-storage/OWNERS
[modify] https://crrev.com/281fecb605f9398a182e30992f7348025168c023/third_party/WebKit/LayoutTests/external/wpt/shadow-dom/OWNERS
[add] https://crrev.com/281fecb605f9398a182e30992f7348025168c023/third_party/WebKit/LayoutTests/external/wpt/storage/OWNERS
[add] https://crrev.com/281fecb605f9398a182e30992f7348025168c023/third_party/WebKit/LayoutTests/external/wpt/streams/OWNERS
[add] https://crrev.com/281fecb605f9398a182e30992f7348025168c023/third_party/WebKit/LayoutTests/external/wpt/subresource-integrity/OWNERS
[add] https://crrev.com/281fecb605f9398a182e30992f7348025168c023/third_party/WebKit/LayoutTests/external/wpt/svg/OWNERS
[modify] https://crrev.com/281fecb605f9398a182e30992f7348025168c023/third_party/WebKit/LayoutTests/external/wpt/touch-events/OWNERS
[add] https://crrev.com/281fecb605f9398a182e30992f7348025168c023/third_party/WebKit/LayoutTests/external/wpt/uievents/OWNERS
[add] https://crrev.com/281fecb605f9398a182e30992f7348025168c023/third_party/WebKit/LayoutTests/external/wpt/url/OWNERS
[add] https://crrev.com/281fecb605f9398a182e30992f7348025168c023/third_party/WebKit/LayoutTests/external/wpt/user-timing/OWNERS
[add] https://crrev.com/281fecb605f9398a182e30992f7348025168c023/third_party/WebKit/LayoutTests/external/wpt/vibration/OWNERS
[add] https://crrev.com/281fecb605f9398a182e30992f7348025168c023/third_party/WebKit/LayoutTests/external/wpt/web-animations/OWNERS
[add] https://crrev.com/281fecb605f9398a182e30992f7348025168c023/third_party/WebKit/LayoutTests/external/wpt/web-nfc/OWNERS
[add] https://crrev.com/281fecb605f9398a182e30992f7348025168c023/third_party/WebKit/LayoutTests/external/wpt/webaudio/OWNERS
[add] https://crrev.com/281fecb605f9398a182e30992f7348025168c023/third_party/WebKit/LayoutTests/external/wpt/webauthn/OWNERS
[add] https://crrev.com/281fecb605f9398a182e30992f7348025168c023/third_party/WebKit/LayoutTests/external/wpt/webmessaging/OWNERS
[add] https://crrev.com/281fecb605f9398a182e30992f7348025168c023/third_party/WebKit/LayoutTests/external/wpt/webrtc/OWNERS
[add] https://crrev.com/281fecb605f9398a182e30992f7348025168c023/third_party/WebKit/LayoutTests/external/wpt/websockets/OWNERS
[modify] https://crrev.com/281fecb605f9398a182e30992f7348025168c023/third_party/WebKit/LayoutTests/external/wpt/webstorage/OWNERS
[add] https://crrev.com/281fecb605f9398a182e30992f7348025168c023/third_party/WebKit/LayoutTests/external/wpt/webvr/OWNERS
[add] https://crrev.com/281fecb605f9398a182e30992f7348025168c023/third_party/WebKit/LayoutTests/external/wpt/webvtt/OWNERS
[modify] https://crrev.com/281fecb605f9398a182e30992f7348025168c023/third_party/WebKit/LayoutTests/external/wpt/workers/OWNERS

Project Member

Comment 12 by bugdroid1@chromium.org, Jul 24 2017

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

commit ceccc01931bccd42a13f7e2f9bee507dcc2beb73
Author: Robert Ma <robertma@chromium.org>
Date: Mon Jul 24 18:43:05 2017

Modify wpt scripts to extract owners from OWNERS files

Changes are mostly contained in directory_owners_extractor to make it extract
owners from OWNERS files instead of W3CImportExpectations, which in fact
simplifies the implementation a bit. The behavior is kept the same -- teams
and componets info in OWNERS are still ignored.

Also fix a small grammar issue (class instantiation) and lint warnings by the way.


Bug:  713987 
Change-Id: I07dd8e73cbbab15a8b922188f92c8a79b2c609af
Reviewed-on: https://chromium-review.googlesource.com/582167
Reviewed-by: Quinten Yearsley <qyearsley@chromium.org>
Commit-Queue: Robert Ma <robertma@chromium.org>
Cr-Commit-Position: refs/heads/master@{#489032}
[modify] https://crrev.com/ceccc01931bccd42a13f7e2f9bee507dcc2beb73/third_party/WebKit/Tools/Scripts/webkitpy/w3c/directory_owners_extractor.py
[modify] https://crrev.com/ceccc01931bccd42a13f7e2f9bee507dcc2beb73/third_party/WebKit/Tools/Scripts/webkitpy/w3c/directory_owners_extractor_unittest.py
[modify] https://crrev.com/ceccc01931bccd42a13f7e2f9bee507dcc2beb73/third_party/WebKit/Tools/Scripts/webkitpy/w3c/test_importer.py
[modify] https://crrev.com/ceccc01931bccd42a13f7e2f9bee507dcc2beb73/third_party/WebKit/Tools/Scripts/webkitpy/w3c/test_importer_unittest.py

Labels: -Pri-3 Pri-2
Alright, finally the importer ran again so we can see what extracted owners looks like in practice:

https://chromium-review.googlesource.com/c/585363/

In the CL description:

Directory owners for changes in this CL:
:
  external/wpt/html/semantics
dpranke@chromium.org:
  external
  external
style-dev@chromium.org:
  external/wpt/cssom-view
  external/wpt/cssom-view
  external/wpt/cssom-view
  ...

Conveniently, these three directories indicate three possible changes we want to make to DirectoryOwnersExtractor (https://cs.chromium.org/chromium/src/third_party/WebKit/Tools/Scripts/webkitpy/w3c/directory_owners_extractor.py?l=25):

 1. If there's no owner email address in an OWNERS file, we can just ignore it and continue. We might want to consider CCing team mailing lists, like dom-dev@, but I believe it would be better in general if directory owners were individual people.
 2. We probably do want to stop at external/wpt/ and not consider list owners for that directory or any directories above that. (We don't want to list owners in external/wpt/ or external/.
 3. We don't want to list the same directory more than once, so maybe we want to change the list_owners to return a dict of tuple -> set instead of tuple -> list.
Glad to see the first actual run! Found some unexpected cases here.

In reply to comment #13:

1. Empty OWNERS files (or the ones with comments only) should be ignored.
2. Stop the traversal at external/wpt so that we don't spam dpranke@ every day, which was also the previous behavior.
3. Owned directories need to be de-duplicated. I misread the previous implementation and thought it would also have duplicate entries (and regardless, deduplication is surely desired).


Emails listed in "# TEAM:" are ignored, but the script does not differentiate team vs individual owners (the uncommented emails in OWNERS files). I checked W3CImportExpectations: teams like dom-dev@ style-dev@ do have their team mailing lists as owners there (and the previous version would also CC them). So I believe it is WAI if we CC some teams found in (the non-comment part of) OWNERS.
Project Member

Comment 15 by bugdroid1@chromium.org, Jul 27 2017

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

commit 874543453709fb355ef88e85ac4bfe92d1ab99c3
Author: Robert Ma <robertma@chromium.org>
Date: Thu Jul 27 14:35:15 2017

[Owners Extractor] Fix issues found in the actual run

1. Empty OWNERS files are ignored.
2. Stop the traversal at LayoutTest/external.
3. Owned directories are de-duplicated.
4. Document the behavior more clearly.


Bug:  713987 
Change-Id: Id1d365b4d960e9b6efa79c155a6c0cbdcbc75102
Reviewed-on: https://chromium-review.googlesource.com/585711
Commit-Queue: Robert Ma <robertma@chromium.org>
Reviewed-by: Quinten Yearsley <qyearsley@chromium.org>
Cr-Commit-Position: refs/heads/master@{#489920}
[modify] https://crrev.com/874543453709fb355ef88e85ac4bfe92d1ab99c3/third_party/WebKit/Tools/Scripts/webkitpy/w3c/directory_owners_extractor.py
[modify] https://crrev.com/874543453709fb355ef88e85ac4bfe92d1ab99c3/third_party/WebKit/Tools/Scripts/webkitpy/w3c/directory_owners_extractor_unittest.py

Followup note, in the latest auto-import CL (https://chromium-review.googlesource.com/c/590028/), the owners list in the description and the CC list both look correct :-)
Project Member

Comment 17 by bugdroid1@chromium.org, Jul 31 2017

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

commit cb5ad98399c07e36877e9378361d402d2fbcef28
Author: Robert Ma <robertma@chromium.org>
Date: Mon Jul 31 17:56:17 2017

Remove all [ Pass ] entries and OWNERS comments

OWNERS files for these entries have been created @281fecb605f9398a182e30992f7348025168c023
(The only change since then was to add a few [ Skip ] entries.)

DirectoryOwnersExtractor has been modified to read from OWNERS files and verified to work correctly.

Following steps were carried out in this batch removal:
$ sed -e '/external.*\[ Pass\ ]/d' -i W3CImportExpectations
$ sed -e '/^## Owners/d' -i W3CImportExpectations
Line "# external/wpt/media-capabilities" was manually removed as it is
treated equivalently as a [ Pass ] entry by TestCopier.

Now W3CImportExpectations should only contain [ Skip ] entries.

Bug:  713987 
Change-Id: Ib5906aa652a3db64deb973a961b0dbf7cbfcc2ff
Reviewed-on: https://chromium-review.googlesource.com/592290
Commit-Queue: Robert Ma <robertma@chromium.org>
Reviewed-by: Quinten Yearsley <qyearsley@chromium.org>
Cr-Commit-Position: refs/heads/master@{#490782}
[modify] https://crrev.com/cb5ad98399c07e36877e9378361d402d2fbcef28/third_party/WebKit/LayoutTests/W3CImportExpectations

Status: Fixed (was: Started)
Project Member

Comment 19 by bugdroid1@chromium.org, Aug 3 2017

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

commit 57c4e4a54dc9ef0e25673421502570639c923f9b
Author: Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com>
Date: Thu Aug 03 11:56:13 2017

[Owners Extractor] Do not assert when LayoutTests/ itself is passed.

Commit 874543453709fb355ef88e85ac4bfe92d1ab99c3 ("[Owners Extractor] Fix
issues found in the actual run") added an assertion to the code to verify
that we are not passing a directory above LayoutTests/external to
find_and_extract_owners().

The assertion gets triggered with valid paths though; for example, changes
to LayoutTests/TestExpectations means //third_party/WebKit/LayoutTests gets
passed to the function, which aborts instead of just skipping that path.
This, in turn, broke our automatic web-platform-tests imports, as a recent
change there meant our scripts had to delete a test from TestExpectations.

For example:
https://luci-milo.appspot.com/buildbot/chromium.infra.cron/wpt-importer/415

leads to
Traceback (most recent call last):
  File "/mnt/data/b/rr/tmps9aWJe/w/src/third_party/WebKit/Tools/Scripts/wpt-import", line 18, in <module>
    host.exit(importer.main())
  File "/mnt/data/b/rr/tmps9aWJe/w/src/third_party/WebKit/Tools/Scripts/webkitpy/w3c/test_importer.py", line 122, in main
    self._upload_cl()
  File "/mnt/data/b/rr/tmps9aWJe/w/src/third_party/WebKit/Tools/Scripts/webkitpy/w3c/test_importer.py", line 385, in _upload_cl
    directory_owners = self.get_directory_owners()
  File "/mnt/data/b/rr/tmps9aWJe/w/src/third_party/WebKit/Tools/Scripts/webkitpy/w3c/test_importer.py", line 409, in get_directory_owners
    return extractor.list_owners(changed_files)
  File "/mnt/data/b/rr/tmps9aWJe/w/src/third_party/WebKit/Tools/Scripts/webkitpy/w3c/directory_owners_extractor.py", line 42, in list_owners
    owners_file, owners = self.find_and_extract_owners(self.filesystem.dirname(relpath))
  File "/mnt/data/b/rr/tmps9aWJe/w/src/third_party/WebKit/Tools/Scripts/webkitpy/w3c/directory_owners_extractor.py", line 69, in find_and_extract_owners
    assert directory.startswith(external_root)
AssertionError

This change just turns the assertion into a check to unbreak the imports, a
better one that increases test coverage should probably be landed later.

TBR=qyearsley@chromium.org,robertma@chromium.org

Bug:  713987 
Change-Id: I192f37bf10dad98bc32cf2ff15cefa09e440c4ee
Reviewed-on: https://chromium-review.googlesource.com/599908
Commit-Queue: Raphael Kubo da Costa (rakuco) <raphael.kubo.da.costa@intel.com>
Reviewed-by: Raphael Kubo da Costa (rakuco) <raphael.kubo.da.costa@intel.com>
Cr-Commit-Position: refs/heads/master@{#491704}
[modify] https://crrev.com/57c4e4a54dc9ef0e25673421502570639c923f9b/third_party/WebKit/Tools/Scripts/webkitpy/w3c/directory_owners_extractor.py
[modify] https://crrev.com/57c4e4a54dc9ef0e25673421502570639c923f9b/third_party/WebKit/Tools/Scripts/webkitpy/w3c/directory_owners_extractor_unittest.py

robertma, qyearsley: fyi ^
I'll double-check everything's fine with the next wpt import in an hour. You might want to double-check the patch.
Thank you for catching and fixing this, Raphael!

The assertion was added to prevent other paths out of external/ being passed in and escaping the termination condition, but I didn't realize that LayoutTests/TestExpectations could be legitimately changed during import, too.

I checked the patch and it looks good to me. There's just one question: is there anything else that can be modified that I missed? Now we are expecting the following paths:
LayoutTests/*             # TestExpectations
LayoutTests/external/**   # Tests imported by TestCopier, and baselines
(where ** includes all the sub-directories recursively and * doesn't)
> There's just one question: is there anything else that can be modified that I missed?

I'm not entirely sure myself. I was tempted to drop the assert altogether (and return (None,None) if we're not inside external/), but I'm not very familiar with the code and thus decided to err on the side of caution.

At the moment, I think the assert is only catching pathological conditions like wpt-import changing a LayoutTests subdirectory that's not in external/, or another part of the tree altogether.
I think that keeping the assert is good, since I believe it should always be true now. (And if it's not true and it catches something else, then that's good :-))
Project Member

Comment 24 by bugdroid1@chromium.org, Aug 31 2017

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

commit 0f8e35ed6ebe956f4ad097242d365f18cd412c49
Author: Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com>
Date: Thu Aug 31 18:18:50 2017

[Owners Extractor] Whitelist LayoutTests/FlagExpectations/.

Follow-up to commits 874543453709fb ("[Owners Extractor] Fix issues found in
the actual run") and 57c4e4a54dc9e ("[Owners Extractor] Do not assert when
LayoutTests/ itself is passed").

It turns out we were still asserting when an expectation file inside
LayoutTests/FlagExpectations/ was updated. A concrete case comes from
https://github.com/w3c/web-platform-tests/commit/27838c0248a1772d4bf6c1f378be63e25f700184,
which moved a test to a different directory. wpt-import adjusted the path in
one of the expectation files in LayoutTests/FlagExpectations/ accordingly,
but the owners extractor complained a forbidden path had been changed.

From
https://luci-milo.appspot.com/buildbot/chromium.infra.cron/wpt-importer/1005:

2017-08-31 08:35:28,494 - Gathering directory owners emails to CC.
Traceback (most recent call last):
  File "/mnt/data/b/rr/tmpCMVvWc/w/src/third_party/WebKit/Tools/Scripts/wpt-import", line 25, in <module>
    main()
  File "/mnt/data/b/rr/tmpCMVvWc/w/src/third_party/WebKit/Tools/Scripts/wpt-import", line 18, in main
    host.exit(importer.main())
  File "/mnt/data/b/rr/tmpCMVvWc/w/src/third_party/WebKit/Tools/Scripts/webkitpy/w3c/test_importer.py", line 126, in main
    self._upload_cl()
  File "/mnt/data/b/rr/tmpCMVvWc/w/src/third_party/WebKit/Tools/Scripts/webkitpy/w3c/test_importer.py", line 413, in _upload_cl
    directory_owners = self.get_directory_owners()
  File "/mnt/data/b/rr/tmpCMVvWc/w/src/third_party/WebKit/Tools/Scripts/webkitpy/w3c/test_importer.py", line 437, in get_directory_owners
    return extractor.list_owners(changed_files)
  File "/mnt/data/b/rr/tmpCMVvWc/w/src/third_party/WebKit/Tools/Scripts/webkitpy/w3c/directory_owners_extractor.py", line 43, in list_owners
    owners_file, owners = self.find_and_extract_owners(self.filesystem.dirname(relpath))
  File "/mnt/data/b/rr/tmpCMVvWc/w/src/third_party/WebKit/Tools/Scripts/webkitpy/w3c/directory_owners_extractor.py", line 75, in find_and_extract_owners
    directory, external_root)
AssertionError: /mnt/data/b/rr/tmpCMVvWc/w/src/third_party/WebKit/LayoutTests/FlagExpectations must start with /mnt/data/b/rr/tmpCMVvWc/w/src/third_party/WebKit/LayoutTests/external

Bug:  713987 
Change-Id: Ib400628398b228910f54ad24a84b6107c5ffec9d
Reviewed-on: https://chromium-review.googlesource.com/645852
Reviewed-by: Philip Jägenstedt <foolip@chromium.org>
Reviewed-by: Quinten Yearsley <qyearsley@chromium.org>
Commit-Queue: Raphael Kubo da Costa (rakuco) <raphael.kubo.da.costa@intel.com>
Cr-Commit-Position: refs/heads/master@{#498922}
[modify] https://crrev.com/0f8e35ed6ebe956f4ad097242d365f18cd412c49/third_party/WebKit/Tools/Scripts/webkitpy/w3c/directory_owners_extractor.py
[modify] https://crrev.com/0f8e35ed6ebe956f4ad097242d365f18cd412c49/third_party/WebKit/Tools/Scripts/webkitpy/w3c/directory_owners_extractor_unittest.py

Sign in to add a comment