From 6dc094decdf2aec47be9364bfeb137f0201e79ff Mon Sep 17 00:00:00 2001 From: Deborah Brouwer Date: Fri, 20 Dec 2024 12:40:17 -0800 Subject: [PATCH] ci: pipeline_message: ignore harmless build logs Currently marge gets confused when parsing a build log and mistakes innocuous lines that have the word "error" in them as actual issues. Example: https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31093#note_2705442 https://gitlab.freedesktop.org/mesa/mesa/-/pipelines/1331453 Ignore lines with the word `error` in them that are not actual issues, so that marge can provide more useful comments. Part-of: --- .marge/hooks/pipeline_message.py | 4 ++++ bin/ci/test/test_pipeline_message.py | 7 +++++++ 2 files changed, 11 insertions(+) diff --git a/.marge/hooks/pipeline_message.py b/.marge/hooks/pipeline_message.py index ef5bc7ebb37..f226729e849 100755 --- a/.marge/hooks/pipeline_message.py +++ b/.marge/hooks/pipeline_message.py @@ -218,6 +218,7 @@ async def search_job_log_for_errors(session, project_id, job): # forget to add a comma after each entry ignore_list = [ "aborting", + "building c", "error_msg : None", "error_type", "exit code", @@ -225,9 +226,12 @@ async def search_job_log_for_errors(session, project_id, job): "exiting now", "job failed", "no files to upload", + "performing test", "ret code", "retry", "retry-all-errors", + "strerror_", + "success", "unknown-section", ] job_log = await get_job_log(session, project_id, job["id"]) diff --git a/bin/ci/test/test_pipeline_message.py b/bin/ci/test/test_pipeline_message.py index fe48c597d46..092c53fb4be 100644 --- a/bin/ci/test/test_pipeline_message.py +++ b/bin/ci/test/test_pipeline_message.py @@ -172,6 +172,13 @@ async def test_search_job_log_for_errors(mock_get_job_log): job_log = r""" error_msg: something useful +-- Looking for strerror_r - found +-- Looking for strerror_s - not found +[49/176] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/ErrorHandling.cpp.o +[127/2034] Building C object lib/Support/CMakeFiles/LLVMSupport.dir/regerror.c.o +-- Performing Test HAS_WERROR_GLOBAL_CTORS +-- Performing Test C_SUPPORTS_WERROR_UNGUARDED_AVAILABILITY_NEW - Success +-- Performing Test LLVM_LIBSTDCXX_SOFT_ERROR error aborting error_msg : None error_type : Job