Skip to content

Commit

Permalink
Guard pip install with flock
Browse files Browse the repository at this point in the history
The tests run multiple instances, each instance using a different
virtual environment.

The issue looks similar to this pypa/pip#2361

It seems there are still issues with concurrent pip runs.

Added flock to guard all pip executions.

Fixes hazelcast#22599
  • Loading branch information
frant-hartm committed Nov 15, 2022
1 parent d6d5a65 commit a02c9c0
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions extensions/python/src/main/resources/jet_to_python_init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,10 @@ set -e -x

python3 -m venv jet_to_python_env --system-site-packages
source jet_to_python_env/bin/activate
python3 -m pip install --upgrade pip
python3 -m pip install protobuf==@protobuf.version@ grpcio==@grpc.version@

flock --exclusive /tmp/jet-pip.lock python3 -m pip install --upgrade pip
flock --exclusive /tmp/jet-pip.lock python3 -m pip install protobuf==@protobuf.version@ grpcio==@grpc.version@

[[ -f requirements.txt ]] && python3 -m pip install -r requirements.txt
source ./jet_to_python_params.sh
if [[ -f init.sh ]]; then
Expand Down

0 comments on commit a02c9c0

Please sign in to comment.