Skip to content

Commit 4760209

Browse files
Check proto file
1 parent e64d201 commit 4760209

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

images/pulsar-functions-python-runner/Dockerfile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,10 @@ RUN rm -rf /pulsar/instances/python-instance/pulsar/ \
4242

4343

4444
USER $USER
45-
RUN pip3 install protobuf==6.31.1 --user
45+
# a temp solution from https://github.com/apache/pulsar/pull/15846 to fix python protobuf version error
46+
RUN pip3 install protobuf==3.20.2 --user
47+
# a temporary fix for https://github.com/apache/pulsar/pull/24544, it requires the protobuf version to be 6.31.1
48+
RUN grep -q 'from google.protobuf import runtime_version as _runtime_version' /pulsar/instances/python-instance/Function_pb2.py && \
49+
pip install protobuf==6.31.1 || true
4650
# to make the python runner could print json logs
4751
RUN pip3 install python-json-logger --user

images/pulsar-functions-python-runner/pulsarctl.Dockerfile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,10 @@ RUN rm -rf /pulsar/instances/python-instance/pulsar/ \
6464
WORKDIR /pulsar
6565

6666
USER $USER
67-
RUN pip3 install protobuf==6.31.1 --user
67+
# a temp solution from https://github.com/apache/pulsar/pull/15846 to fix python protobuf version error
68+
RUN pip3 install protobuf==3.20.2 --user
69+
# a temporary fix for https://github.com/apache/pulsar/pull/24544, it requires the protobuf version to be 6.31.1
70+
RUN grep -q 'from google.protobuf import runtime_version as _runtime_version' /pulsar/instances/python-instance/Function_pb2.py && \
71+
pip install protobuf==6.31.1 || true
6872
# to make the python runner could print json logs
6973
RUN pip3 install python-json-logger --user

0 commit comments

Comments
 (0)