Simon Jakobi pushed to branch wip/sjakobi/ci-cabal-update-retry at Glasgow Haskell Compiler / GHC Commits: c2de416d by Simon Jakobi at 2026-11-23T03:04:47+01:00 ci: Retry cabal update on failure Make up to three attempts, waiting 60 and then 120 seconds in between. From 2026-11-06 to 2026-11-19 a failed update killed 15 jobs in 9 Marge batches. The outages looked short: in the three cases I checked, other jobs of the same pipeline updated successfully within about two minutes. Assisted-by: Claude Fable 5.2 - - - - - e1bef58f by Simon Jakobi at 2026-11-23T03:07:56+01:00 ci: Use the cached Hackage index when cabal update fails If `cabal update` still fails after the retries, carry on with the package index from the cabal cache. That index is usually recent enough, because the index-state is pinned. If it is not, cabal will fail with Cabal-7159. Assisted-by: Claude Fable 5.2 - - - - - 1 changed file: - .gitlab/ci.sh Changes: ===================================== .gitlab/ci.sh ===================================== @@ -236,12 +236,25 @@ function set_toolchain_paths() { fi } -function cabal_update() { +function cabal_update_once() { # In principle -w shouldn't be necessary here but with # cabal-install 3.8.1.0 it is, due to cabal#8447. run "$CABAL" update -w "$GHC" "hackage.haskell.org,${HACKAGE_INDEX_STATE}" } +function cabal_update() { + local delay + for delay in 60 120; do + cabal_update_once && return + info "Retrying cabal update in $delay seconds" + sleep "$delay" + done + cabal_update_once && return + + [ -f "$CABAL_DIR/packages/hackage.haskell.org/01-index.tar" ] || return 1 + warn "cabal update failed, continuing with the existing package index" +} + # Extract GHC toolchain function setup() { View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/43c92eb051ba1f62e291e1167449aaf... -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/43c92eb051ba1f62e291e1167449aaf... You're receiving this email because of your account on gitlab.haskell.org. Manage all notifications: https://gitlab.haskell.org/-/profile/notifications | Help: https://gitlab.haskell.org/help