From: Guilherme Gallo Date: Thu, 18 May 2023 11:44:25 +0000 (-0300) Subject: ci/lava: Raise the post test metadata gathering retry count X-Git-Tag: upstream/23.3.3~8369 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=80290bcdddf150789d936636e039e4c81c9c0c53;p=platform%2Fupstream%2Fmesa.git ci/lava: Raise the post test metadata gathering retry count In some devices, it takes a few dozens of seconds to LAVA post process the job and give final metadata related to the job. It is worth to wait a little more (up to 30 sec) to make structured log data more accurate. Signed-off-by: Guilherme Gallo Part-of: --- diff --git a/.gitlab-ci/lava/lava_job_submitter.py b/.gitlab-ci/lava/lava_job_submitter.py index 5eb624e..92923fc 100755 --- a/.gitlab-ci/lava/lava_job_submitter.py +++ b/.gitlab-ci/lava/lava_job_submitter.py @@ -70,7 +70,7 @@ WAIT_FOR_DEVICE_POLLING_TIME_SEC = int( # the final details. WAIT_FOR_LAVA_POST_PROCESSING_SEC = int(getenv("LAVA_WAIT_LAVA_POST_PROCESSING_SEC", 5)) WAIT_FOR_LAVA_POST_PROCESSING_RETRIES = int( - getenv("LAVA_WAIT_LAVA_POST_PROCESSING_RETRIES", 3) + getenv("LAVA_WAIT_LAVA_POST_PROCESSING_RETRIES", 6) ) # How many seconds to wait between log output LAVA RPC calls. @@ -81,6 +81,7 @@ NUMBER_OF_RETRIES_TIMEOUT_DETECTION = int( getenv("LAVA_NUMBER_OF_RETRIES_TIMEOUT_DETECTION", 2) ) + def raise_exception_from_metadata(metadata: dict, job_id: int) -> None: """ Investigate infrastructure errors from the job metadata. @@ -138,10 +139,11 @@ def show_final_job_data(job, colour=f"{CONSOLE_LOG['BOLD']}{CONSOLE_LOG['FG_GREE if not job.is_post_processed(): waited_for_sec: int = ( - WAIT_FOR_LAVA_POST_PROCESSING_RETRIES * WAIT_FOR_DEVICE_POLLING_TIME_SEC + WAIT_FOR_LAVA_POST_PROCESSING_RETRIES + * WAIT_FOR_LAVA_POST_PROCESSING_SEC ) print_log( - f"Waited for {waited_for_sec} seconds" + f"Waited for {waited_for_sec} seconds " "for LAVA to post-process the job, it haven't finished yet. " "Dumping it's info anyway" ) @@ -477,6 +479,7 @@ class LAVAJobSubmitter(PathResolver): if last_attempt_job.status != "pass": raise SystemExit(1) + class StructuredLoggerWrapper: def __init__(self, submitter: LAVAJobSubmitter) -> None: self.__submitter: LAVAJobSubmitter = submitter