Skip to content

fix: Update quota-check changes from yml files and checkquota.sh#272

Open
Ashwal-Microsoft wants to merge 1 commit into
devfrom
Ash-devtomainCC
Open

fix: Update quota-check changes from yml files and checkquota.sh#272
Ashwal-Microsoft wants to merge 1 commit into
devfrom
Ash-devtomainCC

Conversation

@Ashwal-Microsoft

@Ashwal-Microsoft Ashwal-Microsoft commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

This pull request simplifies and streamlines the deployment workflow for both Linux and Windows runners by removing support for fallback regions and explicit GPT model capacity overrides. Now, deployments will only attempt the user-selected region (for manual triggers) or the default region (for automatic triggers), and will fail immediately if quota is insufficient, providing clearer feedback to users. Additionally, the quota check and reporting logic has been improved for better transparency and maintainability.

Deployment Workflow Simplification

  • Removed the fallback region retry logic from both job-deploy-linux.yml and job-deploy-windows.yml, so deployments no longer attempt to fall back to alternative regions if the primary region fails. Deployments now fail immediately on insufficient resources. [1] [2]

  • Eliminated the AZURE_ENV_GPT_MODEL_CAPACITY and AZURE_NONAI_LOCATIONS input parameters and related environment variable handling from deployment jobs and workflows, reducing configuration complexity. [1] [2] [3] [4] [5] [6] [7] [8]

Quota Check and Reporting Improvements

  • Updated the quota check logic in job-deploy.yml to use only the configured AZURE_REGIONS variable, and to fail the pipeline with a clear message if no region with sufficient quota is found.

  • Improved the Azure Search quota validation logic for manual triggers: if the user-selected region lacks quota, the deployment fails and provides a summary of available regions, rather than silently falling back to another region. [1] [2] [3] [4]

Environment Variable Defaults

  • Set a fixed default for GPT_MIN_CAPACITY (now 50) and GPT_REALTIME_MIN_CAPACITY (now 1) in job-deploy.yml, removing dependency on repository variables for these values.

These changes make the deployment process more predictable and user-friendly by ensuring that region selection is explicit and failures are clearly reported.…keep only Bicep fix

Purpose

  • ...

Does this introduce a breaking change?

  • Yes
  • No

How to Test

  • Get the code
git clone [repo-address]
cd [repo-name]
git checkout [branch-name]
npm install
  • Test the code

What to Check

Verify that the following are valid

  • ...

Other Information

Copilot AI review requested due to automatic review settings June 26, 2026 10:48
@Ashwal-Microsoft Ashwal-Microsoft changed the title fic: Update quota-check changes from yml files and checkquota.sh fix: Update quota-check changes from yml files and checkquota.sh Jun 26, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the deployment GitHub Actions workflows and quota-check script to simplify region selection (removing fallback-region retry behavior) and to standardize quota thresholds (e.g., fixed GPT minimum capacity). It also refactors quota validation/reporting to be more explicit about failures.

Changes:

  • Removed fallback-region retry logic from Linux and Windows deploy jobs to fail deployments on the selected/default region.
  • Updated quota-check execution and reporting paths in job-deploy.yml, and adjusted quota-related workflow inputs/outputs.
  • Refactored infra/scripts/checkquota.sh to rely on AZURE_REGIONS and to streamline per-model quota evaluation.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
infra/scripts/checkquota.sh Refactors region parsing and model quota evaluation logic for AI models.
.github/workflows/job-send-notification.yml Sets a fixed GPT minimum capacity value in workflow env.
.github/workflows/job-deploy.yml Removes fallback handling/capacity override wiring; updates quota-check and search-quota behavior.
.github/workflows/job-deploy-windows.yml Removes fallback-region retry and GPT capacity env wiring from Windows deployment.
.github/workflows/job-deploy-linux.yml Removes fallback-region retry and GPT capacity env wiring from Linux deployment.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 288 to +292
chmod +x infra/scripts/checkquota.sh
infra/scripts/checkquota.sh
if ! infra/scripts/checkquota.sh; then
# If quota check fails due to insufficient quota, set the flag
if grep -q "No region with sufficient quota found" infra/scripts/checkquota.sh; then
echo "QUOTA_FAILED=true" >> $GITHUB_ENV
Comment on lines +68 to +71
MODEL_INFO=$(echo "$QUOTA_INFO" | awk -v model="\"value\": \"$MODEL\"" '
BEGIN { RS="},"; FS="," }
$0 ~ model { print $0 }
')
Comment on lines +13 to +16
# List of Azure regions to check for quota (update as needed)
IFS=', ' read -ra REGIONS <<< "$AZURE_REGIONS"

# Trim whitespace from environment variables to avoid issues with leading/trailing spaces
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants