From: "Magnus Granberg" <zorry@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/tinderbox-cluster:master commit in: buildbot_gentoo_ci/steps/
Date: Wed, 26 Jul 2023 09:23:12 +0000 (UTC) [thread overview]
Message-ID: <1690363276.db8e966eef3ede0212dcf85d6d5b82c28d3dfcd5.zorry@gentoo> (raw)
commit: db8e966eef3ede0212dcf85d6d5b82c28d3dfcd5
Author: Magnus Granberg <zorry <AT> gentoo <DOT> org>
AuthorDate: Wed Jul 26 09:21:16 2023 +0000
Commit: Magnus Granberg <zorry <AT> gentoo <DOT> org>
CommitDate: Wed Jul 26 09:21:16 2023 +0000
URL: https://gitweb.gentoo.org/proj/tinderbox-cluster.git/commit/?id=db8e966e
Check issue titel nice
Signed-off-by: Magnus Granberg <zorry <AT> gentoo.org>
buildbot_gentoo_ci/steps/bugs.py | 13 +++++++++++--
buildbot_gentoo_ci/steps/logs.py | 31 +++++++++++++++----------------
2 files changed, 26 insertions(+), 18 deletions(-)
diff --git a/buildbot_gentoo_ci/steps/bugs.py b/buildbot_gentoo_ci/steps/bugs.py
index ad87be9..4d958b7 100644
--- a/buildbot_gentoo_ci/steps/bugs.py
+++ b/buildbot_gentoo_ci/steps/bugs.py
@@ -126,13 +126,22 @@ class GetBugs(BuildStep):
for match_word in match_search_text:
if match_word in match_bug_text:
matches = matches + 1
- print(f"Bug: {str(bug['id'])} Matched words: {str(matches)} Summary: {bug['summary']}")
- if matches >= 5:
+ # try to match the nice words
+ matches_nice = 0
+ match_search_text_nice = list(self.getProperty('error_dict')['title_issue_nice'].split())
+ #FIXME: add check for cp
+ for match_word in match_search_text_nice:
+ if match_word in match_bug_text:
+ matches_nice = matches_nice + 1
+ print(f"Bug: {str(bug['id'])} Matched words: {str(matches)} {str(matches_nice)} Summary: {bug['summary']}")
+ #FIXME: set it in bug_config
+ if matches >= 6 or matches_nice >= 6:
match = {}
match['match'] = True
match['id'] = bug['id']
match['summary'] = bug['summary']
yield log.addStdout(f"Line to match: {self.getProperty('error_dict')['title_issue']}\n")
+ yield log.addStdout(f"Line to match: {self.getProperty('error_dict')['title_issue_nice']}\n")
if match:
yield log.addStdout('Match bug: YES\n')
yield log.addStdout(f"Bug: {str(match['id'])} Summary: {match['summary']}\n")
diff --git a/buildbot_gentoo_ci/steps/logs.py b/buildbot_gentoo_ci/steps/logs.py
index 47112e0..d71eb99 100644
--- a/buildbot_gentoo_ci/steps/logs.py
+++ b/buildbot_gentoo_ci/steps/logs.py
@@ -184,18 +184,18 @@ class MakeIssue(BuildStep):
def __init__(self, **kwargs):
super().__init__(**kwargs)
- def getNiceErrorLine(self, line):
+ def getNiceErrorLine(self, full_line):
# strip away hex addresses, loong path names, line and time numbers and other stuff
- # https://github.com/toralf/tinderbox/blob/main/bin/job.sh#L467
+ # https://github.com/toralf/tinderbox/blob/main/bin/job.sh#L469
# FIXME: Add the needed line when needed
- if re.search(': line', line):
- line = re.sub(r"\d", "<snip>", line)
- # Shorten the path
- if line.startswith('/usr/'):
- line = line.replace(os.path.split(line.split(' ', 1)[0])[0], '/...')
- if re.search(': \d:\d: ', line):
- line = re.sub(r":\d:\d: ", ": ", line)
- return line
+ new_line = []
+ for line in full_line.split(' '):
+ # Shorten the path
+ if line.startswith('/usr/') or line.startswith('/var/') or line.startswith('../'):
+ split_path_line = os.path.split(line)
+ line = line.replace(split_path_line[0], '...')
+ new_line.append(line)
+ return ' '.join(new_line)
def ClassifyIssue(self):
# get the title for the issue
@@ -215,11 +215,12 @@ class MakeIssue(BuildStep):
self.error_dict['title_found'] = True
else:
self.error_dict['title_issue'] = 'title_issue : None'
- self.error_dict['title_nice'] = 'title_issue : None'
+ self.error_dict['title_issue_nice'] = 'title_issue_nice : None'
self.error_dict['title_found'] = False
- self.error_dict['title_phase'] = 'failed in '+ self.error_dict['phase']
+ self.error_dict['title_phase'] = 'fails to '+ self.error_dict['phase'] + ':'
#set the error title
- self.error_dict['title'] = self.error_dict['title_phase'] + ' - ' + self.error_dict['title_issue']
+ self.error_dict['title'] = ' '.join([self.error_dict['title_phase'], self.error_dict['title_issue']])
+ self.error_dict['title_nice'] = ' '.join([self.error_dict['title_phase'], self.error_dict['title_issue_nice']])
@defer.inlineCallbacks
def run(self):
@@ -249,8 +250,6 @@ class MakeIssue(BuildStep):
yield self.ClassifyIssue()
print(self.error_dict)
self.setProperty("status", 'failed', 'status')
- #FIXME: nice description for post bug
- self.error_dict['summary_log_nice'] = ''
self.setProperty("error_dict", self.error_dict, 'error_dict')
self.aftersteps_list.append(bugs.GetBugs())
if warning:
@@ -463,7 +462,7 @@ class SetupBugReportSteps(BuildStep):
bug_args['user'] = bug_config['user']
bug_args['passwd'] = yield p.render(util.Secret("bugs_password"))
bug_params = {}
- title = separator.join([bug_config['extra_summery'], self.getProperty('error_dict')['cpv'], self.getProperty('error_dict')['title']])
+ title = separator.join([bug_config['extra_summery'], self.getProperty('error_dict')['cpv'], self.getProperty('error_dict')['title_nice']])
# bug title max 170
if len(title) >= 170:
title = title[:167] + '...'
next reply other threads:[~2023-07-26 9:23 UTC|newest]
Thread overview: 72+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-26 9:23 Magnus Granberg [this message]
-- strict thread matches above, loose matches on Subject: below --
2024-10-16 20:50 [gentoo-commits] proj/tinderbox-cluster:master commit in: buildbot_gentoo_ci/steps/ Magnus Granberg
2024-03-31 19:40 Magnus Granberg
2024-03-31 19:40 Magnus Granberg
2024-03-23 14:13 Magnus Granberg
2024-03-21 16:56 Magnus Granberg
2024-03-19 17:19 Magnus Granberg
2024-03-17 20:40 Magnus Granberg
2024-03-16 8:49 Magnus Granberg
2024-02-05 18:54 Magnus Granberg
2024-02-04 11:32 Magnus Granberg
2024-02-04 9:49 Magnus Granberg
2024-02-03 10:02 Magnus Granberg
2023-06-10 10:08 Magnus Granberg
2023-06-05 8:09 Magnus Granberg
2023-06-05 8:09 Magnus Granberg
2023-05-08 20:19 Magnus Granberg
2023-03-10 22:36 Magnus Granberg
2023-03-10 22:36 Magnus Granberg
2023-03-10 1:47 Magnus Granberg
2023-02-28 21:41 Magnus Granberg
2023-02-28 21:41 Magnus Granberg
2022-09-25 11:46 Magnus Granberg
2022-08-10 21:51 Magnus Granberg
2022-08-05 18:32 Magnus Granberg
2022-07-30 22:40 Magnus Granberg
2022-07-27 11:02 Magnus Granberg
2022-07-27 11:02 Magnus Granberg
2022-07-27 11:02 Magnus Granberg
2022-07-27 11:02 Magnus Granberg
2022-07-26 11:54 Magnus Granberg
2022-07-13 20:01 Magnus Granberg
2022-07-08 21:54 Magnus Granberg
2022-07-06 18:44 Magnus Granberg
2022-07-04 17:44 Magnus Granberg
2022-06-28 23:26 Magnus Granberg
2022-06-01 0:19 Magnus Granberg
2022-04-22 12:34 Magnus Granberg
2022-01-28 10:09 Magnus Granberg
2022-01-24 8:41 Magnus Granberg
2022-01-24 0:42 Magnus Granberg
2022-01-22 20:50 Magnus Granberg
2022-01-18 20:20 Magnus Granberg
2022-01-18 19:38 Magnus Granberg
2022-01-18 19:16 Magnus Granberg
2022-01-08 17:25 Magnus Granberg
2021-11-01 2:22 Magnus Granberg
2021-10-23 22:26 Magnus Granberg
2021-10-23 22:24 Magnus Granberg
2021-10-06 1:35 Magnus Granberg
2021-10-02 20:52 Magnus Granberg
2021-09-28 22:16 Magnus Granberg
2021-09-22 0:04 Magnus Granberg
2021-09-21 1:29 Magnus Granberg
2021-09-20 23:28 Magnus Granberg
2021-09-07 0:46 Magnus Granberg
2021-07-17 8:14 Magnus Granberg
2021-05-18 8:55 Magnus Granberg
2021-04-26 20:26 Magnus Granberg
2021-04-20 7:05 Magnus Granberg
2021-04-13 19:03 Magnus Granberg
2021-04-02 22:12 Magnus Granberg
2021-04-02 22:12 Magnus Granberg
2021-04-02 22:12 Magnus Granberg
2021-04-02 22:12 Magnus Granberg
2021-03-29 0:34 Magnus Granberg
2021-03-29 0:34 Magnus Granberg
2021-03-20 13:42 Magnus Granberg
2021-03-20 13:42 Magnus Granberg
2021-03-20 13:42 Magnus Granberg
2021-02-28 18:48 Magnus Granberg
2021-02-24 21:27 Magnus Granberg
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1690363276.db8e966eef3ede0212dcf85d6d5b82c28d3dfcd5.zorry@gentoo \
--to=zorry@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox