Recover from broken process pools in merge operations

Some merge operations catch too generic exceptions which causes
BrokeProcessPool exceptions to never reach the executor to allow the
executor to recover.

Bubble these exceptions up to the exececutor for them to be handled.

Change-Id: I77d4d381e12195bcfe7d831a2b9e6d361b90f5a2
This commit is contained in:
Albin Vass 2022-03-24 14:20:48 +01:00
parent 3eae2582d6
commit d5bfbf53b6
1 changed files with 5 additions and 0 deletions

View File

@ -23,6 +23,7 @@ import os
import re
import shutil
import time
from concurrent.futures.process import BrokenProcessPool
import git
import gitdb
@ -1058,6 +1059,8 @@ class Merger(object):
try:
repo.reset(zuul_event_id=zuul_event_id,
process_worker=process_worker)
except BrokenProcessPool:
raise
except Exception:
log.exception("Unable to reset repo %s" % repo)
return None, None
@ -1135,6 +1138,8 @@ class Merger(object):
item, recent, repo_state, zuul_event_id,
branches=branches,
process_worker=process_worker)
except BrokenProcessPool:
raise
except Exception:
self.log.exception("Error merging item %s", item)
if errors is not None: