Skip to content

Commit

Permalink
Retry release signature checks (#11771)
Browse files Browse the repository at this point in the history
changelog_begin
changelog_end
  • Loading branch information
cocreature authored Nov 18, 2021
1 parent 8f458d8 commit a3556a5
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions ci/cron/src/Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,7 @@ check_releases gcp_credentials bash_lib max_releases = do
let releases = case max_releases of
Nothing -> releases'
Just n -> take n releases'
Data.Foldable.for_ releases (\release -> do
Data.Foldable.for_ releases (\release -> recoverAll retryPolicy $ \_ -> do
let v = show $ tag release
putStrLn $ "Checking release " <> v <> " ..."
IO.withTempDir $ \temp_dir -> do
Expand All @@ -425,9 +425,12 @@ check_releases gcp_credentials bash_lib max_releases = do
gcs_cp gcred bash_lib remote_gcp local_gcp
check_files_match local_github local_gcp >>= \case
True -> putStrLn $ f <> " matches GCS backup."
False -> Exit.die $ f <> " does not match GCS backup."
False -> fail $ f <> " does not match GCS backup."
else do
Exit.die $ remote_gcp <> " does not exist. Aborting.")
fail $ remote_gcp <> " does not exist. Aborting.")
where
-- Retry for 10 minutes total, delay of 1s
retryPolicy = limitRetriesByCumulativeDelay (10 * 60 * 1000 * 1000) (constantDelay 1000_000)

data CliArgs = Docs
| Check { bash_lib :: String,
Expand Down

0 comments on commit a3556a5

Please sign in to comment.