Skip to content

Commit

Permalink
Revert "[PLAT-15112] Handle incomplete pexvenv generation"
Browse files Browse the repository at this point in the history
Summary: This reverts commit dd860cd.

Test Plan: build break

Reviewers: nsingh

Reviewed By: nsingh

Subscribers: yugaware

Differential Revision: https://phorge.dev.yugabyte.com/D38682
  • Loading branch information
mchiddy committed Oct 3, 2024
1 parent 46f9717 commit 603d4ab
Showing 1 changed file with 1 addition and 13 deletions.
14 changes: 1 addition & 13 deletions managed/devops/bin/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -589,20 +589,9 @@ activate_pex() {
log "detected python version mismatch between pex venv and ${PYTHON_EXECUTABLE}. Deleting pex venv to regenerate"
rm -rf "$pex_venv_dir"
fi
if [[ ! -e $pex_marker && -d $PEX_PATH ]]; then
rm -rf "$pex_venv_dir"
if [[ ! -d $pex_venv_dir && -d $PEX_PATH ]]; then
deactivate_virtualenv
export PEX_VERBOSE=3
PEX_TOOLS=1 $PYTHON_EXECUTABLE $PEX_PATH venv $pex_venv_dir
unset PEX_VERBOSE
fi
$VENV_PY -c "import ybops"
if [[ $? -eq 0 ]]; then
touch $pex_marker
else
log "Error importing ybops in pex environment, pexvenv may need to be regenerated"
rm -rf "$pex_venv_dir"
exit 1
fi
) 9>>"$pex_lock"
set +e
Expand Down Expand Up @@ -642,5 +631,4 @@ log_dir=$HOME/logs

readonly virtualenv_dir=$yb_devops_home/$YB_VIRTUALENV_BASENAME
readonly pex_venv_dir=$yb_devops_home/$YB_PEXVENV_BASENAME
readonly pex_marker="$pex_venv_dir/.pex_valid"
readonly pex_lock="/tmp/pexlock"

0 comments on commit 603d4ab

Please sign in to comment.