ci/lava: Add section for device wait
This way it's easier to see how long it took. Signed-off-by: Daniel Stone <daniels@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31602>
This commit is contained in:
@@ -324,7 +324,14 @@ def execute_job_with_retries(
|
|||||||
try:
|
try:
|
||||||
job_log["submitter_start_time"] = datetime.now().isoformat()
|
job_log["submitter_start_time"] = datetime.now().isoformat()
|
||||||
submit_job(job)
|
submit_job(job)
|
||||||
wait_for_job_get_started(job, attempt_no)
|
queue_section = GitlabSection(
|
||||||
|
id="dut_queue",
|
||||||
|
header="Waiting for hardware device to become available",
|
||||||
|
type=LogSectionType.LAVA_QUEUE,
|
||||||
|
start_collapsed=False,
|
||||||
|
)
|
||||||
|
with queue_section as section:
|
||||||
|
wait_for_job_get_started(job, attempt_no)
|
||||||
log_follower: LogFollower = bootstrap_log_follower()
|
log_follower: LogFollower = bootstrap_log_follower()
|
||||||
follow_job_execution(job, log_follower)
|
follow_job_execution(job, log_follower)
|
||||||
return job
|
return job
|
||||||
|
@@ -10,12 +10,17 @@ from lava.utils.gitlab_section import GitlabSection
|
|||||||
|
|
||||||
class LogSectionType(Enum):
|
class LogSectionType(Enum):
|
||||||
UNKNOWN = auto()
|
UNKNOWN = auto()
|
||||||
|
LAVA_QUEUE = auto()
|
||||||
LAVA_BOOT = auto()
|
LAVA_BOOT = auto()
|
||||||
TEST_DUT_SUITE = auto()
|
TEST_DUT_SUITE = auto()
|
||||||
TEST_SUITE = auto()
|
TEST_SUITE = auto()
|
||||||
TEST_CASE = auto()
|
TEST_CASE = auto()
|
||||||
LAVA_POST_PROCESSING = auto()
|
LAVA_POST_PROCESSING = auto()
|
||||||
|
|
||||||
|
# How long should we wait for a device to become available?
|
||||||
|
# For post-merge jobs, this should be ~infinite, but we can fail more
|
||||||
|
# aggressively for pre-merge.
|
||||||
|
LAVA_QUEUE_TIMEOUT = int(getenv("LAVA_QUEUE_TIMEOUT", 60))
|
||||||
|
|
||||||
# Empirically, successful device boot in LAVA time takes less than 3
|
# Empirically, successful device boot in LAVA time takes less than 3
|
||||||
# minutes.
|
# minutes.
|
||||||
@@ -43,6 +48,7 @@ LAVA_POST_PROCESSING_TIMEOUT = int(getenv("LAVA_POST_PROCESSING_TIMEOUT", 5))
|
|||||||
|
|
||||||
FALLBACK_GITLAB_SECTION_TIMEOUT = timedelta(minutes=10)
|
FALLBACK_GITLAB_SECTION_TIMEOUT = timedelta(minutes=10)
|
||||||
DEFAULT_GITLAB_SECTION_TIMEOUTS = {
|
DEFAULT_GITLAB_SECTION_TIMEOUTS = {
|
||||||
|
LogSectionType.LAVA_QUEUE: timedelta(minutes=LAVA_QUEUE_TIMEOUT),
|
||||||
LogSectionType.LAVA_BOOT: timedelta(minutes=LAVA_BOOT_TIMEOUT),
|
LogSectionType.LAVA_BOOT: timedelta(minutes=LAVA_BOOT_TIMEOUT),
|
||||||
LogSectionType.TEST_DUT_SUITE: timedelta(minutes=LAVA_TEST_DUT_SUITE_TIMEOUT),
|
LogSectionType.TEST_DUT_SUITE: timedelta(minutes=LAVA_TEST_DUT_SUITE_TIMEOUT),
|
||||||
LogSectionType.TEST_SUITE: timedelta(minutes=LAVA_TEST_SUITE_TIMEOUT),
|
LogSectionType.TEST_SUITE: timedelta(minutes=LAVA_TEST_SUITE_TIMEOUT),
|
||||||
|
Reference in New Issue
Block a user