You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by lh...@apache.org on 2021/10/01 08:37:32 UTC

[pulsar] branch master updated: [testing] Make python3 the default python in java-test-image (#12130)

This is an automated email from the ASF dual-hosted git repository.

lhotari pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pulsar.git


The following commit(s) were added to refs/heads/master by this push:
     new 4ac228d  [testing] Make python3 the default python in java-test-image (#12130)
4ac228d is described below

commit 4ac228d6768a352ee3fc9e46ef1210d06c8685fc
Author: Lari Hotari <lh...@users.noreply.github.com>
AuthorDate: Fri Oct 1 11:36:44 2021 +0300

    [testing] Make python3 the default python in java-test-image (#12130)
    
    - python3 should be default for the image to work
    - this has been broken since the base image was changed to ubuntu:20.04
---
 tests/docker-images/java-test-image/Dockerfile | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)

diff --git a/tests/docker-images/java-test-image/Dockerfile b/tests/docker-images/java-test-image/Dockerfile
index 2d5e75f..91c8448 100644
--- a/tests/docker-images/java-test-image/Dockerfile
+++ b/tests/docker-images/java-test-image/Dockerfile
@@ -43,16 +43,13 @@ RUN echo networkaddress.cache.ttl=1 >> /usr/lib/jvm/java-11-openjdk-amd64/conf/s
 
 # /pulsar/bin/watch-znode.py requires python3-kazoo
 # /pulsar/bin/pulsar-managed-ledger-admin requires python3-protobuf
-RUN apt-get install -y python3-kazoo python3-protobuf
-# use python3 for watch-znode.py and pulsar-managed-ledger-admin
-RUN sed -i '1 s/.*/#!\/usr\/bin\/python3/' /pulsar/bin/watch-znode.py /pulsar/bin/pulsar-managed-ledger-admin
-
-# required by gen-yml-from-env.py
-RUN apt-get install -y python-yaml
+# gen-yml-from-env.py requires python3-yaml
+# make python3 the default
+RUN apt-get install -y python3-kazoo python3-protobuf python3-yaml \
+    && update-alternatives --install /usr/bin/python python /usr/bin/python3 10
 
 RUN apt-get install -y supervisor procps curl less netcat dnsutils iputils-ping
 
-
 RUN mkdir -p /var/log/pulsar \
     && mkdir -p /var/run/supervisor/ \
     && mkdir -p /pulsar/ssl