You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by bu...@apache.org on 2018/08/10 16:28:59 UTC
[1/2] hbase git commit: HBASE-20979 Flaky test reporting should
specify what JSON it needs and handle HTTP errors
Repository: hbase
Updated Branches:
refs/heads/HBASE-20387 [created] 7cd266e9f
HBASE-20979 Flaky test reporting should specify what JSON it needs and handle HTTP errors
Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/9aa1cd70
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/9aa1cd70
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/9aa1cd70
Branch: refs/heads/HBASE-20387
Commit: 9aa1cd70b92bcd860c13ea4d75d7be0899095b0b
Parents: 86821de
Author: Sean Busbey <bu...@apache.org>
Authored: Mon Jul 30 12:36:54 2018 -0500
Committer: Sean Busbey <bu...@apache.org>
Committed: Fri Aug 10 10:41:00 2018 -0500
----------------------------------------------------------------------
dev-support/report-flakies.py | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/hbase/blob/9aa1cd70/dev-support/report-flakies.py
----------------------------------------------------------------------
diff --git a/dev-support/report-flakies.py b/dev-support/report-flakies.py
index 201980d..1b3161a 100755
--- a/dev-support/report-flakies.py
+++ b/dev-support/report-flakies.py
@@ -76,7 +76,10 @@ def get_bad_tests(build_url, is_yetus):
Returns None if can't get maven output from the build or if there is any other error.
"""
logger.info("Analyzing %s", build_url)
- response = requests.get(build_url + "/api/json").json()
+ needed_fields="_class,building"
+ if is_yetus:
+ needed_fields+=",artifacts[fileName,relativePath]"
+ response = requests.get(build_url + "/api/json?tree=" + needed_fields).json()
if response["building"]:
logger.info("Skipping this build since it is in progress.")
return {}
@@ -125,7 +128,11 @@ def expand_multi_config_projects(cli_args):
excluded_builds = []
if excluded_builds_arg is not None and excluded_builds_arg[i] != "None":
excluded_builds = [int(x) for x in excluded_builds_arg[i].split(",")]
- response = requests.get(job_url + "/api/json").json()
+ request = requests.get(job_url + "/api/json?tree=_class,activeConfigurations%5Burl%5D")
+ if request.status_code != 200:
+ raise Exception("Failed to get job information from jenkins for url '" + job_url +
+ "'. Jenkins returned HTTP status " + str(request.status_code))
+ response = request.json()
if response.has_key("activeConfigurations"):
for config in response["activeConfigurations"]:
final_expanded_urls.append({'url':config["url"], 'max_builds': max_builds,
@@ -152,7 +159,7 @@ expanded_urls = expand_multi_config_projects(args)
for url_max_build in expanded_urls:
url = url_max_build["url"]
excludes = url_max_build["excludes"]
- json_response = requests.get(url + "/api/json").json()
+ json_response = requests.get(url + "/api/json?tree=id,builds%5Bnumber,url%5D").json()
if json_response.has_key("builds"):
builds = json_response["builds"]
logger.info("Analyzing job: %s", url)
[2/2] hbase git commit: HBASE-20387 create flaky test report as a
part of nightly jobs.
Posted by bu...@apache.org.
HBASE-20387 create flaky test report as a part of nightly jobs.
Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/7cd266e9
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/7cd266e9
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/7cd266e9
Branch: refs/heads/HBASE-20387
Commit: 7cd266e9fe512df50bb2b7e9ec2b12dbc168c6bc
Parents: 9aa1cd7
Author: Sean Busbey <bu...@apache.org>
Authored: Fri Aug 10 11:28:10 2018 -0500
Committer: Sean Busbey <bu...@apache.org>
Committed: Fri Aug 10 11:28:10 2018 -0500
----------------------------------------------------------------------
dev-support/Jenkinsfile | 34 ++++++++++++++++++++++++++++++++++
1 file changed, 34 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/hbase/blob/7cd266e9/dev-support/Jenkinsfile
----------------------------------------------------------------------
diff --git a/dev-support/Jenkinsfile b/dev-support/Jenkinsfile
index 59d3227..172ef16 100644
--- a/dev-support/Jenkinsfile
+++ b/dev-support/Jenkinsfile
@@ -165,6 +165,40 @@ pipeline {
}
}
}
+ stage ('project branch reporting') {
+ parallel {
+ stage ('build flaky report') {
+ steps {
+ // since we don't define a new node for running, we'll reuse the scm checkout
+ sh '''#!/usr/bin/env bash
+ set -e
+ rm -rf output-flaky-report && mkdir output-flaky-report
+ declare -a flaky_args
+ flaky_args=("${flaky_args[@]}" --urls "${JOB_URL}" --is-yetus True --max-builds 5)
+ // TODO Once we have a branch-specific "run the flaky tests" job add it here
+ // flaky_args=("${flaky_args[@]}" --urls "${JENKINS_URL}/job/HBase-Flaky-Tests-${BRANCH_NAME}" --max-builds 40)
+ docker build -t hbase-dev-support dev-support
+ docker run -v component:/hbase -v output-flaky-report:/ouput-flaky-report --workdir=/ouput-flaky-report hbase-dev-support python /hbase/dev-support/report-flakies.py --mvn -v "${flaky_args[@]}"
+'''
+ }
+ post {
+ always {
+ // Has to be relative to WORKSPACE.
+ archive "output-flaky-report/*"
+ publishHTML target: [
+ allowMissing: true,
+ keepAll: true,
+ alwaysLinkToLastBuild: true,
+ // Has to be relative to WORKSPACE
+ reportDir: "output-flaky-report",
+ reportFiles: 'dashboard.html',
+ reportName: 'Flaky Test Report'
+ ]
+ }
+ }
+ }
+ }
+ }
stage ('init health results') {
steps {
// stash with given name for all tests we might run, so that we can unstash all of them even if