gitlab-ci: refactor timeout constants and tweak timeout values
authorGuilherme Gallo <guilherme.gallo@collabora.com>
Wed, 15 Sep 2021 14:03:16 +0000 (11:03 -0300)
committerMarge Bot <eric+marge@anholt.net>
Wed, 15 Sep 2021 15:12:52 +0000 (15:12 +0000)
commit7244aa19806cec5265e1e219cac1a99b0d3c62c6
treec45d28a43098bfc037cbc911cbab54a96219f89d
parent465519679654636e2e585c573226f00f1f631d3f
gitlab-ci: refactor timeout constants and tweak timeout values

* Refactor timeouts and retry attempts constants to variables in the top
  of the python script.

* Increase LAVA job timeout value from 1 minute to 5 minutes, since the
  timeout detection is just a heuristic based on the log silence in LAVA
  devices. If we keep 1 minute timeout, maybe we could cancel jobs that
  have tasks which may take too long to respond. Also, one minute
  timeout is prone to misdetect scenarios when some network errors or
  slowness may happen.

* Increase polling rate to check if the job has started from 1 check
  every 30 seconds to 1 check every 10 seconds. Since it was taking 30
  seconds in the worst case to start to get the log output from a LAVA
  job. It is important to note that some LAVA jobs take less than 2
  minutes to finish, so a 10 second wait would be more suitable in those
  cases.

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12870>
.gitlab-ci/lava/lava_job_submitter.py