[Buildroot] [RFC] support/misc/gitlab-ci.yml.in: retry a job only if it failed due to a runner issue

Thomas Petazzoni thomas.petazzoni at bootlin.com
Sun Aug 27 08:11:28 UTC 2023


On Sat, 26 Aug 2023 23:00:11 +0200
Romain Naour <romain.naour at gmail.com> wrote:

> Each time a new pipeline is trigged, some jobs may fail due to temporary
> issue with a Gitlab runner (network, power supply, docker or maintainance).
> 
> Most of the problems are "runner system failure" [1] and requires to retart
> each failed jobs manually by maintainers to complete the pipeline with only
> real failure if any.
> 
> The "retry" keyword allows to configure how many time a job is retried if
> it fails. "retry:when" allows to retry a failed job only on specific
> failure types like "runner_system_failure".
> 
> While at it, retry a job if it failed due to a timeout failure (this
> timeout means that the job was pending for more than 24h) [2].
> 
> Such timeout failure occurs on pipeline testing each Buildroot's defconfig
> since there is not enough gitlab runner avaible to build all of them
> within 24h.
> 
> Retry only jobs that are more likely to wait for a runner
> (generate-gitlab-ci-yml, runtime_test_base, defconfig_base and test_pkg).
> 
> [1] https://gitlab.com/buildroot.org/buildroot/-/jobs/4936949397 (runner system failure)
> [2] https://gitlab.com/buildroot.org/buildroot/-/jobs/4936949530 (timeout failure or the job got stuck)
> 
> https://docs.gitlab.com/ee/ci/yaml/#retrywhen
> 
> Signed-off-by: Romain Naour <romain.naour at gmail.com>
> Cc: Arnout Vandecappelle <arnout at mind.be>
> ---
>  .gitlab-ci.yml                |  5 +++++
>  support/misc/gitlab-ci.yml.in | 15 +++++++++++++++
>  2 files changed, 20 insertions(+)

Excellent! I hope this will improve the reliability of Gitlab results.
I've applied to master, after fixing some minor typos in the commit
log. Thanks a lot!

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com



More information about the buildroot mailing list