Skip to content

Commit a05a0e0

Browse files
VaniHaripriyaCollinHowland
authored andcommitted
fix(CI): ensure SeaweedFS S3 auth is set up before tests (#12322)
Signed-off-by: VaniHaripriya <[email protected]> Signed-off-by: CollinHowland <[email protected]>
1 parent 2e8e56a commit a05a0e0

File tree

2 files changed

+23
-0
lines changed

2 files changed

+23
-0
lines changed

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

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ MULTI_USER=false
3232
STORAGE_BACKEND="seaweedfs"
3333
AWF_VERSION=""
3434
POD_TO_POD_TLS_ENABLED=false
35+
SEAWEEDFS_INIT_TIMEOUT=300s
3536

3637
# Loop over script arguments passed. This uses a single switch-case
3738
# block with default value in case we want to make alternative deployments
@@ -203,6 +204,17 @@ then
203204
exit 1
204205
fi
205206

207+
# Ensure SeaweedFS S3 auth is configured before proceeding
208+
if [ "${STORAGE_BACKEND}" == "seaweedfs" ]; then
209+
wait_for_seaweedfs_init kubeflow "${SEAWEEDFS_INIT_TIMEOUT}" || EXIT_CODE=$?
210+
if [[ $EXIT_CODE -ne 0 ]]
211+
then
212+
echo "SeaweedFS init job did not complete successfully."
213+
exit 1
214+
fi
215+
echo "SeaweedFS init job completed successfully."
216+
fi
217+
206218
# Verify pipeline integration for multi-user mode
207219
if [ "${MULTI_USER}" == "true" ]; then
208220
echo "Verifying Pipeline Integration..."

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

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,17 @@ 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 namespace="$1"
67+
local timeout="$2"
68+
if kubectl -n "$namespace" get job init-seaweedfs > /dev/null 2>&1; then
69+
if ! kubectl -n "$namespace" wait --for=condition=complete --timeout="$timeout" job/init-seaweedfs; then
70+
return 1
71+
fi
72+
fi
73+
}
74+
6475
deploy_with_retries () {
6576
if [[ $# -ne 4 ]]
6677
then

0 commit comments

Comments
 (0)