Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix python runner image which use pulsar-client==3.2.0 #659

Merged
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions images/pulsar-functions-python-runner/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@ WORKDIR /pulsar
RUN if [ -f "/pulsar/bin/install-pulsar-client-37.sh" ]; then /pulsar/bin/install-pulsar-client-37.sh || true ; fi
RUN if [ -f "/pulsar/bin/install-pulsar-client.sh" ]; then /pulsar/bin/install-pulsar-client.sh || pip3 install 'pulsar-client[all]==3.1.0' ; fi

# this dir is duplicate with the installed pulsar-client pip package, and maybe not compatible with the `_pulsar`(ths .so library package)
RUN rm -rf /pulsar/instances/python-instance/pulsar/ \
&& sed -i "s/serde.IdentitySerDe/pulsar.functions.serde.IdentitySerDe/g" /pulsar/instances/python-instance/python_instance.py


USER $USER
# a temp solution from https://github.com/apache/pulsar/pull/15846 to fix python protobuf version error
Expand Down
4 changes: 4 additions & 0 deletions images/pulsar-functions-python-runner/pulsarctl.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ RUN if [ -d "/pulsar/cpp-client" ]; then apt-get update \
RUN if [ -f "/pulsar/bin/install-pulsar-client-37.sh" ]; then /pulsar/bin/install-pulsar-client-37.sh || pip3 install 'pulsar-client[all]==3.1.0' ; fi
RUN if [ -f "/pulsar/bin/install-pulsar-client.sh" ]; then /pulsar/bin/install-pulsar-client.sh || pip3 install 'pulsar-client[all]==3.1.0' ; fi

# this dir is duplicate with the installed pulsar-client pip package, and maybe not compatible with the `_pulsar`(ths .so library package)
RUN rm -rf /pulsar/instances/python-instance/pulsar/ \
&& sed -i "s/serde.IdentitySerDe/pulsar.functions.serde.IdentitySerDe/g" /pulsar/instances/python-instance/python_instance.py

WORKDIR /pulsar

USER $USER
Expand Down