Skip to content

Commit 3f076fa

Browse files
Merge pull request #203 from microsoft/task/ci-pipeline-quota-check-dkm
fix: quota check script with dynamic region handling
2 parents 5207ebf + c1065a8 commit 3f076fa

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

.github/workflows/CI.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,9 @@ jobs:
8787
AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }}
8888
AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }}
8989
AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }}
90-
GPT_MIN_CAPACITY: '130'
91-
TEXT_EMBEDDING_MIN_CAPACITY: '80'
90+
GPT_MIN_CAPACITY: '10'
91+
TEXT_EMBEDDING_MIN_CAPACITY: '10'
92+
AZURE_REGIONS: "${{ vars.AZURE_REGIONS }}"
9293

9394

9495
# Send Notification on Quota Failure

Deployment/checkquota.ps1

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# List of Azure regions to check for quota (update as needed)
2-
$REGIONS = @("WestUS3", "CanadaCentral", "eastus")
2+
$AZURE_REGIONS = "$env:AZURE_REGIONS"
3+
# Ensure regions are correctly split and trimmed
4+
$REGIONS = ($AZURE_REGIONS -split '[,\s]') | ForEach-Object { $_.Trim() } | Where-Object { $_ -ne "" }
5+
6+
Write-Output "📍 Processed Regions: $($REGIONS -join ', ')"
37

48
$SUBSCRIPTION_ID = $env:AZURE_SUBSCRIPTION_ID
59
$GPT_MIN_CAPACITY = $env:GPT_MIN_CAPACITY
@@ -62,10 +66,7 @@ foreach ($REGION in $REGIONS) {
6266

6367
foreach ($MODEL in $MIN_CAPACITY.Keys) {
6468

65-
$MODEL_INFO = $QUOTA_INFO | Where-Object { $_.Name -eq $MODEL }
66-
67-
Write-Host "MODEL_INFO ID: $MODEL_INFO"
68-
Write-Host "QUOTA_INFO: $QUOTA_INFO"
69+
$MODEL_INFO = $QUOTA_INFO | Where-Object { $_.Name -eq $MODEL }
6970

7071
if (-not $MODEL_INFO) {
7172
Write-Host "⚠️ WARNING: No quota information found for model: $MODEL in $REGION. Skipping."

0 commit comments

Comments
 (0)