Skip to content

Commit

Permalink
Make EVG outputs quieter (#343)
Browse files Browse the repository at this point in the history
Co-authored-by: Ezra Chung <88335979+eramongodb@users.noreply.github.com>
  • Loading branch information
blink1073 and eramongodb authored Aug 30, 2023
1 parent da3c426 commit 780afa5
Show file tree
Hide file tree
Showing 9 changed files with 53 additions and 79 deletions.
24 changes: 8 additions & 16 deletions .evergreen/auth_aws/activate-authawsvenv.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,33 +33,25 @@ activate_authawsvenv() {
# shellcheck source=.evergreen/find-python3.sh
. ../find-python3.sh || return

venvcreate "$(find_python3)" authawsvenv || return
echo "Finding Python3 binary..."
PYTHON="$(find_python3 2>/dev/null)" || return
echo "Finding Python3 binary... done."

echo "Creating virtual environment 'authawsvenv'..."
venvcreate "${PYTHON:?}" authawsvenv || return

local packages=(
"boto3~=1.26.0"
"pyop~=3.4.0"
"pymongo[aws]~=4.0"
)

if [[ "$OSTYPE" == cygwin && "$HOSTTYPE" == x86_64 ]]; then
local -r windows_os_name="$(systeminfo.exe /FO LIST | perl -lne 'print $1 if m/^OS Name:\s+(.*)$/' || true)"

if [[ "$windows_os_name" =~ 2016 ]]; then
# Avoid `RuntimeError: Could not determine home directory.` on
# windows-64-2016. See BUILD-16233.
python -m pip install -U "setuptools<65.0" || {
local -r ret="$?"
deactivate || return 1 # Deactivation should never fail!
return "$ret"
}
fi
fi

python -m pip install -U "${packages[@]}" || {
python -m pip install -q -U "${packages[@]}" || {
local -r ret="$?"
deactivate || return 1 # Deactivation should never fail!
return "$ret"
}
echo "Creating virtual environment 'authawsvenv'... done."
fi
}

Expand Down
26 changes: 8 additions & 18 deletions .evergreen/auth_oidc/activate-authoidcvenv.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,35 +33,25 @@ activate_authoidcvenv() {
# shellcheck source=.evergreen/find-python3.sh
. ../find-python3.sh || return

venvcreate "$(find_python3)" authoidcvenv || return
echo "Finding Python3 binary..."
PYTHON="$(find_python3 2>/dev/null)" || return
echo "Finding Python3 binary... done."

echo "Creating virtual environment 'authoidcvenv'..."
venvcreate "${PYTHON:?}" authoidcvenv || return

local packages=(
"boto3~=1.19.0"
"pyop~=3.4.0"
"azure-identity"
"azure-keyvault-secrets"
)

if [[ "$OSTYPE" == cygwin && "$HOSTTYPE" == x86_64 ]]; then
local -r windows_os_name="$(systeminfo.exe /FO LIST | perl -lne 'print $1 if m/^OS Name:\s+(.*)$/' || true)"

if [[ "$windows_os_name" =~ 2016 ]]; then
# Avoid `RuntimeError: Could not determine home directory.` on
# windows-64-2016. See BUILD-16233.
python -m pip install -U "setuptools<65.0" || {
local -r ret="$?"
deactivate || return 1 # Deactivation should never fail!
return "$ret"
}
fi
fi

python -m pip install -U pip setuptools
python -m pip install -U "${packages[@]}" || {
python -m pip install -q -U "${packages[@]}" || {
local -r ret="$?"
deactivate || return 1 # Deactivation should never fail!
return "$ret"
}
echo "Creating virtual environment 'authoidcvenv'... done."
fi
}

Expand Down
4 changes: 2 additions & 2 deletions .evergreen/auth_oidc/azure/run-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ git clone https://github.com/mongodb/mongo-python-driver
pushd mongo-python-driver
python setup.py install --no_ext
popd
pip install requests
pip install -q requests
python azure/test.py
popd
popd
26 changes: 9 additions & 17 deletions .evergreen/csfle/activate-kmstlsvenv.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,12 @@ activate_kmstlsvenv() {
# shellcheck source=.evergreen/find-python3.sh
. ../find-python3.sh || return

venvcreate "$(find_python3)" kmstlsvenv || return
echo "Finding Python3 binary..."
PYTHON="$(find_python3 2>/dev/null)" || return
echo "Finding Python3 binary... done."

echo "Creating virtual environment 'kmstlsvenv'..."
venvcreate "${PYTHON:?}" kmstlsvenv || return

local packages=(
"boto3~=1.19.0"
Expand All @@ -47,21 +52,7 @@ activate_kmstlsvenv() {
packages+=("greenlet<2.0")
fi

if [[ "$OSTYPE" == cygwin && "$HOSTTYPE" == x86_64 ]]; then
local -r windows_os_name="$(systeminfo.exe /FO LIST | perl -lne 'print $1 if m/^OS Name:\s+(.*)$/' || true)"

if [[ "$windows_os_name" =~ 2016 ]]; then
# Avoid `RuntimeError: Could not determine home directory.` on
# windows-64-2016. See BUILD-16233.
python -m pip install -U "setuptools<65.0" || {
local -r ret="$?"
deactivate || return 1 # Deactivation should never fail!
return "$ret"
}
fi
fi

if ! python -m pip install -U "${packages[@]}"; then
if ! python -m pip install -q -U "${packages[@]}"; then
# Avoid `error: can't find Rust compiler`.
# Assume install failure at this point is due to new versions of
# cryptography require a Rust toolchain when a cryptography wheel is not
Expand All @@ -73,12 +64,13 @@ activate_kmstlsvenv() {
# - Ubuntu 18.04 on powerpc64le or s390x
packages+=("cryptography<3.4")

python -m pip install -U "${packages[@]}" || {
python -m pip install -q -U "${packages[@]}" || {
local -r ret="$?"
deactivate || return 1 # Deactivation should never fail!
return "$ret"
}
fi
echo "Creating virtual environment 'kmstlsvenv'... done."
fi
}

Expand Down
26 changes: 9 additions & 17 deletions .evergreen/ocsp/activate-ocspvenv.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,27 +33,19 @@ activate_ocspvenv() {
# shellcheck source=.evergreen/find-python3.sh
. ../find-python3.sh || return

venvcreate "$(find_python3)" ocspvenv || return

if [[ "$OSTYPE" == cygwin && "$HOSTTYPE" == x86_64 ]]; then
local -r windows_os_name="$(systeminfo.exe /FO LIST | perl -lne 'print $1 if m/^OS Name:\s+(.*)$/' || true)"

if [[ "$windows_os_name" =~ 2016 ]]; then
# Avoid `RuntimeError: Could not determine home directory.` on
# windows-64-2016. See BUILD-16233.
python -m pip install -U "setuptools<65.0" || {
local -r ret="$?"
deactivate || return 1 # Deactivation should never fail!
return "$ret"
}
fi
fi

python -m pip install -r mock-ocsp-responder-requirements.txt || {
echo "Finding Python3 binary..."
PYTHON="$(find_python3 2>/dev/null)" || return
echo "Finding Python3 binary... done."

echo "Creating virtual environment 'ocspvenv'..."
venvcreate "${PYTHON:?}" ocspvenv || return

python -m pip install -q -r mock-ocsp-responder-requirements.txt || {
local -r ret="$?"
deactivate || return 1 # Deactivation should never fail!
return "$ret"
}
echo "Creating virtual environment 'ocspvenv'... done."
fi
}

Expand Down
8 changes: 5 additions & 3 deletions .evergreen/run-load-balancer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,11 @@ EOF_HAPROXY_CONFIG
}

stop() {
echo "Stopping HAProxy..."
kill -USR1 $(cat $DRIVERS_TOOLS/haproxy.pid)
rm $DRIVERS_TOOLS/haproxy.conf $DRIVERS_TOOLS/haproxy.pid
if [[ -f "$DRIVERS_TOOLS/haproxy.pid" ]]; then
echo "Stopping HAProxy..."
kill -USR1 $(cat $DRIVERS_TOOLS/haproxy.pid)
rm $DRIVERS_TOOLS/haproxy.conf $DRIVERS_TOOLS/haproxy.pid
fi
}

case "$1" in
Expand Down
4 changes: 3 additions & 1 deletion .evergreen/serverless/create-instance.sh
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,9 @@ DIR=$(dirname $0)

# Ensure that a Python binary is available for JSON decoding
. $DIR/../find-python3.sh || exit 1
PYTHON_BINARY="$(find_python3)" || exit 1
echo "Finding Python3 binary..."
PYTHON_BINARY="$(find_python3 2>/dev/null)" || exit 1
echo "Finding Python3 binary... done."

echo "Creating new serverless instance \"$SERVERLESS_INSTANCE_NAME\"..."

Expand Down
10 changes: 7 additions & 3 deletions .evergreen/start-orchestration.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,16 @@ det_evergreen_dir="$(dirname "${BASH_SOURCE[0]}")"

cd "$MONGO_ORCHESTRATION_HOME"

PYTHON="$(find_python3)"
echo "Finding Python3 binary..."
PYTHON="$(find_python3 2>/dev/null)" || return
echo "Finding Python3 binary... done."

venvcreate "$PYTHON" venv
echo "Creating virtual environment 'venv'..."
venvcreate "${PYTHON:?}" venv
echo "Creating virtual environment 'venv'... done."

# Install from github to get the latest mongo-orchestration.
python -m pip install --upgrade 'https://github.com/mongodb/mongo-orchestration/archive/master.tar.gz'
python -m pip install -q --upgrade 'https://github.com/mongodb/mongo-orchestration/archive/master.tar.gz'
python -m pip list
cd -

Expand Down
4 changes: 2 additions & 2 deletions .evergreen/venv-utils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ venvcreate() {

venvactivate "$venv_path" || continue

if ! python -m pip install -U pip; then
if ! python -m pip install -q -U pip; then
deactivate || return 1 # Deactivation should never fail!
continue
fi
Expand All @@ -90,7 +90,7 @@ venvcreate() {
# These packages must be upgraded *after* pip, *separately*, as some old
# versions of pip do not handle their simultaneous installation properly.
# See: https://github.com/pypa/pip/issues/4253
if ! python -m pip install -U setuptools wheel; then
if ! python -m pip install -q -U setuptools wheel; then
deactivate || return 1 # Deactivation should never fail!
continue
fi
Expand Down

0 comments on commit 780afa5

Please sign in to comment.