
Move exceptions to its own file. Create MesaCITimeoutError and MesaCIRetryError with specific exception data for better exception classification. Avoid the use of `fatal_err` in favor of raising a proper exception. Make _call_proxy exception handling exhaustive, add missing ResponseError treatment. Also, detect JobError during job result parsing. So when a LAVA timeout error happens, it is probably cause by some boot/network issues with a specific device, we can retry the same job in other device with the same device_type. Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15938>
17 lines
440 B
Python
17 lines
440 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 |