Skip to content

Commit e64253e

Browse files
committed
E2E: Add additional check to verify if the components are ready
Signed-off-by: Yuki Iwai <[email protected]>
1 parent 888bec3 commit e64253e

File tree

1 file changed

+20
-1
lines changed

1 file changed

+20
-1
lines changed

test/e2e/v1beta1/scripts/gh-actions/setup-katib.sh

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,27 @@ echo "Deploying Katib"
6565
cd ../../../../../ && WITH_DATABASE_TYPE=$WITH_DATABASE_TYPE make deploy && cd -
6666

6767
# Wait until all Katib pods is running.
68+
MAX_RETRY_COUNT=24
69+
COMPONENTS_NUM=3
70+
if "${DEPLOY_KATIB_UI}"; then
71+
COMPONENTS_NUM=4
72+
fi
73+
until [ "$(kubectl get pods -n kubeflow -l "katib.kubeflow.org/component in ($WITH_DATABASE_TYPE,controller,ui,db-manager)" -oname | wc -l | tr -d ' ')" = "${COMPONENTS_NUM}" ]; do
74+
echo -e "\nWaiting for katib components to be created"
75+
kubectl get pods -n kubeflow || :
76+
kubectl describe replicasets -n kubeflow || :
77+
78+
sleep 5
79+
MAX_RETRY_COUNT=$((MAX_RETRY_COUNT - 1))
80+
if [ "${MAX_RETRY_COUNT}" = "0" ]; then
81+
echo "Failed to create katib components"
82+
exit 1
83+
fi
84+
done
85+
6886
TIMEOUT=120s
69-
kubectl wait --for=condition=ready --timeout=${TIMEOUT} -l "katib.kubeflow.org/component in ($WITH_DATABASE_TYPE,controller,db-manager,ui)" -n kubeflow pod ||
87+
88+
kubectl wait --for=condition=ContainersReady=True --timeout=${TIMEOUT} -l "katib.kubeflow.org/component in ($WITH_DATABASE_TYPE,controller,db-manager,ui)" -n kubeflow pod ||
7089
(kubectl get pods -n kubeflow && kubectl describe pods -n kubeflow && exit 1)
7190

7291
echo "All Katib components are running."

0 commit comments

Comments
 (0)