Skip to content

Commit 6fe96c3

Browse files
fix: quota check script with dynamic region handling (#1682)
1 parent ebfbddf commit 6fe96c3

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,9 @@ jobs:
3737
export AZURE_TENANT_ID=${{ secrets.AZURE_TENANT_ID }}
3838
export AZURE_CLIENT_SECRET=${{ secrets.AZURE_CLIENT_SECRET }}
3939
export AZURE_SUBSCRIPTION_ID="${{ secrets.AZURE_SUBSCRIPTION_ID }}"
40-
export GPT_MIN_CAPACITY="130"
40+
export GPT_MIN_CAPACITY="30"
4141
export TEXT_EMBEDDING_MIN_CAPACITY="30"
42+
export AZURE_REGIONS="${{ vars.AZURE_REGIONS }}"
4243
4344
chmod +x scripts/checkquota.sh
4445
if ! scripts/checkquota.sh; then

scripts/checkquota.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/bash
22

33
# List of Azure regions to check for quota (update as needed)
4-
REGIONS=("eastus" "westus" "northcentralus" "uksouth" "swedencentral")
4+
IFS=' ' read -ra REGIONS <<< "$AZURE_REGIONS"
55

66
SUBSCRIPTION_ID="${AZURE_SUBSCRIPTION_ID}"
77
GPT_MIN_CAPACITY="${GPT_MIN_CAPACITY}"
@@ -18,7 +18,7 @@ if ! az login --service-principal -u "$AZURE_CLIENT_ID" -p "$AZURE_CLIENT_SECRET
1818
fi
1919

2020
echo "🔄 Validating required environment variables..."
21-
if [[ -z "$SUBSCRIPTION_ID" || -z "$GPT_MIN_CAPACITY" || -z "$TEXT_EMBEDDING_MIN_CAPACITY" ]]; then
21+
if [[ -z "$SUBSCRIPTION_ID" || -z "$GPT_MIN_CAPACITY" || -z "$TEXT_EMBEDDING_MIN_CAPACITY" || -z "$REGIONS" ]]; then
2222
echo "❌ ERROR: Missing required environment variables."
2323
exit 1
2424
fi

0 commit comments

Comments
 (0)