From 92b796f7c2580f9bd93a225072d56cbf8f13deaa Mon Sep 17 00:00:00 2001 From: Magnus Granberg Date: Fri, 23 Feb 2024 00:58:06 +0100 Subject: Fix phase_error and pattern_infos Signed-off-by: Magnus Granberg --- buildbot_gentoo_ci/steps/logs.py | 14 ++++++++++---- py/log_parser.py | 4 ++-- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/buildbot_gentoo_ci/steps/logs.py b/buildbot_gentoo_ci/steps/logs.py index 50e3f3f..aacb8a5 100644 --- a/buildbot_gentoo_ci/steps/logs.py +++ b/buildbot_gentoo_ci/steps/logs.py @@ -46,9 +46,10 @@ def PersOutputOfLogParser(rc, stdout, stderr): 'status' : s['status'], 'line' : s['line'], 'search_pattern' : s['search_pattern'], - 'phase' : s['phase'], + 'phase' : s['phase'].lower(), 'uuid' : s['uuid'], 'description' : s['description'], + 'url' : s['url'], }) build_summery_output['summary_log_dict'] = summary_log_dict #FIXME: Handling of stderr output @@ -221,7 +222,7 @@ class MakeIssue(BuildStep): for k, v in sorted(self.summary_log_dict.items()): # get the issue error for s in v['pattern_infos']: - if s['search_type'] == self.error_dict['phase'] and s['status'] == 'error': + if s['phase'] == self.error_dict['phase'] and s['status'] == 'error': text_issue_list.append(v['text']) # add the issue error self.error_dict['cpv'] = self.getProperty('log_cpv') @@ -259,9 +260,14 @@ class MakeIssue(BuildStep): # check if the build did fail if v['text'].startswith(' * ERROR:') and v['text'].endswith(' phase):'): # get phase error - phase_error = v['text'].split(' (')[1].split(' phase')[0] - self.error_dict['phase'] = phase_error + self.error_dict['phase'] = v['text'].split(' (')[1].split(' phase')[0] error = True + if v['text'].startswith(' * Maintainer:'): + Maintainers = [] + for email in v['text'].split(':')[1].split(' '): + if email != '': + Maintainers.append(email) + self.setProperty("Maintainers", Maintainers, 'Maintainers') #FIXME: write summary_log_list to a file # add issue/bug/pr report if error: diff --git a/py/log_parser.py b/py/log_parser.py index e3725bb..e8f319b 100644 --- a/py/log_parser.py +++ b/py/log_parser.py @@ -28,8 +28,8 @@ def get_pattern_dict(catchissue, i, uuid): patten_dict['end'] = catchissue[2] patten_dict['status'] = catchissue[3] patten_dict['search_type'] = catchissue[4] - patten_dict['url'] = catchissue[5] - patten_dict['description'] = catchissue[6] + patten_dict['url'] = catchissue[6] + patten_dict['description'] = catchissue[7] return patten_dict def addPatternToList(phaseList, log_search_patterns, uuid): -- cgit v1.2.3-65-gdbad