Skip to content

Commit 90292c6

Browse files
committed
Retry GitHub job watch
From time to time the job watch throws a 502 error: ``` failed to get jobs: HTTP 502: Server Error (https://api.github.com/repos/cri-o/packaging/actions/runs/8682352551/jobs?per_page=100) ``` We now retry up to three times to make the test suite robust. As follow-up, I opened: cli/go-gh#157 Signed-off-by: Sascha Grunert <sgrunert@redhat.com>
1 parent 0f7299e commit 90292c6

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

scripts/github-job-wait

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
#!/usr/bin/env bash
22
set -euox pipefail
33

4+
source "$(dirname "${BASH_SOURCE[0]}")"/helpers
5+
46
COMMIT=${COMMIT:-}
57
if [[ "$COMMIT" == "" ]]; then
68
echo "No commit provided"
@@ -16,6 +18,6 @@ for ID in $(gh run list -s in_progress -w obs --json databaseId -q '.[] | .datab
1618

1719
if [[ "$RUNNING_COMMIT" == "$COMMIT" ]]; then
1820
echo "Job for commit '$COMMIT' is already running, waiting for it to complete"
19-
gh run watch "$ID"
21+
retry_3 gh run watch "$ID"
2022
fi
2123
done

0 commit comments

Comments
 (0)