ci: pipeline_message: catch module loading errors

Currently, if the pipeline_message script runs in an an env missing the
aiohttp package, the pipeline_message script will throw a
ModuleNotFoundError and crash marge.

Make sure to catch and ignore these errors since the pipeline message
should never interfere with a merge request.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32773>
This commit is contained in:
Deborah Brouwer
2024-12-06 15:46:07 -08:00
committed by Marge Bot
parent 1f333ac9fa
commit 819f9f8425

View File

@@ -320,10 +320,11 @@ async def process_problem_jobs(session, project_id, problem_jobs):
async def main(pipeline_id: str, project_id: str = "176") -> str:
message = ""
timeout = aiohttp.ClientTimeout(total=120)
logging.basicConfig(level=logging.INFO)
try:
timeout = aiohttp.ClientTimeout(total=120)
logging.basicConfig(level=logging.INFO)
async with aiohttp.ClientSession(timeout=timeout) as session:
pipeline_status = await get_pipeline_status(
session, project_id, pipeline_id