Skip to content

[Cognitive Services] az cognitiveservices account create: Refine BYO AKS preflight and provisioning - #34408

Merged
Yeming Liu (isra-fel) merged 9 commits into
Azure:devfrom
jessiezhu-m:jessiezhu/byo-aks-preflight
Nov 23, 2026
Merged

Yeming Liu (isra-fel) merged 9 commits into
Azure:devfrom
jessiezhu-m:jessiezhu/byo-aks-preflight

Conversation

@jessiezhu-m

@jessiezhu-m jessie zhu (jessiezhu-m) commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

🤖 PR Validation — ️✔️ All clear

Breaking Changes Tests Suppressions
️✔️ None ️✔️ 130/130 ️✔️ None

Related command

az cognitiveservices account create

Description

Refine BYO AKS preflight validation and dependency provisioning for az cognitiveservices account create (follow-up to #34303):

  • Support Azure CNI Pod Subnet in addition to Azure CNI Overlay, verify kubelet identity objectId, and remove capacity, SSH, and Succeeded-state preflight checks.
  • Remove shared-key, public-access, and network-baseline preflight checks on user-supplied Storage accounts.
  • Simplify Managed Identity RBAC checks and reuse to match inherited built-in roles via atScope(), without pre-checking caller write permissions.
  • Append the deterministic 10-character account hash suffix to auto-generated Managed Identity names.
  • Consolidate preflight failures into a single ValidationError with a documentation link, and streamline provisioning logs to use short resource names.

Testing Guide

  • pytest (test_agent_hosting.py, test_agent_hosting_preparation.py): passed (74 passed, 130 subtests passed).
  • azdev style cognitiveservices: passed (Pylint and Flake8).
  • Live CLI validation against Azure AKS: verified preflight error output, auto-provisioning, dependency reuse, and existing-account checks.

History Notes


This checklist is used to make sure that common guidelines for a pull request are followed.

@microsoft-github-policy-service microsoft-github-policy-service Bot added the customer-reported Issues that are reported by GitHub users external to the Azure organization. label Nov 12, 2026
@microsoft-github-policy-service

Copy link
Copy Markdown
Contributor

Thank you for your contribution jessie zhu (@jessiezhu-m)! We will review the pull request and get back to you soon.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

The BYO AKS preflight and managed-identity validation updates have no active review issues.

No open issues 🎉

What changed in this PR

Refines BYO AKS preflight checks for az cognitiveservices account create, following the initial support added in #34303 and aligning validation with updated onboarding requirements.

Changes:

  • Adds Azure CNI Pod Subnet support and kubelet identity validation while removing selected AKS readiness, capacity, SSH, and supplied-Storage checks.
  • Simplifies managed-identity role validation and reuse to accept inherited built-in roles, and defers caller authorization to ARM operations.
  • Streamlines verbose logging, removes the Compute client dependency, and updates regression tests.
File Description
src/​azure-cli/​azure/​cli/​command_modules/​cognitiveservices/​tests/​latest/​test_agent_hosting_preparation.py Updates coverage for revised preflight checks, inherited roles, and conflict handling.
src/​azure-cli/​azure/​cli/​command_modules/​cognitiveservices/​_client_factory.py Removes the unused Compute management client.
src/​azure-cli/​azure/​cli/​command_modules/​cognitiveservices/​_agent_hosting.py Reuses qualifying inherited roles while retaining exact conflict verification.
src/​azure-cli/​azure/​cli/​command_modules/​cognitiveservices/​_agent_hosting_preflight.py Revises AKS, Storage, and role checks and simplifies diagnostic output.

Review effort: Balanced

@yonzhan

Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 3 pipeline(s).

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@jessiezhu-m

Copy link
Copy Markdown
Contributor Author

Yong Zhang (@yonzhan) The breaking change is not related to this pr, I've updated the branch. Could you help rerun the check?

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

Copy link
Copy Markdown
Collaborator

/azp run

@yonzhan
Yong Zhang (yonzhan) requested a review from a team November 16, 2026 11:29
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 3 pipeline(s).

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

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@jessiezhu-m jessie zhu (jessiezhu-m) changed the title [Cognitive Services] az cognitiveservices account create: Refine BYO AKS preflight checks [Cognitive Services] az cognitiveservices account create: Refine BYO AKS preflight and provisioning Nov 17, 2026
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@jessiezhu-m

Copy link
Copy Markdown
Contributor Author

Yong Zhang (@yonzhan) could your team help review this pr? We target to catch up the upcoming 12/1 release.

@yonzhan

Copy link
Copy Markdown
Collaborator

@act-identity-squad will help with

@isra-fel
Yeming Liu (isra-fel) merged commit df6c9c0 into Azure:dev Nov 23, 2026
52 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

act-experience-enablement-squad act-observability-squad AKS az aks/acs/openshift Auto-Assign Auto assign by bot Backup Cognitive Services az cognitiveservices customer-reported Issues that are reported by GitHub users external to the Azure organization.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants