fix: prefer user region then all other region #125
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Purpose
This pull request introduces several enhancements to scripts responsible for validating model deployment quotas in Azure. The changes improve error handling, streamline parameter validation, and add checks for existing services and deployments to optimize quota validation. Below is a summary of the most important changes grouped by theme:
Improved Parameter Validation and Error Handling
scripts/validate_model_deployment_quota.ps1
andscripts/validate_model_quota.ps1
to check for missing or invalid parameters and provide clearer error messages. [1] [2]scripts/validate_model_deployment_quota.sh
andscripts/validate_model_quota.sh
to validate inputs more rigorously, including checks for invalid capacity values and clearer error outputs for unknown options. [1] [2]Service and Deployment Existence Checks
scripts/validate_model_deployment_quota.ps1
andscripts/validate_model_deployment_quota.sh
to check if the Azure AI service and required model deployments already exist, skipping quota validation if all are provisioned. [1] [2]Enhanced Quota Validation Logic
scripts/validate_model_quota.ps1
to prioritize quota checks in the user-specified region and fallback to other regions if necessary, with detailed output for quota availability.scripts/validate_model_quota.sh
, including better messaging for insufficient quota and clearer instructions for retrying deployment in alternate regions.Streamlined Code and Output Formatting
These changes collectively enhance the usability, reliability, and efficiency of the quota validation scripts, making them more robust for deployment scenarios in Azure environments.
Does this introduce a breaking change?
Golden Path Validation
Deployment Validation
What to Check
Verify that the following are valid
Other Information