summaryrefslogtreecommitdiff
path: root/.gitlab-ci/lava/exceptions.py
blob: f877b0245109df7ee05661ae810576182351c3e2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
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, last_job: None) -> None:
        super().__init__(*args)
        self.retry_count = retry_count
        self.last_job = last_job


class MesaCIParseException(MesaCIException):
    pass


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