-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Programmatic mapping of Chrome failures to existing monorail bugs #798
Comments
Initial request
EDIT: In retrospect, I should also have specified |
Flattened the results.json into a list of tests: import json
with open('results.json', 'r') as f:
results = json.load(f)
tests = results['results']
with open('tests.txt', 'w') as f:
for test in tests:
f.write(test['test'])
f.write('\n') And sorted it
|
And then a blinkpy script to search monorail: import sys
from blinkpy.w3c.monorail import MonorailAPI, MonorailIssue
from blinkpy.common.net.luci_auth import LuciAuth
from blinkpy.common.host import Host
import googleapiclient
host = Host()
token = LuciAuth(host).get_access_token()
api = MonorailAPI(access_token=token)
# A cache in case the runs break halfway. They did.
processed_tests = set()
with open('processed-tests.txt', 'r') as f:
for line in f:
line = line.strip()
if 'ERRORED' in line:
continue
processed_tests.add(line.split(' ')[0])
with open('tests.txt', 'r') as f:
tests = [line.strip() for line in f]
issues = api.api.issues()
def log(msg):
print(msg)
sys.stdout.flush()
log("Processing %s tests" % len(tests))
for test in tests:
if test in processed_tests:
continue
try:
resp = issues.list(projectId='chromium', q=test, can='open').execute()
bug_ids = map(lambda x : str(x['id']), resp['items'] if resp['totalResults'] > 0 else [])
log("%s => [%s]" % (test, ','.join(bug_ids)))
except googleapiclient.errors.HttpError:
log("%s ERRORED" % test) |
And the results: (Note: did a pass through processed-tests.txt and removed 626703 as that is a known meta-bug of zero value) Next step, turn this into a series of wpt-metadata PRs (using the same golang script as before), and let @foolip sort through which are junk and which are useful ;) |
Golang script for updating wpt-metadata: https://gist.github.com/stephenmcgruer/0b84c426f2840003c542bcb25740a9d8 |
@foolip - I've sent you a few PRs now; consider them a sample of the output of this methodology. I'd like those reviewed first to see if the rest of the data is worth uploading or not (the PRs so far cover ~30% of the ~800 total tests that fail in wpt.fyi and have exactly one bug when you search their test path in monorail). |
#804 (comment) has some bits useful for reviewing these PRs:
|
See #798 for the methodology
In #481 one of the programmatic imports we did was from a set of chrome specific failures on wpt.fyi, matching them against existing monorail bugs based on searching filenames.
It makes sense to do this for all Chrome failures, not just Chrome-specific failures, so let's do that! I'm going to use this issue to track it :).
The text was updated successfully, but these errors were encountered: