diff --git a/images/pulsar-functions-python-runner/Dockerfile b/images/pulsar-functions-python-runner/Dockerfile index 79780a0d4..9f9c8367a 100644 --- a/images/pulsar-functions-python-runner/Dockerfile +++ b/images/pulsar-functions-python-runner/Dockerfile @@ -44,5 +44,8 @@ RUN rm -rf /pulsar/instances/python-instance/pulsar/ \ USER $USER # a temp solution from https://github.com/apache/pulsar/pull/15846 to fix python protobuf version error RUN pip3 install protobuf==3.20.2 --user +# a temporary fix for https://github.com/apache/pulsar/pull/24544, it requires the protobuf version to be 6.31.1 +RUN grep -q 'from google.protobuf import runtime_version as _runtime_version' /pulsar/instances/python-instance/Function_pb2.py && \ + pip install protobuf==6.31.1 || true # to make the python runner could print json logs RUN pip3 install python-json-logger --user diff --git a/images/pulsar-functions-python-runner/pulsarctl.Dockerfile b/images/pulsar-functions-python-runner/pulsarctl.Dockerfile index 182b2a299..f63170e6c 100644 --- a/images/pulsar-functions-python-runner/pulsarctl.Dockerfile +++ b/images/pulsar-functions-python-runner/pulsarctl.Dockerfile @@ -66,5 +66,8 @@ WORKDIR /pulsar USER $USER # a temp solution from https://github.com/apache/pulsar/pull/15846 to fix python protobuf version error RUN pip3 install protobuf==3.20.2 --user +# a temporary fix for https://github.com/apache/pulsar/pull/24544, it requires the protobuf version to be 6.31.1 +RUN grep -q 'from google.protobuf import runtime_version as _runtime_version' /pulsar/instances/python-instance/Function_pb2.py && \ + pip install protobuf==6.31.1 || true # to make the python runner could print json logs RUN pip3 install python-json-logger --user