Skip to content

Fix Video Indexer deployer region, app permissions, and settings erasure - #1667

Merged
Paul Lizer (paullizer) merged 3 commits into
paullizer-react-v2-uifrom
paullizer-video-indexer-configuration-investigatio
Oct 6, 2026
Merged

Paul Lizer (paullizer) merged 3 commits into
paullizer-react-v2-uifrom
paullizer-video-indexer-configuration-investigatio

Conversation

@paullizer

Copy link
Copy Markdown
Contributor

Summary

Azure Video Indexer is not offered in every region, and the deployers had no way to place it anywhere but the app region, so deployVideoIndexerService=true failed the whole deployment in regions such as North Central US. Deployer-created accounts also never granted the App Service identity access to generateAccessToken, and postconfig.py blanked manually entered Video Indexer settings on every provision that did not deploy Video Indexer. The result was an AI Video Intelligence section stuck at Needs configuration with no account behind it.

  • Region override: VIDEO_INDEXER_LOCATION / videoIndexerLocation (azd and Bicep), param_video_indexer_location (Terraform), and $param_VideoIndexerLocation (Azure CLI). They default to the app region. A different region also gets <appName><environment>vi, a Standard GPv2 storage account in the Video Indexer region. The azd preprovision hook now stops before provisioning and lists the supported regions when the target region lacks Video Indexer.
  • App access: the App Service system-assigned identity gets Video Indexer Account Contributor in Azure Commercial and Contributor in Azure Government and custom clouds, regardless of authenticationType. In Bicep this lives in the new modules/setVideoIndexerPermissions.bicep, which also takes over the existing Video Indexer storage grant. The native Python app, Terraform, and the Azure CLI deployer (check-then-create) get the same grant.
  • Settings: postconfig.py writes Video Indexer settings only when the deployment created the account, and uses the account's own region from the new var_videoIndexerLocation output.
  • Terraform: reads the azapi 2.x output object directly instead of passing it through jsondecode(), and adds account name, ID, and region outputs for Admin Settings.

Notes for review:

  • The least-privilege role in Azure Commercial also avoids RoleAssignmentExists for environments where admins already added Contributor by hand. In Azure Government and custom clouds the newer role is not confirmed, so Contributor is used. An existing manual Contributor grant at the account scope there must be adopted; the READMEs document this the same way as the Key Vault Officer change.
  • The Video Indexer storage assignment moved modules, but its guid() inputs are unchanged, so existing deployments see a no-op.
  • The dedicated storage uses publicNetworkAccess: Enabled with defaultAction: Deny under private networking. Video Indexer reaches firewalled storage as a trusted Azure service, which a disabled public endpoint would block. SimpleChat uploads video to the Video Indexer API and never reads this account, so it needs no private endpoint.
  • An existing Video Indexer account cannot move regions; this is documented.
  • main.json was regenerated with Bicep 0.44.1, the same version that generated the previous file.

Linked issue

Fixes #1666

Release Notes & Latest Features

  • New Feature
  • Bug Fix
  • UI Enhancement
  • Breaking Change
  • Internal only

Is this visible to end users?

  • Yes
  • No

Is this admin-facing (Admin Settings, governance, deployment, config)?

  • Yes
  • No

Should this become a Latest Feature card?

  • Yes
  • No
  • Already added

Screenshot needed for the card?

  • Yes
  • No
  • Attached

Version bump

  • application/single_app/config.py VERSION third segment bumped, or not needed because this is docs-only (0.261.259 to 0.261.260)
  • deployers/version.txt bumped, or not needed because deployers/ was not changed (1.0.32 to 1.0.33)

Testing / validation

  • python functional_tests/test_video_indexer_deployment_region_permissions.py: passed, 10/10.
  • python -m pytest functional_tests/test_video_indexer_deployment_region_permissions.py functional_tests/test_deployment_configuration.py functional_tests/test_azd_windows_hook_environment.py functional_tests/test_deployer_key_vault_secret_permissions.py functional_tests/test_postconfig_redis_cache_configuration.py: passed, 53 tests and 33 subtests. The two new postconfig tests fail when run against the previous postconfig.py, which confirms they cover the regression.
  • Twelve related deployer and Video Indexer test files report the same 11 failures on a clean HEAD and on this branch, so none are new. They are pre-existing exact-version pins and checks unrelated to this change.
  • az bicep build --file .\deployers\bicep\main.bicep --outfile .\deployers\bicep\main.json (Bicep 0.44.1): no errors or warnings. The changed modules also build cleanly on their own.
  • terraform fmt -check: passed. terraform init -backend=false and terraform validate with Terraform 1.12.2 and the required providers: passed.
  • PowerShell parser check of deployers/azurecli/deploy-simplechat.ps1: no errors.
  • python functional_tests/test_docs_app_surface_coverage.py: passed, 7/7. python functional_tests/test_docs_site_quality.py: passed, 6/6. The regenerated docs inventory is unchanged.
  • Live preflight against Azure: blocks northcentralus with the supported-region list, and passes with VIDEO_INDEXER_LOCATION=centralus.
  • Applied the fixed modules to the affected North Central US environment. what-if showed only new resources. The deployment created the Video Indexer account in Central US with its same-region storage account and the app, storage, and Azure OpenAI role assignments. ARM generateAccessToken and a Video Indexer API call using the new account ID and centralus both succeeded.

