Skip to content

Commit

Permalink
Guard pip install with flock [HZ-1756] [5.2.z]
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

Backport of hazelcast#22829
  • Loading branch information
frant-hartm committed Nov 24, 2022
1 parent 547fb25 commit 9f0be12
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 ~/.jet-pip.lock python3 -m pip install --upgrade pip
flock --exclusive ~/.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 9f0be12

Please sign in to comment.