SERVER-92766 add verbose and cache clean up to evergreen poetry install (#25265)

GitOrigin-RevId: 1ddad81ef013038ae61826c456ce79eb04cfc8f4
This commit is contained in:
Daniel Moody 2024-07-24 13:22:23 -05:00 committed by MongoDB Bot
parent 42b0964f0e
commit cdf9fc8542
1 changed files with 8 additions and 3 deletions

View File

@ -39,7 +39,7 @@ export POETRY_CONFIG_DIR="$poetry_dir/config"
export POETRY_DATA_DIR="$poetry_dir/data"
export POETRY_CACHE_DIR="$poetry_dir/cache"
for i in {1..5}; do
$POETRY_VENV_PYTHON -m pip install "poetry==1.5.1" ${EXTRA_IBM_ARGS} && RET=0 && break || RET=$? && sleep 1
$POETRY_VENV_PYTHON -m pip install -vvv "poetry==1.5.1" ${EXTRA_IBM_ARGS} && RET=0 && break || RET=$? && sleep 1
echo "Python failed to install poetry, retrying..."
done
@ -103,7 +103,7 @@ echo "Upgrading pip to 21.0.1"
# We have seen weird network errors that can sometimes mess up the pip install
# By retrying we would like to only see errors that happen consistently
for i in {1..5}; do
python -m pip --disable-pip-version-check install "pip==21.0.1" "wheel==0.37.0" && RET=0 && break || RET=$? && sleep 1
python -m pip --disable-pip-version-check install -vvv "pip==21.0.1" "wheel==0.37.0" && RET=0 && break || RET=$? && sleep 1
echo "Python failed to install pip and wheel, retrying..."
done
@ -117,9 +117,14 @@ cd src
# Loop 5 times to retry full venv install
# We have seen weird network errors that can sometimes mess up the pip install
# By retrying we would like to only see errors that happen consistently
count=0
for i in {1..5}; do
$POETRY_VENV_PYTHON -m poetry install --no-root --sync && RET=0 && break || RET=$? && sleep 1
$POETRY_VENV_PYTHON -m poetry cache clear . --all
rm -rf $poetry_dir/*
$POETRY_VENV_PYTHON -m poetry -vvv install --no-root --sync && RET=0 && break || RET=$? && sleep 1
echo "Python failed install required deps with poetry, retrying..."
sleep $((count * count * 20))
count=$((count + 1))
done
if [ $RET -ne 0 ]; then