mirror of
git://git.yoctoproject.org/yocto-autobuilder2.git
synced 2025-07-19 20:59:02 +02:00
wikilog: Filter monitoring on wiki log to build subset
We want the wiki log to primarily contain full and quick builds for processing by SWAT. The buildperf log entries are distracting but in case of failure we do need them there so adjust the code to handle this. Also, don't log reports of skipped builds but do log build warnings, since we do want warnings to be acted upon now. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
parent
e9c3f8fbd8
commit
31f297e026
|
@ -10,6 +10,8 @@ import time
|
|||
import pprint
|
||||
import re
|
||||
|
||||
monitored_parents = ['a-full', 'a-quick']
|
||||
|
||||
class WikiLog(service.BuildbotService):
|
||||
name = "WikiLog"
|
||||
wiki = None
|
||||
|
@ -58,6 +60,9 @@ class WikiLog(service.BuildbotService):
|
|||
|
||||
# Only place initial entries in the wiki for builds with no parents
|
||||
if not build['buildset']['parent_buildid']:
|
||||
# Only log full/quick builds on the wiki log
|
||||
if build['builder']['name'] not in monitored_parents:
|
||||
return
|
||||
yield self.wikiLock.acquire()
|
||||
try:
|
||||
result = yield threads.deferToThread(self.logBuild, build)
|
||||
|
@ -79,6 +84,32 @@ class WikiLog(service.BuildbotService):
|
|||
parent = yield self.master.data.get(("builds", build['buildset']['parent_buildid']))
|
||||
yield utils.getDetailsForBuild(self.master, parent, **self.neededDetails)
|
||||
|
||||
# Only run the logging code for builds in the monitored_parents list, or builds with
|
||||
# failures (to try and cut down on wiki noise)
|
||||
log = False
|
||||
headerpresent = False
|
||||
if build['results'] in [FAILURE, EXCEPTION, WARNINGS]:
|
||||
log = True
|
||||
if (parent and parent['builder']['name'] in monitored_parents) or \
|
||||
(build['builder']['name'] in monitored_parents):
|
||||
log = True
|
||||
headerpresent = True
|
||||
|
||||
if not log:
|
||||
return
|
||||
|
||||
if not headerpresent:
|
||||
yield self.wikiLock.acquire()
|
||||
try:
|
||||
result = yield threads.deferToThread(self.logBuild, build)
|
||||
finally:
|
||||
self.wikiLock.release()
|
||||
|
||||
if not result:
|
||||
log.err("wkl: Failed to log build failure %s on %s" % (
|
||||
build['buildid'], build['builder']['name']))
|
||||
return
|
||||
|
||||
entry = yield self.getEntry(build, parent)
|
||||
yield self.wikiLock.acquire()
|
||||
try:
|
||||
|
@ -187,13 +218,13 @@ class WikiLog(service.BuildbotService):
|
|||
|
||||
# Ignore logs for steps which succeeded/cancelled
|
||||
result = s['results']
|
||||
if result in (SUCCESS, RETRY, CANCELLED):
|
||||
continue
|
||||
if result == WARNINGS:
|
||||
# ignore warnings for log purposes for now
|
||||
if result in (SUCCESS, RETRY, CANCELLED, SKIPPED):
|
||||
continue
|
||||
#if result == WARNINGS:
|
||||
# # ignore warnings for log purposes for now
|
||||
# continue
|
||||
|
||||
# Log for FAILURE, SKIPPED, EXCEPTION
|
||||
# Log for FAILURE, EXCEPTION
|
||||
|
||||
step_name = s['name']
|
||||
step_number = s['number']
|
||||
|
|
Loading…
Reference in New Issue
Block a user