Skip to content

Commit

Permalink
Retry GitHub job watch
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
saschagrunert committed Apr 15, 2024
1 parent 0f7299e commit 90292c6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion scripts/github-job-wait
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#!/usr/bin/env bash
set -euox pipefail

source "$(dirname "${BASH_SOURCE[0]}")"/helpers

COMMIT=${COMMIT:-}
if [[ "$COMMIT" == "" ]]; then
echo "No commit provided"
Expand All @@ -16,6 +18,6 @@ for ID in $(gh run list -s in_progress -w obs --json databaseId -q '.[] | .datab

if [[ "$RUNNING_COMMIT" == "$COMMIT" ]]; then
echo "Job for commit '$COMMIT' is already running, waiting for it to complete"
gh run watch "$ID"
retry_3 gh run watch "$ID"
fi
done

0 comments on commit 90292c6

Please sign in to comment.