Skip to content

Commit 09b12e0

Browse files
authored
fix the ci test for quickstart.sh script, In case we had failure in downloading embeddinggemma-300m, to fallback into minimal models (#737)
1 parent 0e3a669 commit 09b12e0

File tree

2 files changed

+38
-5
lines changed

2 files changed

+38
-5
lines changed

.github/workflows/integration-test-docker.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,18 @@
11
name: Integration Test [Docker Compose]
22

33
on:
4+
pull_request:
5+
branches:
6+
- main
7+
paths-ignore:
8+
- 'website/**'
9+
- '**/*.md'
10+
push:
11+
branches:
12+
- main
13+
paths-ignore:
14+
- 'website/**'
15+
- '**/*.md'
416
workflow_dispatch: # Allow manual triggering
517

618
jobs:

scripts/quickstart.sh

Lines changed: 26 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -158,16 +158,37 @@ download_models() {
158158
info_msg "📥 Downloading AI models..."
159159
echo
160160

161-
# Use minimal model set for faster setup
162-
export CI_MINIMAL_MODELS=false
161+
# Try full model set first (includes embeddinggemma-300m which may require auth)
162+
# If that fails (e.g., 401 on gated models), fall back to minimal set
163+
if [ "${CI_MINIMAL_MODELS:-}" = "true" ]; then
164+
info_msg "CI_MINIMAL_MODELS=true detected, using minimal model set"
165+
export CI_MINIMAL_MODELS=true
166+
else
167+
info_msg "Attempting to download full model set (includes embeddinggemma-300m)..."
168+
export CI_MINIMAL_MODELS=false
169+
fi
163170

164171
# Download models and save output to log (visible in real-time)
165172
if make download-models 2>&1 | tee /tmp/download-models-output.log; then
166173
success_msg "✅ Models downloaded successfully!"
167174
else
168-
error_msg "❌ Failed to download models!"
169-
info_msg "📋 Check logs: cat /tmp/download-models-output.log"
170-
exit 1
175+
# Check if failure was due to gated model (embeddinggemma-300m)
176+
if grep -q "embeddinggemma.*401\|embeddinggemma.*Unauthorized\|embeddinggemma.*GatedRepoError" /tmp/download-models-output.log 2>/dev/null; then
177+
info_msg "⚠️ Full model download failed (gated model requires auth)"
178+
info_msg "📋 Falling back to minimal model set..."
179+
export CI_MINIMAL_MODELS=true
180+
if make download-models 2>&1 | tee /tmp/download-models-output.log; then
181+
success_msg "✅ Minimal models downloaded successfully!"
182+
else
183+
error_msg "❌ Failed to download even minimal models!"
184+
info_msg "📋 Check logs: cat /tmp/download-models-output.log"
185+
exit 1
186+
fi
187+
else
188+
error_msg "❌ Failed to download models!"
189+
info_msg "📋 Check logs: cat /tmp/download-models-output.log"
190+
exit 1
191+
fi
171192
fi
172193
echo
173194
}

0 commit comments

Comments
 (0)