Bump Maven timeouts and retries (#8578)

* Bump Maven timeouts and retries

Chosen fairly arbitrarily, I don’t have a good idea what sensible
values are but given that we keep running into issues the current ones
are apparently too low.

changelog_begin
changelog_end

* sync up comment with code

changelog_begin
changelog_end

* s/f/0/

changelog_begin
changelog_end
This commit is contained in:
Moritz Kiefer 2021-01-20 15:44:28 +01:00 committed by GitHub
parent c1a736efd1
commit a66a3177dd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -62,8 +62,8 @@ uploadToMavenCentral MavenUploadConfig{..} releaseDir artifacts = do
-- Note: TLS verification settings switchable by MavenUpload settings -- Note: TLS verification settings switchable by MavenUpload settings
let managerSettings = if getAllowUnsecureTls mucAllowUnsecureTls then noVerifyTlsManagerSettings else tlsManagerSettings let managerSettings = if getAllowUnsecureTls mucAllowUnsecureTls then noVerifyTlsManagerSettings else tlsManagerSettings
-- Create HTTP Connection manager with 2min response timeout as the OSSRH can be slow... -- Create HTTP Connection manager with 5min response timeout as the OSSRH can be slow...
manager <- liftIO $ newManager managerSettings { managerResponseTimeout = responseTimeoutMicro (120 * 1000 * 1000) } manager <- liftIO $ newManager managerSettings { managerResponseTimeout = responseTimeoutMicro (5 * 60 * 1000 * 1000) }
parsedUrlRequest <- parseUrlThrow $ T.unpack mucUrl -- Note: Will throw exception on non-2XX responses parsedUrlRequest <- parseUrlThrow $ T.unpack mucUrl -- Note: Will throw exception on non-2XX responses
let baseRequest = setRequestMethod "PUT" $ setRequestBasicAuth (encodeUtf8 mucUser) (encodeUtf8 mucPassword) parsedUrlRequest let baseRequest = setRequestMethod "PUT" $ setRequestBasicAuth (encodeUtf8 mucUser) (encodeUtf8 mucPassword) parsedUrlRequest
@ -371,8 +371,9 @@ logStatusRetry shouldRetry _ status =
else else
$logDebug ("Aborting staging repository check after " <> (tshow $ rsCumulativeDelay status) <> "µs.") $logDebug ("Aborting staging repository check after " <> (tshow $ rsCumulativeDelay status) <> "µs.")
-- Retry for 5 minutes total, doubling delay starting with 20ms.
uploadRetryPolicy :: RetryPolicy uploadRetryPolicy :: RetryPolicy
uploadRetryPolicy = limitRetriesByCumulativeDelay (60 * 1000 * 1000) (exponentialBackoff (200 * 100)) uploadRetryPolicy = limitRetriesByCumulativeDelay (5 * 60 * 1000 * 1000) (exponentialBackoff (20 * 1000))
-- The status of the staging repository can take a number of minutes to change it's -- The status of the staging repository can take a number of minutes to change it's
-- status to closed. -- status to closed.