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 <eric@engestrom.ch>
Reviewed-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20094>
This commit is contained in:
Eric Engestrom 2022-12-01 10:49:56 +00:00 committed by Marge Bot
parent 617e7596d1
commit a6e487e367
1 changed files with 3 additions and 1 deletions

View File

@ -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")