From aa062513c06b70f88c4ce0fab3bc828155d5396f Mon Sep 17 00:00:00 2001 From: Niels de Vos Date: Tue, 13 Oct 2020 10:34:29 +0200 Subject: [PATCH] ci: report connections failures with GitHub API On occasion the scripts that use the GitHub API fail without logging any useful error: ./scripts/get_github_labels.py --id=1568 --has-label=ci/skip/e2e Traceback (most recent call last): File "./scripts/get_github_labels.py", line 71, in main() File "./scripts/get_github_labels.py", line 55, in main names = get_names(json) File "./scripts/get_github_labels.py", line 40, in get_names names.append(label['name']) TypeError: string indices must be integers While debugging, it seems that the limit of API calls is reached: 403 Client Error: rate limit exceeded It is useful to have failure messages reported in the output of the CI jobs for future potential troubleshooting. Signed-off-by: Niels de Vos --- scripts/get_github_labels.py | 22 ++++++++++++++++++---- scripts/get_patch_release.py | 11 ++++++++++- 2 files changed, 28 insertions(+), 5 deletions(-) diff --git a/scripts/get_github_labels.py b/scripts/get_github_labels.py index 469a39429..0a1dfb0d2 100755 --- a/scripts/get_github_labels.py +++ b/scripts/get_github_labels.py @@ -4,9 +4,14 @@ Fetches the labels of an Issue or Pull-Request from GitHub. Parameters: --id=: the number of the the GitHub Issue or Pull-Request - --has-label=