Skip to content

Commit

Permalink
Merge pull request grpc#8730 from matt-kwong/fix-build-dashboard
Browse files Browse the repository at this point in the history
Fix build analysis dashboard
  • Loading branch information
matt-kwong authored Nov 15, 2016
2 parents d1bc240 + 983c2da commit 354d075
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 4 deletions.
5 changes: 5 additions & 0 deletions tools/run_tests/build_stats_schema_no_matrix.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@
"type": "INTEGER",
"mode": "NULLABLE"
},
{
"name": "no_report_files_found",
"type": "BOOLEAN",
"mode": "NULLABLE"
},
{
"name": "error",
"type": "RECORD",
Expand Down
33 changes: 29 additions & 4 deletions tools/run_tests/run_build_statistics.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,32 @@
import big_query_utils


_HAS_MATRIX=True
_PROJECT_ID = 'grpc-testing'
_HAS_MATRIX = True
_BUILDS = {'gRPC_master': _HAS_MATRIX,
'gRPC_interop_master': not _HAS_MATRIX,
'gRPC_pull_requests': _HAS_MATRIX,
_BUILDS = {'gRPC_interop_master': not _HAS_MATRIX,
'gRPC_master_linux': not _HAS_MATRIX,
'gRPC_master_macos': not _HAS_MATRIX,
'gRPC_master_windows': not _HAS_MATRIX,
'gRPC_performance_master': not _HAS_MATRIX,
'gRPC_portability_master_linux': not _HAS_MATRIX,
'gRPC_portability_master_windows': not _HAS_MATRIX,
'gRPC_master_asanitizer_c': not _HAS_MATRIX,
'gRPC_master_asanitizer_cpp': not _HAS_MATRIX,
'gRPC_master_msan_c': not _HAS_MATRIX,
'gRPC_master_tsanitizer_c': not _HAS_MATRIX,
'gRPC_master_tsan_cpp': not _HAS_MATRIX,
'gRPC_interop_pull_requests': not _HAS_MATRIX,
'gRPC_performance_pull_requests': not _HAS_MATRIX,
'gRPC_portability_pull_requests_linux': not _HAS_MATRIX,
'gRPC_portability_pr_win': not _HAS_MATRIX,
'gRPC_pull_requests_linux': not _HAS_MATRIX,
'gRPC_pull_requests_macos': not _HAS_MATRIX,
'gRPC_pr_win': not _HAS_MATRIX,
'gRPC_pull_requests_asan_c': not _HAS_MATRIX,
'gRPC_pull_requests_asan_cpp': not _HAS_MATRIX,
'gRPC_pull_requests_msan_c': not _HAS_MATRIX,
'gRPC_pull_requests_tsan_c': not _HAS_MATRIX,
'gRPC_pull_requests_tsan_cpp': not _HAS_MATRIX,
}
_URL_BASE = 'https://grpc-testing.appspot.com/job'

Expand Down Expand Up @@ -83,6 +102,7 @@
('tests.bins/asan/h2_proxy_test streaming_error_response '
'GRPC_POLL_STRATEGY=legacy'),
]
_NO_REPORT_FILES_FOUND_ERROR = 'No test report files were found. Configuration error?'
_UNKNOWN_ERROR = 'Unknown error'
_DATASET_ID = 'build_statistics'

Expand All @@ -101,6 +121,10 @@ def _scrape_for_known_errors(html):
return error_list, known_error_count


def _no_report_files_found(html):
return _NO_REPORT_FILES_FOUND_ERROR in html


def _get_last_processed_buildnumber(build_name):
query = 'SELECT max(build_number) FROM [%s:%s.%s];' % (
_PROJECT_ID, _DATASET_ID, build_name)
Expand Down Expand Up @@ -141,6 +165,7 @@ def _process_build(json_url, console_url):
failure_count = test_result['failCount']
build_result['pass_count'] = test_result['passCount']
build_result['failure_count'] = failure_count
build_result['no_report_files_found'] = _no_report_files_found(html)
if failure_count > 0:
error_list, known_error_count = _scrape_for_known_errors(html)
unknown_error_count = failure_count - known_error_count
Expand Down

0 comments on commit 354d075

Please sign in to comment.