Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC
Commits:
-
b7e24044
by mangoiv at 2026-07-04T04:14:56-04:00
1 changed file:
Changes:
| ... | ... | @@ -7,7 +7,7 @@ REF="perf" |
| 7 | 7 | |
| 8 | 8 | run() {
|
| 9 | 9 | echo "$@"
|
| 10 | - $@
|
|
| 10 | + "$@"
|
|
| 11 | 11 | }
|
| 12 | 12 | |
| 13 | 13 | fail() {
|
| ... | ... | @@ -15,6 +15,24 @@ fail() { |
| 15 | 15 | exit 1
|
| 16 | 16 | }
|
| 17 | 17 | |
| 18 | +run_retrying() {
|
|
| 19 | + local max_wait=300
|
|
| 20 | + local delay=1
|
|
| 21 | + local cmd="$*"
|
|
| 22 | + echo "running '$cmd' retrying"
|
|
| 23 | + |
|
| 24 | + until eval "run $cmd"; do
|
|
| 25 | + if (( delay >= max_wait )); then
|
|
| 26 | + fail "'$cmd' finally failed after $delay surpassed $max_wait seconds wait time"
|
|
| 27 | + fi
|
|
| 28 | + |
|
| 29 | + echo "'$cmd' failed - retrying in ${delay} seconds" >&2
|
|
| 30 | + sleep "$delay"
|
|
| 31 | + |
|
| 32 | + delay=$(( delay * 2 ))
|
|
| 33 | + done
|
|
| 34 | +}
|
|
| 35 | + |
|
| 18 | 36 | function pull() {
|
| 19 | 37 | local ref="refs/notes/$REF"
|
| 20 | 38 | |
| ... | ... | @@ -24,7 +42,7 @@ function pull() { |
| 24 | 42 | git remote add perf-notes "$NOTES_ORIGIN" || true
|
| 25 | 43 | git config fetch.recurseSubmodules false
|
| 26 | 44 | git config remote.perf-notes.partialclonefilter tree:0
|
| 27 | - run git fetch --force perf-notes "$ref:$ref"
|
|
| 45 | + run_retrying git fetch --force perf-notes "$ref:$ref"
|
|
| 28 | 46 | echo "perf notes ref $ref is $(git rev-parse $ref)"
|
| 29 | 47 | }
|
| 30 | 48 |