ci: pipeline_message: reset empty errors
Currently marge will ignore an error message if it is just the word "error" without any further information. However, if she never finds a more informative message, then she will just print that meaningless error message. Instead of an empty error message, just leave the message blank. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32773>
This commit is contained in:

committed by
Marge Bot

parent
011a867fbe
commit
3c441191d9
@@ -250,12 +250,14 @@ async def search_job_log_for_errors(session, project_id, job):
|
||||
if "error" in line.lower():
|
||||
if any(ignore.lower() in line.lower() for ignore in ignore_list):
|
||||
continue
|
||||
|
||||
# remove date and formatting before error message
|
||||
log_error_message = line[line.lower().find("error") :]
|
||||
log_error_message = line[line.lower().find("error") :].strip()
|
||||
|
||||
# if there is no further info after the word error then it's not helpful
|
||||
if log_error_message.lower() == "error":
|
||||
continue
|
||||
if log_error_message.lower() == "errors":
|
||||
# so reset the message and try again.
|
||||
if log_error_message.lower() in {"error", "errors", "error:", "errors:"}:
|
||||
log_error_message = ""
|
||||
continue
|
||||
break
|
||||
|
||||
|
Reference in New Issue
Block a user