Skip to content

Commit

Permalink
Retry on "Connection broken:" errors (#99)
Browse files Browse the repository at this point in the history
Co-authored-by: Ray Douglass <[email protected]>
  • Loading branch information
bdice and raydouglass authored Mar 7, 2024
1 parent 52408d2 commit a75d2b5
Showing 1 changed file with 13 additions and 9 deletions.
22 changes: 13 additions & 9 deletions tools/rapids-conda-retry
Original file line number Diff line number Diff line change
Expand Up @@ -77,28 +77,31 @@ function runConda {
# Show exit code
rapids-echo-stderr "conda returned exit code: ${exitcode}"

if grep -q CondaHTTPError: "${outfile}"; then
retryingMsg="Retrying, found 'CondaHTTPError:' in output..."
needToRetry=1
elif grep -q ChecksumMismatchError: "${outfile}"; then
if grep -q ChecksumMismatchError: "${outfile}"; then
retryingMsg="Retrying, found 'ChecksumMismatchError:' in output..."
needToRetry=1
elif grep -q JSONDecodeError: "${outfile}"; then
retryingMsg="Retrying, found 'JSONDecodeError:' in output..."
needToRetry=1
elif grep -q ChunkedEncodingError: "${outfile}"; then
retryingMsg="Retrying, found 'ChunkedEncodingError:' in output..."
needToRetry=1
elif grep -q CondaHTTPError: "${outfile}"; then
retryingMsg="Retrying, found 'CondaHTTPError:' in output..."
needToRetry=1
elif grep -q CondaMultiError: "${outfile}"; then
retryingMsg="Retrying after cleaning tarball cache, found 'CondaMultiError:' in output..."
needToRetry=1
needToClean=1
elif grep -q EOFError: "${outfile}"; then
retryingMsg="Retrying, found 'EOFError:' in output..."
elif grep -q "Connection broken:" "${outfile}"; then
retryingMsg="Retrying, found 'Connection broken:' in output..."
needToRetry=1
elif grep -q ConnectionError: "${outfile}"; then
retryingMsg="Retrying, found 'ConnectionError:' in output..."
needToRetry=1
elif grep -q EOFError: "${outfile}"; then
retryingMsg="Retrying, found 'EOFError:' in output..."
needToRetry=1
elif grep -q JSONDecodeError: "${outfile}"; then
retryingMsg="Retrying, found 'JSONDecodeError:' in output..."
needToRetry=1
elif grep -q "Multi-download failed" "${outfile}"; then
retryingMsg="Retrying, found 'Multi-download failed' in output..."
needToRetry=1
Expand All @@ -115,6 +118,7 @@ function runConda {
'ChunkedEncodingError:', \
'CondaHTTPError:', \
'CondaMultiError:', \
'Connection broken:', \
'ConnectionError:', \
'EOFError:', \
'JSONDecodeError:', \
Expand Down

0 comments on commit a75d2b5

Please sign in to comment.