Skip to content

Commit 6008b30

Browse files
committed
fix(CI): ensure SeaweedFS S3 auth before tests
Signed-off-by: VaniHaripriya <[email protected]>
1 parent 0c530df commit 6008b30

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed

.github/resources/scripts/deploy-kfp.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ CACHE_DISABLED=false
3131
MULTI_USER=false
3232
STORAGE_BACKEND="seaweedfs"
3333
AWF_VERSION=""
34+
SEAWEEDFS_INIT_TIMEOUT=300s
3435

3536
# Loop over script arguments passed. This uses a single switch-case
3637
# block with default value in case we want to make alternative deployments
@@ -165,6 +166,16 @@ then
165166
exit 1
166167
fi
167168

169+
# Ensure SeaweedFS S3 auth is configured before proceeding
170+
if [ "${STORAGE_BACKEND}" = "seaweedfs" ]; then
171+
wait_for_seaweedfs_init "${SEAWEEDFS_INIT_TIMEOUT}" || EXIT_CODE=$?
172+
if [[ $EXIT_CODE -ne 0 ]]
173+
then
174+
echo "SeaweedFS init job did not complete successfully."
175+
exit 1
176+
fi
177+
fi
178+
168179
# Check if all pods are running - (10 minutes)
169180
wait_for_pods || EXIT_CODE=$?
170181
if [[ $EXIT_CODE -ne 0 ]]

.github/resources/scripts/helper-functions.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,16 @@ wait_for_pods () {
6161
python "${C_DIR}"/kfp-readiness/wait_for_pods.py
6262
}
6363

64+
wait_for_seaweedfs_init () {
65+
# Wait for SeaweedFS init job to complete to ensure S3 auth is configured
66+
local timeout="$1"
67+
if kubectl -n kubeflow get job init-seaweedfs >/dev/null 2>&1; then
68+
if ! kubectl -n kubeflow wait --for=condition=complete --timeout="$timeout" job/init-seaweedfs; then
69+
return 1
70+
fi
71+
fi
72+
}
73+
6474
deploy_with_retries () {
6575
if [[ $# -ne 4 ]]
6676
then

0 commit comments

Comments
 (0)