Skip to content

chore: Dev merge to main#579

Open
Shreyas-Microsoft wants to merge 14 commits intomainfrom
dev
Open

chore: Dev merge to main#579
Shreyas-Microsoft wants to merge 14 commits intomainfrom
dev

Conversation

@Shreyas-Microsoft
Copy link
Copy Markdown
Collaborator

@Shreyas-Microsoft Shreyas-Microsoft commented May 8, 2026

Purpose

This pull request updates the deployment to use a unified Azure AI Services account for both OpenAI and Content Understanding (CU), and removes the separate CU location parameter. It also improves documentation and workflow notification handling to reflect these changes and clarifies region requirements and troubleshooting steps.

Unified AI Services account and parameter simplification:

  • Removed the contentUnderstandingLocation parameter from infra/main.bicep and deployment workflows, consolidating Content Understanding and OpenAI under a single AI Services account and location (azureAiServiceLocation). [1] [2]
  • Updated allowed regions for azureAiServiceLocation to only include those supporting both GPT-5.1 (GlobalStandard) and Content Understanding GA, and clarified this requirement in documentation and metadata. [1] [2]

Documentation updates:

  • Updated CustomizingAzdParameters.md, LocalDevelopmentSetup.md, and TroubleShootingSteps.md to reflect the unified AI Services account, new region list, and changed resource naming conventions (e.g., aif-<suffix> for AI Services). [1] [2] [3] [4]
  • Added a region compatibility warning to the AI Foundry project reuse guide.

Workflow and notification improvements:

  • Enhanced the Bicep parameter validation workflow to generate HTML email bodies and improved notification handling, ensuring emails use the new output and are sent with better context. [1] [2] [3]

Role assignment updates:

  • Added Cognitive Services User role assignments for both the main and workflow container app managed identities on the unified AI Services account, ensuring proper access for Content Understanding.

Minor fixes:

  • Fixed relative links in documentation for consistency. [1] [2]

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

NirajC-Microsoft and others added 13 commits May 6, 2026 09:57
…ervices account

Migrate Azure AI Content Understanding from 2024-12-01-preview to GA
2025-11-01 (ADO 41641), and consolidate the standalone Content
Understanding Cognitive Services account into the existing unified
Azure AI Services account (now hosting both Azure OpenAI and CU).

Infra
- Drop avmAiServices_cu module, contentUnderstandingPrivateEndpoint,
  and the contentUnderstandingLocation parameter from main.bicep and
  main_custom.bicep; mirror the changes in main.json.
- Restrict azureAiServiceLocation @Allowed to the 11-region
  intersection where both CU GA and gpt-5.1 GlobalStandard are
  available.
- Add two Cognitive Services User role assignments (API and Workflow
  managed identities) on the unified account so CU calls don't 403.
- Re-route APP_CONTENT_UNDERSTANDING_ENDPOINT to the unified account.
- Drop AZURE_ENV_CU_LOCATION mapping from main.parameters.json and
  main.waf.parameters.json.
- Remove contentUnderstandingLocation override from
  .github/workflows/deploy.yml.

Application code
- Bump api-version to 2025-11-01 and switch to the GA REST surface:
  :analyzeBinary for stream payloads, knowledgeSources[] for training
  data, and /files/{id} for figure retrieval.
- Update Pydantic models for GA: add Warning, relax Page optionals
  (angle/spans/words/lines), and surface the new top-level
  DocumentContent.paragraphs field.
- Add unit tests for the new Warning model and relaxed Page
  optionals; bump existing apiVersion fixtures.

Docs
- CustomizingAzdParameters.md: drop AZURE_ENV_CU_LOCATION row, rewrite
  AZURE_ENV_AI_SERVICE_LOCATION row, and append a usageName note for
  the Standard deployment type.
- LocalDevelopmentSetup.md: replace stale aicu-{suffix} reference.
- TroubleShootingSteps.md: update the CU 403 row for the consolidated
  account name and DNS zones.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Replace /docs/re-use-*.md with relative paths so the lychee link
checker resolves them. Pre-existing links flagged on this PR because
the file was modified by the GA migration commit.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The existing Foundry must support both gpt-5.1 (GlobalStandard) and Content Understanding GA, otherwise deployment will fail with downstream model/analyzer errors.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Deploy may fail at provisioning time for unsupported gpt-5.1 region, or appear to succeed but break at runtime when Content Understanding GA is unavailable in the existing Foundry's region.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…oject.md

Lychee CI rejects root-relative paths when no base dir is configured. Switch to relative ./DeploymentGuide.md paths matching the fix already applied to CustomizingAzdParameters.md.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Align the listed regions with the @Allowed list enforced by
infra/main.bicep and infra/main_custom.bicep for the unified AI
Services account (japaneast, southeastasia, uksouth added;
northcentralus, switzerlandnorth, westus2 removed).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Replace Optional[...] = None and mutable [] defaults on Page.spans,
Page.words, DocumentContent.paragraphs, and ResultData.warnings with
Field(default_factory=list). Removes a possible TypeError when the
confidence evaluator iterates page.words and aligns with the repo's
Pydantic convention. Tests updated to assert empty-list defaults.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Pre-existing Optional[List[...]] = [] defaults silently parsed an
explicit JSON null to None, which would cause a TypeError when the
confidence evaluator iterates page.lines (line 132). Switch to the
same Field(default_factory=list) pattern used for the other Page
collections so these fields fail loudly at parse time on a malformed
response and remain safe to iterate at every call site.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
chore: Bicep Parameter validation email format change
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Enhances the Bicep parameter validation workflow to generate a structured HTML report (in addition to JSON/log output) and uses that HTML as the email body for scheduled run notifications, improving readability and consistency of validation reporting.

Changes:

  • Added HTML report generation to validate_bicep_params.py and new CLI flags to control HTML output and include contextual metadata (accelerator name, run URL).
  • Updated the GitHub Actions workflow to generate/upload the HTML report artifact and send it as the notification email body for scheduled runs.

Reviewed changes

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

File Description
infra/scripts/validate_bicep_params.py Adds HTML email report generation + CLI arguments and writes the report to disk when requested.
.github/workflows/validate-bicep-params.yml Passes accelerator/run context to the script, uploads the HTML artifact, and uses it as the notification email body.

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

Comment on lines 39 to +45
set +e
python infra/scripts/validate_bicep_params.py --dir infra --strict --no-color --json-output infra_results.json 2>&1 | tee infra_output.txt
RUN_URL="https://github.com/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_RUN_ID}"
python infra/scripts/validate_bicep_params.py --dir infra --strict --no-color \
--json-output infra_results.json \
--html-output email_body.html \
--accelerator-name "${ACCELERATOR_NAME}" \
--run-url "${RUN_URL}" 2>&1 | tee infra_output.txt
Comment on lines +348 to +355
def _html_escape(text: str) -> str:
"""Escape HTML special characters."""
return (
text.replace("&", "&amp;")
.replace("<", "&lt;")
.replace(">", "&gt;")
.replace('"', "&quot;")
)
refactor: Migrate Content Understanding from preview to GA and consolidate AI Services account
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 8, 2026

Coverage

Coverage Report •
FileStmtsMissCoverMissing
libs/azure_helper/model
   content_understanding.py92297%71, 94
TOTAL121716186% 

Tests Skipped Failures Errors Time
244 0 💤 0 ❌ 0 🔥 4.698s ⏱️

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.

5 participants