Skip to content

Commit

Permalink
Fix error
Browse files Browse the repository at this point in the history
  • Loading branch information
jiangpengcheng committed Mar 5, 2024
1 parent 7577929 commit 3862f20
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .ci/helm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -573,7 +573,7 @@ function ci::verify_log_topic() {
timesleep=$3

sleep "$timesleep"
MESSAGE=$(kubectl exec -n ${NAMESPACE} ${CLUSTER}-pulsar-broker-0 -- bin/pulsar-client consume -n 5 -s "sub" --subscription-position Earliest "${logTopic}")
MESSAGE=$(kubectl exec -n ${NAMESPACE} ${CLUSTER}-pulsar-broker-0 -- bin/pulsar-client consume -n 2 -s "sub" --subscription-position Earliest "${logTopic}")
echo "$MESSAGE"
if [[ "$MESSAGE" == *"$message"* ]]; then
return 0
Expand All @@ -588,7 +588,7 @@ function ci::verify_log_topic_with_auth() {
timesleep=$3

sleep "$timesleep"
consumeCommand="kubectl exec -n ${NAMESPACE} ${CLUSTER}-pulsar-broker-0 -- sh -c 'bin/pulsar-client --auth-plugin \$brokerClientAuthenticationPlugin --auth-params \$brokerClientAuthenticationParameters consume -n 5 -s "sub" --subscription-position Earliest \"${logTopic}\"'"
consumeCommand="kubectl exec -n ${NAMESPACE} ${CLUSTER}-pulsar-broker-0 -- sh -c 'bin/pulsar-client --auth-plugin \$brokerClientAuthenticationPlugin --auth-params \$brokerClientAuthenticationParameters consume -n 2 -s "sub" --subscription-position Earliest \"${logTopic}\"'"
MESSAGE=$(sh -c "$consumeCommand")
echo "$MESSAGE"
if [[ "$MESSAGE" == *"$message"* ]]; then
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ if [ $? -ne 0 ]; then
exit 1
fi

verify_log_topic=$(ci::verify_log_topic_with_auth persistent://public/default/logging-generic-auth-function-logs "org.apache.pulsar.functions.runtime.JavaInstanceStarter" 10 2>&1)
verify_log_topic=$(ci::verify_log_topic_with_auth persistent://public/default/logging-generic-auth-function-logs "it is not a NAR file" 10 2>&1)
if [ $? -ne 0 ]; then
echo "$verify_log_topic"
kubectl delete -f "${BASE_DIR}"/.ci/tests/integration-oauth2/cases/java-download-function-generic-auth/manifests.yaml > /dev/null 2>&1 || true
Expand Down
3 changes: 2 additions & 1 deletion controllers/spec/function.go
Original file line number Diff line number Diff line change
Expand Up @@ -163,10 +163,11 @@ func makeFunctionContainer(function *v1alpha1.Function) *corev1.Container {
mounts = append(mounts,
generateDownloaderVolumeMountsForRuntime(function.Spec.Java, function.Spec.Python, function.Spec.Golang)...)
}
function.Spec.Image = getFunctionRunnerImage(&function.Spec)
return &corev1.Container{
// TODO new container to pull user code image and upload jars into bookkeeper
Name: "pulsar-function",
Image: getFunctionRunnerImage(&function.Spec),
Image: function.Spec.Image,
Command: makeFunctionCommand(function),
Ports: []corev1.ContainerPort{GRPCPort, MetricsPort},
Env: generateContainerEnv(function),
Expand Down

0 comments on commit 3862f20

Please sign in to comment.