1from datetime import timedelta 2 3 4class MesaCIException(Exception): 5 pass 6 7 8class MesaCITimeoutError(MesaCIException): 9 def __init__(self, *args, timeout_duration: timedelta) -> None: 10 super().__init__(*args) 11 self.timeout_duration = timeout_duration 12 13 14class MesaCIRetryError(MesaCIException): 15 def __init__(self, *args, retry_count: int, last_job: None) -> None: 16 super().__init__(*args) 17 self.retry_count = retry_count 18 self.last_job = last_job 19 20 21class MesaCIParseException(MesaCIException): 22 pass 23 24 25class MesaCIKnownIssueException(MesaCIException): 26 """Exception raised when the Mesa CI script finds something in the logs that 27 is known to cause the LAVA job to eventually fail""" 28 29 pass 30