Skip to content

Commit 0f5a9c4

Browse files
Fix ChatQnA manifest test issue on Xeon (opea-project#1044)
Signed-off-by: chensuyue <suyue.chen@intel.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent a65640b commit 0f5a9c4

File tree

4 files changed

+12
-15
lines changed

4 files changed

+12
-15
lines changed

.github/workflows/_manifest-e2e.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,11 +90,16 @@ jobs:
9090
echo "Validate ${{ inputs.example }} successful!"
9191
else
9292
echo "Validate ${{ inputs.example }} failure!!!"
93-
.github/workflows/scripts/k8s-utils.sh dump_all_pod_logs $NAMESPACE
93+
echo "Check the logs in 'Dump logs when e2e test failed' step!!!"
9494
exit 1
9595
fi
9696
fi
9797
98+
- name: Dump logs when e2e test failed
99+
if: failure()
100+
run: |
101+
.github/workflows/scripts/k8s-utils.sh dump_all_pod_logs $NAMESPACE
102+
98103
- name: Kubectl uninstall
99104
if: always()
100105
run: |

.github/workflows/pr-manifest-e2e.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
name: E2E test with manifests
55

66
on:
7-
pull_request_target:
7+
pull_request:
88
branches: ["main", "*rc"]
99
types: [opened, reopened, ready_for_review, synchronize] # added `ready_for_review` since draft is skipped
1010
paths:

ChatQnA/tests/test_manifest_on_gaudi.sh

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -111,29 +111,26 @@ function _cleanup_ns() {
111111

112112
function install_and_validate_chatqna_guardrail() {
113113
echo "Testing manifests chatqna_guardrils"
114-
local ns=${NAMESPACE}-gaurdrails
114+
local ns=${NAMESPACE}
115115
_cleanup_ns $ns
116116
kubectl create namespace $ns
117117
# install guardrail
118118
kubectl apply -f chatqna-guardrails.yaml -n $ns
119119
# Sleep enough time for chatqna_guardrail to be ready
120120
sleep 60
121121
if kubectl rollout status deployment -n "$ns" --timeout "$ROLLOUT_TIMEOUT_SECONDS"; then
122-
echo "Waiting for cahtqna_guardrail pod ready done!"
122+
echo "Waiting for chatqna_guardrail pod ready done!"
123123
else
124124
echo "Timeout waiting for chatqna_guardrail pod ready!"
125-
_cleanup_ns $ns
126125
exit 1
127126
fi
128127

129128
# validate guardrail
130129
validate_chatqna $ns chatqna-guardrails
131130
local ret=$?
132131
if [ $ret -ne 0 ]; then
133-
_cleanup_ns $ns
134132
exit 1
135133
fi
136-
_cleanup_ns $ns
137134
}
138135

139136
if [ $# -eq 0 ]; then
@@ -162,7 +159,6 @@ case "$1" in
162159
exit $ret
163160
fi
164161
pushd ChatQnA/kubernetes/intel/hpu/gaudi/manifest
165-
set +e
166162
install_and_validate_chatqna_guardrail
167163
popd
168164
;;

ChatQnA/tests/test_manifest_on_xeon.sh

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ function get_end_point() {
4040
function validate_chatqna() {
4141
local ns=$1
4242
local log=$2
43-
max_retry=20
43+
max_retry=10
4444
# make sure microservice retriever-usvc is ready
4545
# try to curl retriever-svc for max_retry times
4646
test_embedding=$(python3 -c "import random; embedding = [random.uniform(-1, 1) for _ in range(768)]; print(embedding)")
@@ -111,29 +111,26 @@ function _cleanup_ns() {
111111

112112
function install_and_validate_chatqna_guardrail() {
113113
echo "Testing manifests chatqna_guardrils"
114-
local ns=${NAMESPACE}-gaurdrails
114+
local ns=${NAMESPACE}
115115
_cleanup_ns $ns
116116
kubectl create namespace $ns
117117
# install guardrail
118118
kubectl apply -f chatqna-guardrails.yaml -n $ns
119119
# Sleep enough time for chatqna_guardrail to be ready
120120
sleep 60
121121
if kubectl rollout status deployment -n "$ns" --timeout "$ROLLOUT_TIMEOUT_SECONDS"; then
122-
echo "Waiting for cahtqna_guardrail pod ready done!"
122+
echo "Waiting for chatqna_guardrail pod ready done!"
123123
else
124124
echo "Timeout waiting for chatqna_guardrail pod ready!"
125-
_cleanup_ns $ns
126125
exit 1
127126
fi
128127

129128
# validate guardrail
130129
validate_chatqna $ns chatqna-guardrails
131130
local ret=$?
132131
if [ $ret -ne 0 ]; then
133-
_cleanup_ns $ns
134132
exit 1
135133
fi
136-
_cleanup_ns $ns
137134
}
138135

139136
if [ $# -eq 0 ]; then
@@ -162,7 +159,6 @@ case "$1" in
162159
exit $ret
163160
fi
164161
pushd ChatQnA/kubernetes/intel/cpu/xeon/manifest
165-
set +e
166162
install_and_validate_chatqna_guardrail
167163
popd
168164
;;

0 commit comments

Comments
 (0)