Skip to content

Commit 0cd491e

Browse files
Upgrade protobuf to 6.31.1 in python runner image (#814)
* Use latest protobuf in python image * Use protobuf==6.31.1 in python image * Check proto file
1 parent 78e3688 commit 0cd491e

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

images/pulsar-functions-python-runner/Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,5 +44,8 @@ RUN rm -rf /pulsar/instances/python-instance/pulsar/ \
4444
USER $USER
4545
# a temp solution from https://github.com/apache/pulsar/pull/15846 to fix python protobuf version error
4646
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
4750
# to make the python runner could print json logs
4851
RUN pip3 install python-json-logger --user

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,5 +66,8 @@ WORKDIR /pulsar
6666
USER $USER
6767
# a temp solution from https://github.com/apache/pulsar/pull/15846 to fix python protobuf version error
6868
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
6972
# to make the python runner could print json logs
7073
RUN pip3 install python-json-logger --user

0 commit comments

Comments
 (0)