2022-04-01 02:42:49 +08:00
|
|
|
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):
|
2023-04-18 11:18:12 +08:00
|
|
|
def __init__(self, *args, retry_count: int, last_job: None) -> None:
|
2022-04-01 02:42:49 +08:00
|
|
|
super().__init__(*args)
|
2022-04-21 07:55:47 +08:00
|
|
|
self.retry_count = retry_count
|
2023-04-18 11:18:12 +08:00
|
|
|
self.last_job = last_job
|
2022-04-21 07:55:47 +08:00
|
|
|
|
|
|
|
|
|
|
|
class MesaCIParseException(MesaCIException):
|
|
|
|
pass
|
2022-07-07 09:59:11 +08:00
|
|
|
|
|
|
|
|
|
|
|
class MesaCIKnownIssueException(MesaCIException):
|
|
|
|
"""Exception raised when the Mesa CI script finds something in the logs that
|
|
|
|
is known to cause the LAVA job to eventually fail"""
|
|
|
|
|
|
|
|
pass
|