From d48648293707413a6ca448c0227cf2c77c562e34 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Crist=C3=B3bal=20Arroyo?= Date: Tue, 2 Apr 2024 13:48:01 -0500 Subject: [PATCH] Warn if a test regression doesn't show an output from sql_run script (#38) Signed-off-by: Crola1702 --- database/scripts/check_buildfarm.rb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/database/scripts/check_buildfarm.rb b/database/scripts/check_buildfarm.rb index 69a81c2..ee217ff 100755 --- a/database/scripts/check_buildfarm.rb +++ b/database/scripts/check_buildfarm.rb @@ -40,7 +40,12 @@ def get_issues_list(jobs_to_filter = []) issues_map = Hash.new test_regressions_today.each do |tr| tr_flakiness = %x{./sql_run.sh calculate_flakiness_jobs.sql "#{tr['error_name']}" "15 days"} - tr_flakiness_output = parse_sql_output(tr_flakiness).uniq { |item| item["job_name"] } + tr_flakiness_raw_out = parse_sql_output(tr_flakiness) + if tr_flakiness_raw_out.nil? + puts "WARNING: Error parsing flakiness output for '#{tr['error_name']}' in #{tr['job_name']}##{tr['build_number']}" + next + end + tr_flakiness_output = tr_flakiness_raw_out.uniq { |item| item["job_name"] } tr_flakiness_output.map { |item| item['error_name'] = tr['error_name'] item['github_issues'] = parse_known_issues(tr['error_name'])