| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
- Add -MaxApiRetries (default 20) and -ApiRetryIntervalSeconds (default 15) parameters, giving a 5-minute default wait budget instead of 2.5 minutes. This accounts for the container app pulling a freshly-built image right after acr_build_push.ps1 and passing its startup probe before schema registration is attempted. - On readiness failure, print the last HTTP/connection error plus diagnostics (az containerapp revision list status/replicas and recent az containerapp logs show console output) instead of silently skipping, making failures actionable. - Build the schema-upload multipart body as raw bytes (MemoryStream) instead of round-tripping file bytes through UTF8.GetString, avoiding potential corruption of non-ASCII schema content. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Adds pre-flight checks that detect and auto-correct known AVM deployment issues before running schema registration, so the script works reliably against AVM-deployed resource groups (deployed via the bicep-registry ContentProcessingAVM fork) without requiring a .env file: - Storage account publicNetworkAccess: detects Disabled with 0 private endpoints on Non-WAF deployments and re-enables it. - Cosmos DB publicNetworkAccess: same self-healing check for Cosmos DB (real bug in the published avm/res/document-db/database-account module). - Web container app ingressTargetPort: detects when it defaulted to 80 instead of 3000 and corrects it. - API Easy Auth: detects when anonymous schema registration calls are blocked and handles it. - AI Services multi-account auto-selection when more than one aicu-* account exists in the resource group. Also updated the script to accept -ResourceGroupName as a parameter instead of requiring a .env file, since that workflow is needed for AVM registry deployments. Verified end-to-end against live resource groups (pgcp4, pgcp11) deployed via the AVM fork: all pre-flight checks correctly no-op when resources are already healthy, and correctly self-heal when the known AVM bugs are present. Schema and schema set registration confirmed working after each fix. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
docs/AVMPostDeploymentGuide.md was out of date - it described registering schemas via a standalone Python script (register_schema.py) with no ACR build/push step at all. Updated it to reflect the actual required sequence after deploying via the AVM bicep registry module: 1. Build and push container images (infra/scripts/acr_build_push.ps1 "<resource-group>") - the AVM module provisions ACR/Container Apps but does not build or push application images itself. 2. Run infra/scripts/post_deployment.ps1 -ResourceGroupName "<resource-group>" [-ApiBaseUrl "<url>"] to register schemas and create the schema set (replaces the old Python script; ApiBaseUrl is optional thanks to auto-discovery). 3. Configure authentication (unchanged). Also documented the AVM-specific self-healing pre-flight checks the script now runs (storage/Cosmos DB network access, web ingress port, API auth) so users understand what they do. Updated prerequisites to drop the Python/pip requirement (no longer used) and added PowerShell as a requirement instead. Added a short pointer in README.md's Getting Started section so users who deploy via the AVM registry module (rather than azd up) know to follow the AVM Post Deployment Guide instead. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
… flow" This reverts commit 321c4bd.
There was a problem hiding this comment.
Updates the post_deployment.ps1 script to support AVM-style deployments by allowing the resource group (and related values) to be provided as parameters, while still supporting existing azd env-based deployments.
Changes:
infra/scripts/post_deployment.ps1:92
# Discover container apps in the resource group
Write-Host "[Info] Discovering container apps in resource group..."
$ContainerApps = @(az containerapp list -g $RESOURCE_GROUP --query "[].{name:name, fqdn:properties.configuration.ingress.fqdn}" -o json 2>$null | ConvertFrom-Json)
infra/scripts/post_deployment.ps1:145
$SUBSCRIPTION_ID = azd env get-value AZURE_SUBSCRIPTION_ID
$RESOURCE_GROUP = azd env get-value AZURE_RESOURCE_GROUP
$ApiBaseUrl = "https://$CONTAINER_API_APP_FQDN"
}
infra/scripts/post_deployment.ps1:320
if ($AuthAction -and $AuthAction -ne 'AllowAnonymous') {
Write-Host " [Warn] API container app has authentication enabled (unauthenticatedClientAction=$AuthAction)."
Write-Host " Temporarily allowing anonymous access for schema registration; original setting will be restored afterwards..."
az containerapp auth update -g $RESOURCE_GROUP -n $CONTAINER_API_APP_NAME --unauthenticated-client-action AllowAnonymous -o none 2>$null
$ApiAuthOriginalAction = $AuthAction
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Sorry, something went wrong.
| } else { | ||
| $SUBSCRIPTION_ID = $SubscriptionId | ||
| } | ||
|
|
||
| $RESOURCE_GROUP = $ResourceGroupName | ||
|
|
| Back | FazBrowse Home | New Git URL |
Purpose
This PR fixed post deployment script to pass RG as paramter for AVM deployment
Does this introduce a breaking change?
Golden Path Validation
Deployment Validation
What to Check
Verify that the following are valid
Other Information