Skip to content

Commit

Permalink
Fix error
Browse files Browse the repository at this point in the history
  • Loading branch information
jiangpengcheng committed May 15, 2024
1 parent 3527bdd commit bb4aebe
Show file tree
Hide file tree
Showing 11 changed files with 12 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .ci/helm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,7 @@ function ci::verify_elasticsearch_sink() {

function ci::verify_mongodb_source() {
timesleep=$1
kubectl exec mongo-dbz-0 -c mongo -- mongo -u debezium -p dbz --authenticationDatabase admin localhost:27017/inventory --eval 'db.products.update({"_id":NumberLong(104)},{$set:{weight:1.25}})'
kubectl exec mongo-dbz-0 -c mongo -- mongosh -u debezium -p dbz --authenticationDatabase admin localhost:27017/inventory --eval 'db.products.update({"_id":NumberLong(104)},{$set:{weight:1.25}})'
sleep "$timesleep"
kubectl logs --tail=-1 -l compute.functionmesh.io/name=source-sample | grep "records sent"
if [ $? -eq 0 ]; then
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ metadata:
name: function-download-sample
namespace: default
spec:
image: streamnative/pulsar-functions-pulsarctl-java-runner:3.2.2.1
className: org.apache.pulsar.functions.api.examples.ExclamationFunction
cleanupSubscription: true
subscriptionName: java-download-subscription
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ metadata:
name: py-function-download-from-http-sample
namespace: default
spec:
image: streamnative/pulsar-functions-pulsarctl-python-runner:3.2.2.1
className: exclamation
forwardSourceMessageProperty: true
maxPendingAsyncRequests: 1000
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ metadata:
name: py-function-download-legacy-sample
namespace: default
spec:
image: streamnative/pulsar-functions-pulsarctl-python-runner:3.2.2.1
className: exclamation_function.ExclamationFunction
forwardSourceMessageProperty: true
maxPendingAsyncRequests: 1000
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ metadata:
name: py-function-download-sample
namespace: default
spec:
image: streamnative/pulsar-functions-pulsarctl-python-runner:3.2.2.1
className: exclamation_function.ExclamationFunction
forwardSourceMessageProperty: true
maxPendingAsyncRequests: 1000
Expand Down
2 changes: 1 addition & 1 deletion .ci/tests/integration/cases/mongodb-source/manifests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ spec:
cpu: "0.1"
memory: 1G
sourceConfig:
mongodb.hosts: rs0/mongo-dbz-0.mongo.default.svc.cluster.local:27017,rs0/mongo-dbz-1.mongo.default.svc.cluster.local:27017,rs0/mongo-dbz-2.mongo.default.svc.cluster.local:27017
mongodb.hosts: rs0/mongo-dbz-0.mongo.default.svc.cluster.local:27017
mongodb.name: dbserver1
mongodb.user: debezium
mongodb.password: dbz
Expand Down
4 changes: 2 additions & 2 deletions .ci/tests/integration/cases/mongodb-source/mongodb-dbz.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ spec:
matchLabels:
role: mongo
serviceName: "mongo"
replicas: 3
replicas: 1
template:
metadata:
labels:
Expand All @@ -44,7 +44,7 @@ spec:
terminationGracePeriodSeconds: 10
containers:
- name: mongo
image: debezium/example-mongodb:0.10
image: debezium/example-mongodb:2.6
env:
- name: MONGODB_USER
value: "debezium"
Expand Down
2 changes: 1 addition & 1 deletion .ci/tests/integration/cases/mongodb-source/verify.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ function install_mongodb_server() {
# install mongodb server
kubectl apply -f "${mongodb_file}"
num=0
while [[ ${num} -lt 3 ]]; do
while [[ ${num} -lt 1 ]]; do
sleep 5
kubectl get pods
num=$(kubectl get pods -l role=mongo | wc -l)
Expand Down
3 changes: 2 additions & 1 deletion images/pulsar-functions-base-runner/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ RUN echo "VERSION_TAG=${VERSION_TAG}" && \
apk update && apk add --no-cache $JRE_PACKAGE_NAME bash

COPY --from=pulsar --chown=$UID:$GID /pulsar/conf /pulsar/conf
COPY --from=pulsar --chown=$UID:$GID /pulsar/bin/pulsar-admin /pulsar/bin/pulsar-admin
COPY --from=pulsar --chown=$UID:$GID /pulsar/bin /pulsar/bin
COPY --from=pulsar --chown=$UID:$GID /pulsar/lib /pulsar/lib

# remove the vertx jar since it's not need ans has a cve
Expand All @@ -57,6 +57,7 @@ RUN rm -rf /pulsar/lib/io.vertx-vertx-core-*.jar || true
# remove presto dependencies because they are not needed
RUN rm -rf /pulsar/lib/presto || true
RUN rm -rf /pulsar/conf/presto || true
RUN rm -rf /pulsar/bin/pulsar-detector || true

ENV PULSAR_ROOT_LOGGER=INFO,CONSOLE
ENV java.io.tmpdir=/pulsar/tmp/
Expand Down
3 changes: 2 additions & 1 deletion images/pulsar-functions-python-runner/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ RUN python3 get-pip.py

WORKDIR /pulsar

RUN pip3 install 'pulsar-client[all]==3.5.0'
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`(the .so library package)
RUN rm -rf /pulsar/instances/python-instance/pulsar/ \
Expand Down
6 changes: 3 additions & 3 deletions images/pulsar-functions-python-runner/pulsarctl.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ ARG PULSAR_IMAGE_TAG
FROM ${PULSAR_IMAGE}:${PULSAR_IMAGE_TAG} as pulsar
FROM pulsar-functions-pulsarctl-runner-base:latest

COPY --from=pulsar --chown=$UID:$GID /pulsar/bin /pulsar/bin
COPY --from=pulsar --chown=$UID:$GID /pulsar/instances/python-instance /pulsar/instances/python-instance
# Pulsar 2.11.0 removes /pulsar/pulsar-client from docker image
# But it required with Pulsar 2.10.X and below
Expand All @@ -23,9 +24,8 @@ RUN apk update \
&& mv /usr/lib/python3.11/EXTERNALLY-MANAGED /usr/lib/python3.11/EXTERNALLY-MANAGED.old \
&& python3 get-pip.py && pip3 install --upgrade pip

RUN if [ -f "/pulsar/bin/install-pulsar-client-37.sh" ]; then /pulsar/bin/install-pulsar-client-37.sh || pip3 install 'pulsar-client[all]==3.5.0' ; fi
RUN if [ -f "/pulsar/bin/install-pulsar-client.sh" ]; then /pulsar/bin/install-pulsar-client.sh || pip3 install 'pulsar-client[all]==3.5.0' ; fi
RUN pip3 install 'pulsar-client[all]==3.5.0'
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`(the .so library package)
RUN rm -rf /pulsar/instances/python-instance/pulsar/ \
Expand Down

0 comments on commit bb4aebe

Please sign in to comment.