Documentation

  • Release notes updated, or not needed (v0.261.260 Bug Fixes entry)
  • Feature documentation updated, or not needed (not needed; this is a fix)
  • Fix documentation updated, or not needed (docs/explanation/fixes/VIDEO_INDEXER_DEPLOYMENT_REGION_AND_PERMISSIONS_FIX.md)

Also updated: deployers/bicep/README.md, deployers/terraform/ReadMe.md, docs/deploy/manual/provision-azure-resources.md, and docs/admin/knowledge.md.

Security checklist

  • New Flask routes include @swagger_route(security=get_auth_security()) (N/A: no routes changed)
  • Settings sent to non-admin frontends use sanitize_settings_for_user() (N/A: no frontend settings changes)
  • Browser JavaScript is served from local SimpleChat static assets only; no CDN-hosted JS (N/A: no browser JavaScript changes)
  • No secrets, keys, connection strings, or local-only artifacts are included

Paul Lizer (paullizer) and others added 3 commits October 6, 2026 14:40
Video Indexer is not offered in every region (for example northcentralus), and the
deployers had no way to place it elsewhere, so enabling it failed the deployment.
Deployer-created accounts also never granted the App Service identity access to
generateAccessToken, and postconfig blanked manual Video Indexer settings on every
provision that did not deploy Video Indexer.

- Add videoIndexerLocation (azd VIDEO_INDEXER_LOCATION), param_video_indexer_location
  and $param_VideoIndexerLocation; a different region gets same-region GPv2 storage.
- Fail fast in the azd preprovision hook when the region lacks Video Indexer.
- Grant the app identity Video Indexer Account Contributor (Contributor outside Azure
  Commercial) via the new setVideoIndexerPermissions module; keep the existing
  Video Indexer storage assignment name.
- Write Video Indexer settings in postconfig only when the deployment created the
  account, using the account's own region.
- Read azapi 2.x output directly in Terraform and add Video Indexer outputs.
- Bump app version to 0.261.260 and deployer version to 1.0.33.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Refs #1666

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…Indexer deployer fix to 0.261.264

Resolve the config.py VERSION, release notes, and fixes index conflicts. The base
already used 0.261.260 through 0.261.263, so this fix moves to 0.261.264 in its
release notes section, fix document, deployer READMEs, preflight script header, and
test headers. The base's own 0.261.260 Web Search entry is unchanged. Deployer
version stays 1.0.33 because no incoming commit changed deployers/.

Refs #1666

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@paullizer
Paul Lizer (paullizer) merged commit 90aee34 into paullizer-react-v2-ui Oct 6, 2026
10 checks passed
Paul Lizer (paullizer) added a commit that referenced this pull request Oct 6, 2026
… Enhanced Extraction section to 0.261.265

Resolve the conflicts with paullizer-react-v2-ui, keeping both sides:

- config.py: VERSION 0.261.265, after 0.261.264 on the base.
- release_notes.md: this change on top as v0.261.265.
- SettingsSection.tsx: pass both fieldsByKey (#1662) and runtimeFlags to
  isFieldVisible; the open_until_set reader passes fieldsByKey too.
- test_v2_admin_section_logic.ts: both header lines, both imports and both
  sets of appended checks.
- test_v2_admin_capability_placement.py: header version.

#1662 renamed readDependencyValue to readSettingValue, which the text merge
did not flag, so applyEnableEffect now calls readSettingValue.

Renumber this change's own 0.261.260 references to 0.261.265. The base's
0.261.260 (the Web Search nested settings fix) is unchanged.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Paul Lizer (paullizer) added a commit that referenced this pull request Oct 6, 2026
…ber the File Sync single card to 0.261.266

Keep both sides of each conflict: the group `anchor` descriptor alongside
`open_until_set`, both new vocabulary and section-logic checks, and both
Knowledge doc entries. Anchored panels and their placement now pass the
field index and runtime flags, and use the open-until-set group reader,
the same way the base's card body does.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Paul Lizer (paullizer) added a commit that referenced this pull request Oct 6, 2026
, #1671, #1674) and renumber the Operations settings parity to 0.261.269

Conflict resolutions:
- admin_settings_fields.py: keep the full Operations block. The Application
  Insights and Health Check declarations #1670 added beside Appearance are
  superseded by it, and its mixed-source telemetry switch moves into the
  Operations Application Insights section, after the global logging readouts.
  Keep #1668's on_enable documentation and both sides' V2_ONLY_FIELDS entries.
- route_backend_v2.py: fold content_understanding_supported into
  _build_runtime_flags.
- SettingsSection.tsx, AdminSettingsPage.tsx, adminFields.ts: keep both the
  section guide and runtimeFlags props, and on_enable beside the Operations
  field properties.
- operations.md, release_notes.md and tests: keep both sides. Both
  enable_dai_debug and enable_mixed_source_development_telemetry are documented
  rather than exempted, and Workspaces and Operations are both fully described.
- Renumber this branch's 0.261.260 references to 0.261.269; the base's own
  0.261.260 Web Search fix references are unchanged.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Paul Lizer (paullizer) added a commit to paullizer/simplechat that referenced this pull request Oct 7, 2026
…rosoft#1665, microsoft#1667, microsoft#1668) and renumber the mixed-source settings fix to 0.261.266

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
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.

1 participant