Skip to content
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

Merged
merged 3 commits into from
May 18, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,4 +93,3 @@ notifications:
email:
on_success: never
on_failure: always
webhooks: https://pulls.web-platform-tests.org/api/build
1 change: 0 additions & 1 deletion check_stability.ini
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,3 @@ skip_tests: conformance-checkers docs tools
# (particularly in terms of execution time), making it impractical in most
# cases.
ignore_changes: resources/**
results_url: https://pulls.web-platform-tests.org/api/stability
56 changes: 0 additions & 56 deletions tools/ci/check_stability.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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()
Expand All @@ -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")
Copy link
Contributor

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 :)


args, wpt_args = get_parser().parse_known_args()
return run(venv, wpt_args, **vars(args))
Expand All @@ -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"],
Expand All @@ -281,8 +231,6 @@ def run(venv, wpt_args, **kwargs):

setup_logging()

browser_name = wpt_args.product.split(":")[0]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Surprised that the linter doesn't recognized unused variables

Copy link
Member

Choose a reason for hiding this comment

The 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.

Copy link
Contributor

Choose a reason for hiding this comment

The 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"):
Expand Down Expand Up @@ -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.
Expand Down