fix: script changes for feature "psl-TASfeature"#1045
Open
Akhileswara-Microsoft wants to merge 15 commits into
Open
fix: script changes for feature "psl-TASfeature"#1045Akhileswara-Microsoft wants to merge 15 commits into
Akhileswara-Microsoft wants to merge 15 commits into
Conversation
…in non-interactive mode
…ion in deployment scripts
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates deployment workflows and post-deployment scripts to better support CI/non-interactive executions, adds a new GPT_IMAGE_MIN_CAPACITY configuration knob across workflows/scripts, and expands infra configuration (regions + model capacity defaults) to support the psl-TASfeature deployment scenario.
Changes:
- Propagates
GPT_IMAGE_MIN_CAPACITYthrough GitHub Actions workflows into quota validation. - Enhances post-deploy scripts (
post_deploy.sh/post_deploy.ps1) for non-interactive use-case selection and CI principal ID resolution, plus exports AI Foundry/project identifiers for downstream KB connection seeding. - Updates Bicep templates to expand allowed regions and change the default
gptImageModelCapacity.
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| infra/scripts/seed_kb_connections.py | Adds env-based project ARM ID construction to avoid brittle data-plane discovery in CI. |
| infra/scripts/post_deploy.sh | Adds non-interactive args, CI principal resolution, and exports AI Foundry/project env vars for KB connection seeding. |
| infra/scripts/post_deploy.ps1 | Adds -UseCase/-NonInteractive, CI principal resolution, and exports AI Foundry/project env vars for KB connection seeding. |
| infra/scripts/checkquota.sh | Adds quota validation for the gpt-image-1.5 model via GPT_IMAGE_MIN_CAPACITY. |
| infra/main.bicep | Expands allowed regions and changes default image model capacity. |
| infra/main_custom.bicep | Changes default image model capacity to match updated deployment needs. |
| .github/workflows/job-deploy.yml | Passes GPT_IMAGE_MIN_CAPACITY into quota validation. |
| .github/workflows/job-deploy-windows.yml | Switches to running unified PowerShell post-deploy non-interactively; exports needed env vars. |
| .github/workflows/job-deploy-linux.yml | Switches to running unified bash post-deploy non-interactively; exports needed env vars. |
| .github/workflows/deploy.yml | Passes GPT_IMAGE_MIN_CAPACITY into quota validation. |
| .github/workflows/deploy-waf.yml | Passes GPT_IMAGE_MIN_CAPACITY into quota validation for WAF deployments. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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 improvements and fixes to the deployment workflows and infrastructure scripts, focusing on enhanced automation, better support for non-interactive (CI) deployments, and improved configuration flexibility. The most important changes are summarized below.
Deployment Workflow Enhancements
Added new
GPT_IMAGE_MIN_CAPACITYenvironment variable throughout GitHub Actions workflows (deploy.yml,deploy-waf.yml,job-deploy.yml) and ensured it is passed to deployment scripts, enabling configuration of GPT image model capacity during deployments.Infrastructure Script Improvements
Improved
infra/scripts/post_deploy.ps1to support non-interactive use case selection (-UseCaseand-NonInteractiveparameters), robust principal ID resolution for CI/service principal scenarios, and enhanced environment variable propagation for downstream scripts.Added logic to resolve and export AI Foundry resource ID and project name, improving reliability for knowledge base connection provisioning in CI/CD pipelines.
Capacity and Region Configuration
Changed default GPT image model capacity from 5 to 4 in Bicep templates (
main.bicep,main_custom.bicep) and added new allowed Azure region options (polandcentral,uaenorth).Shell Script Initialization
Added initialization of new variables in
infra/scripts/post_deploy.shto support the enhanced deployment process.Does this introduce a breaking change?
Other Information
This pull request introduces several improvements and updates to the deployment workflows and infrastructure scripts, focusing on enhanced automation for non-interactive CI/CD scenarios, improved environment variable management, and expanded support for Azure regions and AI resource configuration. The main themes are improved non-interactive deployment, expanded region and model support, and more robust environment variable handling.
Deployment Workflow and Script Automation
Refactored the post-deployment scripts (
post_deploy.ps1and related workflow YAMLs) to fully support non-interactive (CI/CD) execution. This includes adding parameters like-UseCaseand-NonInteractive, enforcing their use in non-interactive mode, and improving user principal ID resolution for service principal logins.Updated workflow YAML files to pass required environment variables (like
AZURE_CLIENT_ID) and to invoke the correct shell (pwshfor Windows,bashfor Linux) for post-deployment scripts.Azure AI Model and Region Support
Added support for the
GPT_IMAGE_MIN_CAPACITYenvironment variable throughout workflows and scripts, ensuring consistent configuration for the GPT image model deployment capacity.Expanded the list of allowed Azure regions for deployment to include
polandcentralanduaenorth, increasing flexibility for regional deployments.Updated default values for
gptImageModelCapacityparameters in Bicep templates to 4 (from 5), aligning with new deployment requirements.AI Resource Discovery and Environment Variables
post_deploy.ps1, including fallback mechanisms using Azure CLI and deployment outputs, and exporting these as environment variables for downstream scripts.These changes collectively improve the reliability, automation, and flexibility of the deployment process, especially for CI/CD pipelines and new Azure regions and resources.