
Rarely the jobs.logs RPC call can return corrupted data, such as mal-formed YAML data. As this is expected and very rare to occur, let's retry this RPC call several times to give it a chance to fix itself. Retrying would not swallow the log lines since we keep track of how many log lines each job has. Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15938>
22 lines
497 B
Python
22 lines
497 B
Python
from datetime import timedelta
|
|
|
|
|
|
class MesaCIException(Exception):
|
|
pass
|
|
|
|
|
|
class MesaCITimeoutError(MesaCIException):
|
|
def __init__(self, *args, timeout_duration: timedelta) -> None:
|
|
super().__init__(*args)
|
|
self.timeout_duration = timeout_duration
|
|
|
|
|
|
class MesaCIRetryError(MesaCIException):
|
|
def __init__(self, *args, retry_count: int) -> None:
|
|
super().__init__(*args)
|
|
self.retry_count = retry_count
|
|
|
|
|
|
class MesaCIParseException(MesaCIException):
|
|
pass
|