From a75d2b5dd1b01129490b478e38f18eb6e35170ac Mon Sep 17 00:00:00 2001 From: Bradley Dice Date: Thu, 7 Mar 2024 09:37:19 -0600 Subject: [PATCH] Retry on "Connection broken:" errors (#99) Co-authored-by: Ray Douglass <3107146+raydouglass@users.noreply.github.com> --- tools/rapids-conda-retry | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/tools/rapids-conda-retry b/tools/rapids-conda-retry index df7ec04..a2b818f 100755 --- a/tools/rapids-conda-retry +++ b/tools/rapids-conda-retry @@ -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 @@ -115,6 +118,7 @@ function runConda { 'ChunkedEncodingError:', \ 'CondaHTTPError:', \ 'CondaMultiError:', \ +'Connection broken:', \ 'ConnectionError:', \ 'EOFError:', \ 'JSONDecodeError:', \