mesa/.gitlab-ci/lava/exceptions.py
Guilherme Gallo 2c51b7a9c9 ci/lava: Detect R8152 issues preemptively and retry
Implement a log-based retry hint for R8152 issue described in #6681,
which is based on detecting these two consecutive lines:

```
r8152 <USB> eth0: Tx status -71
nfs: server <IP> not responding, still trying
```

Where <IP> and <USB> could be any IP and USB addresses, respectfully.

This commit is a temporary fix since it requires a section-aware log
follower, implemented in !16323. When the cited MR is merged, one will
make a proper fix on top of that.

Closes: #6681

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17389>
2022-07-08 12:26:05 +00:00

29 lines
697 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
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