From a6e487e367e12a0b183068fa7324fa78b1a8b60b Mon Sep 17 00:00:00 2001 From: Eric Engestrom Date: Thu, 1 Dec 2022 10:49:56 +0000 Subject: [PATCH] ci_run_n_monitor.py: automatically retry on transient errors This morning a GitLab update was deployed, leading to a few moments where the API returned an error. python-gitlab is actually able to handle a number of those and retry automatically, so let's enable that: https://python-gitlab.readthedocs.io/en/stable/api-usage-advanced.html#transient-errors Signed-off-by: Eric Engestrom Reviewed-by: David Heidelberg Part-of: --- bin/ci/ci_run_n_monitor.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bin/ci/ci_run_n_monitor.py b/bin/ci/ci_run_n_monitor.py index 3e497e6..915299e 100755 --- a/bin/ci/ci_run_n_monitor.py +++ b/bin/ci/ci_run_n_monitor.py @@ -276,7 +276,9 @@ if __name__ == "__main__": token = read_token(args.token) - gl = gitlab.Gitlab(url="https://gitlab.freedesktop.org", private_token=token) + gl = gitlab.Gitlab(url="https://gitlab.freedesktop.org", + private_token=token, + retry_transient_errors=True) cur_project = get_gitlab_project(gl, "mesa") -- 2.7.4