-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Stop posting PR results to pulls.web-platform-tests.org #11060
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,8 +7,6 @@ | |
import sys | ||
from ConfigParser import SafeConfigParser | ||
|
||
import requests | ||
|
||
here = os.path.dirname(__file__) | ||
wpt_root = os.path.abspath(os.path.join(here, os.pardir, os.pardir)) | ||
sys.path.insert(0, wpt_root) | ||
|
@@ -178,52 +176,6 @@ def pr(): | |
return pr if pr != "false" else None | ||
|
||
|
||
def post_results(results, pr_number, iterations, product, url, status): | ||
"""Post stability results to a given URL.""" | ||
payload_results = [] | ||
|
||
for test_name, test in results.iteritems(): | ||
subtests = [] | ||
for subtest_name, subtest in test['subtests'].items(): | ||
subtests.append({ | ||
'test': subtest_name, | ||
'result': { | ||
'messages': list(subtest['messages']), | ||
'status': subtest['status'] | ||
}, | ||
}) | ||
payload_results.append({ | ||
'test': test_name, | ||
'result': { | ||
'status': test['status'], | ||
'subtests': subtests | ||
} | ||
}) | ||
|
||
payload = { | ||
"pull": { | ||
"number": int(pr_number), | ||
"sha": os.environ.get("TRAVIS_PULL_REQUEST_SHA"), | ||
}, | ||
"job": { | ||
"id": int(os.environ.get("TRAVIS_JOB_ID")), | ||
"number": os.environ.get("TRAVIS_JOB_NUMBER"), | ||
"allow_failure": os.environ.get("TRAVIS_ALLOW_FAILURE") == 'true', | ||
"status": status, | ||
}, | ||
"build": { | ||
"id": int(os.environ.get("TRAVIS_BUILD_ID")), | ||
"number": os.environ.get("TRAVIS_BUILD_NUMBER"), | ||
}, | ||
"product": product, | ||
"iterations": iterations, | ||
"message": "All results were stable." if status == "passed" else "Unstable results.", | ||
"results": payload_results, | ||
} | ||
|
||
requests.post(url, json=payload) | ||
|
||
|
||
def get_changed_files(manifest_path, rev, ignore_changes, skip_tests): | ||
if not rev: | ||
branch_point = testfiles.branch_point() | ||
|
@@ -248,7 +200,6 @@ def main(): | |
|
||
venv = Virtualenv(os.environ.get("VIRTUAL_ENV", os.path.join(wpt_root, "_venv"))) | ||
venv.install_requirements(os.path.join(wpt_root, "tools", "wptrunner", "requirements.txt")) | ||
venv.install("requests") | ||
|
||
args, wpt_args = get_parser().parse_known_args() | ||
return run(venv, wpt_args, **vars(args)) | ||
|
@@ -266,7 +217,6 @@ def run(venv, wpt_args, **kwargs): | |
config.readfp(config_fp) | ||
skip_tests = config.get("file detection", "skip_tests").split() | ||
ignore_changes = set(config.get("file detection", "ignore_changes").split()) | ||
results_url = config.get("file detection", "results_url") | ||
|
||
if kwargs["output_bytes"] is not None: | ||
replace_streams(kwargs["output_bytes"], | ||
|
@@ -281,8 +231,6 @@ def run(venv, wpt_args, **kwargs): | |
|
||
setup_logging() | ||
|
||
browser_name = wpt_args.product.split(":")[0] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Surprised that the linter doesn't recognized unused variables There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We've had that turned off all the way back to 624c87e. The initial whitelist was essentially just everything we failed at that point. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks for the context! What do you think about enabling that feature? #11097 |
||
|
||
pr_number = pr() | ||
|
||
with TravisFold("browser_setup"): | ||
|
@@ -345,10 +293,6 @@ def run(venv, wpt_args, **kwargs): | |
write_results(logger.info, results, iterations, | ||
pr_number=pr_number, | ||
use_details=True) | ||
if pr_number: | ||
post_results(results, iterations=iterations, url=results_url, | ||
product=wpt_args.product, pr_number=pr_number, | ||
status="failed" if inconsistent else "passed") | ||
else: | ||
logger.info("No tests run.") | ||
# Be conservative and only return errors when we know for sure tests are changed. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've kind of wanted to do this for a while :)