[Git][ghc/ghc][master] ci: retry fetching test metrics
Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC Commits: b7e24044 by mangoiv at 2026-07-04T04:14:56-04:00 ci: retry fetching test metrics Retry fetching test metrics to make the CI not fail if the services is temporarily unavailable - - - - - 1 changed file: - .gitlab/test-metrics.sh Changes: ===================================== .gitlab/test-metrics.sh ===================================== @@ -7,7 +7,7 @@ REF="perf" run() { echo "$@" - $@ + "$@" } fail() { @@ -15,6 +15,24 @@ fail() { exit 1 } +run_retrying() { + local max_wait=300 + local delay=1 + local cmd="$*" + echo "running '$cmd' retrying" + + until eval "run $cmd"; do + if (( delay >= max_wait )); then + fail "'$cmd' finally failed after $delay surpassed $max_wait seconds wait time" + fi + + echo "'$cmd' failed - retrying in ${delay} seconds" >&2 + sleep "$delay" + + delay=$(( delay * 2 )) + done +} + function pull() { local ref="refs/notes/$REF" @@ -24,7 +42,7 @@ function pull() { git remote add perf-notes "$NOTES_ORIGIN" || true git config fetch.recurseSubmodules false git config remote.perf-notes.partialclonefilter tree:0 - run git fetch --force perf-notes "$ref:$ref" + run_retrying git fetch --force perf-notes "$ref:$ref" echo "perf notes ref $ref is $(git rev-parse $ref)" } View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/b7e24044fde064cb3f0d44c36872a86d... -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/b7e24044fde064cb3f0d44c36872a86d... You're receiving this email because of your account on gitlab.haskell.org.
participants (1)
-
Marge Bot (@marge-bot)