Skip to content

Commit bd9d92b

Browse files
exit code
1 parent dfa9b36 commit bd9d92b

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

infra/scripts/validate_model_deployment_quota.sh

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,14 @@ while IFS= read -r deployment; do
6868
./infra/scripts/validate_model_quota.sh --location "$LOCATION" --model "$model" --capacity $capacity --deployment-type $type
6969

7070
# Check if the script failed
71-
if [ $? -ne 0 ]; then
72-
echo "❌ ERROR: Quota validation failed for model deployment: $name"
73-
quotaAvailable=false
71+
exit_code=$?
72+
if [ $exit_code -ne 0 ]; then
73+
if [ $exit_code -eq 2 ]; then
74+
# Skip printing any quota validation error — already handled inside the validation script
75+
exit 1
76+
fi
77+
echo "❌ ERROR: Quota validation failed for model deployment: $name"
78+
quotaAvailable=false
7479
fi
7580
done <<< "$(echo "$aiModelDeployments")"
7681

0 commit comments

Comments
 (0)