Skip to content

feat: Added Quota Auto Validation Scripts #119

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Jun 5, 2025

Conversation

Abdul-Microsoft
Copy link
Contributor

This pull request introduces significant updates to the infrastructure and deployment scripts to enhance flexibility, improve quota validation for AI model deployments, and streamline resource location management. Key changes include adding pre-provision hooks for quota validation, introducing new parameters for resource location, and implementing validation scripts for both PowerShell and Bash.

Infrastructure Updates

  • Introduction of solutionLocation parameter: Added a new parameter, solutionLocation, to specify the location for all resources except AI Foundry. This replaces hardcoded location and dblocation variables in multiple modules (infra/main.bicep). [1] [2] [3] [4] [5] [6] [7] [8] [9]
  • Parameter updates in infra/main.bicepparam: Adjusted default values for AzureAiServiceLocation and introduced solutionLocation to align with the new infrastructure design.

Quota Validation Enhancements

  • Pre-provision hooks in azure.yaml: Added hooks to validate quota availability for AI model deployments before provisioning, supporting both POSIX and Windows environments.
  • New validation scripts: Introduced validate_model_deployment_quota scripts in both PowerShell (validate_model_deployment_quota.ps1) and Bash (validate_model_deployment_quota.sh) to check deployment quotas against Azure Cognitive Services. These scripts handle missing parameters, validate JSON configuration, and provide fallback region suggestions. [1] [2]
  • Quota validation for individual models: Added scripts validate_model_quota.ps1 and validate_model_quota.sh to validate individual model quotas, ensuring sufficient capacity in the specified region or suggesting alternatives. [1] [2]

AI Model Deployment Configuration

  • New aiModelDeployments parameter: Added to infra/main.parameters.json to define deployment details for AI models, including name, version, format, and SKU.

These changes improve the robustness of the deployment process by ensuring that quota requirements are met before provisioning and by enabling more flexible resource location management.

Please refer to the screenshots below for the output of the quota auto-validation script during azd up execution:

CodeSpace

Failure Scenario

image

Success Scenario

image

Local Machine (Windows)

Failure Scenario

image

Success Scenario

image

Does this introduce a breaking change?

  • Yes
  • No

Golden Path Validation

  • I have tested the primary workflows (the "golden path") to ensure they function correctly without errors.

Deployment Validation

  • I have validated the deployment process successfully and all services are running as expected with this change.

What to Check

Verify that the following are valid

  • ...

Other Information

@Roopan-Microsoft Roopan-Microsoft merged commit b592405 into dev Jun 5, 2025
6 checks passed
@Roopan-Microsoft Roopan-Microsoft deleted the quota-auto-validation branch June 5, 2025 11:33
Copy link

github-actions bot commented Jun 5, 2025

🎉 This PR is included in version 1.4.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

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