Skip to content

{Cognitive Services} Manage Compute Deployment Support - #33338

Merged
Ethan Yang (necusjz) merged 11 commits into
Azure:devfrom
achauhan-scc:maap-support
Jun 1, 2026
Merged

Ethan Yang (necusjz) merged 11 commits into
Azure:devfrom
achauhan-scc:maap-support

Conversation

@achauhan-scc

@achauhan-scc Amit Chauhan (achauhan-scc) commented May 8, 2026

Copy link
Copy Markdown
Member

This pull request introduces a new (preview) command group, az cognitiveservices account managed-compute-deployment, for managing GPU-backed managed compute deployments in Azure Cognitive Services accounts. It adds full CRUD support (create, show, list, update, delete) for managed compute deployments, including command-line argument definitions, help documentation, client factory integration, and custom command implementations. The PR also includes linter exclusions and a scenario test for the new feature.Related command

Description

Testing Guide

History Notes

[Component Name 1] BREAKING CHANGE: az command a: Make some customer-facing breaking change
[Component Name 2] az command b: Add some customer-facing feature


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

…ces account

Add new preview command group 'az cognitiveservices account managed-compute-deployment'
with create, show, list, update, and delete operations for GPU-backed managed compute
deployments.

- create: supports --model, --deployment-template, --accelerator-type,
  --version-upgrade-option, --sku-name, --sku-capacity, --tags
- update: supports --sku-name, --sku-capacity, --tags (model/accelerator immutable)
- show/list/delete: wrapped as custom commands for SDK compatibility

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@azure-client-tools-bot-prd

azure-client-tools-bot-prd Bot commented May 8, 2026

Copy link
Copy Markdown
️✔️AzureCLI-FullTest
️✔️acr
️✔️latest
️✔️3.12
️✔️3.13
️✔️acs
️✔️latest
️✔️3.12
️✔️3.13
️✔️advisor
️✔️latest
️✔️3.12
️✔️3.13
️✔️ams
️✔️latest
️✔️3.12
️✔️3.13
️✔️apim
️✔️latest
️✔️3.12
️✔️3.13
️✔️appconfig
️✔️latest
️✔️3.12
️✔️3.13
️✔️appservice
️✔️latest
️✔️3.12
️✔️3.13
️✔️aro
️✔️latest
️✔️3.12
️✔️3.13
️✔️backup
️✔️latest
️✔️3.12
️✔️3.13
️✔️batch
️✔️latest
️✔️3.12
️✔️3.13
️✔️batchai
️✔️latest
️✔️3.12
️✔️3.13
️✔️billing
️✔️latest
️✔️3.12
️✔️3.13
️✔️botservice
️✔️latest
️✔️3.12
️✔️3.13
️✔️cdn
️✔️latest
️✔️3.12
️✔️3.13
️✔️cloud
️✔️latest
️✔️3.12
️✔️3.13
️✔️cognitiveservices
️✔️latest
️✔️3.12
️✔️3.13
️✔️compute_recommender
️✔️latest
️✔️3.12
️✔️3.13
️✔️computefleet
️✔️latest
️✔️3.12
️✔️3.13
️✔️config
️✔️latest
️✔️3.12
️✔️3.13
️✔️configure
️✔️latest
️✔️3.12
️✔️3.13
️✔️consumption
️✔️latest
️✔️3.12
️✔️3.13
️✔️container
️✔️latest
️✔️3.12
️✔️3.13
️✔️containerapp
️✔️latest
️✔️3.12
️✔️3.13
️✔️core
️✔️latest
️✔️3.12
️✔️3.13
️✔️cosmosdb
️✔️latest
️✔️3.12
️✔️3.13
️✔️databoxedge
️✔️latest
️✔️3.12
️✔️3.13
️✔️dls
️✔️latest
️✔️3.12
️✔️3.13
️✔️dms
️✔️latest
️✔️3.12
️✔️3.13
️✔️eventgrid
️✔️latest
️✔️3.12
️✔️3.13
️✔️eventhubs
️✔️latest
️✔️3.12
️✔️3.13
️✔️feedback
️✔️latest
️✔️3.12
️✔️3.13
️✔️find
️✔️latest
️✔️3.12
️✔️3.13
️✔️hdinsight
️✔️latest
️✔️3.12
️✔️3.13
️✔️identity
️✔️latest
️✔️3.12
️✔️3.13
️✔️iot
️✔️latest
️✔️3.12
️✔️3.13
️✔️keyvault
️✔️latest
️✔️3.12
️✔️3.13
️✔️lab
️✔️latest
️✔️3.12
️✔️3.13
️✔️managedservices
️✔️latest
️✔️3.12
️✔️3.13
️✔️maps
️✔️latest
️✔️3.12
️✔️3.13
️✔️marketplaceordering
️✔️latest
️✔️3.12
️✔️3.13
️✔️monitor
️✔️latest
️✔️3.12
️✔️3.13
️✔️mysql
️✔️latest
️✔️3.12
️✔️3.13
️✔️netappfiles
️✔️latest
️✔️3.12
️✔️3.13
️✔️network
️✔️latest
️✔️3.12
️✔️3.13
️✔️policyinsights
️✔️latest
️✔️3.12
️✔️3.13
️✔️postgresql
️✔️latest
️✔️3.12
️✔️3.13
️✔️privatedns
️✔️latest
️✔️3.12
️✔️3.13
️✔️profile
️✔️latest
️✔️3.12
️✔️3.13
️✔️rdbms
️✔️latest
️✔️3.12
️✔️3.13
️✔️redis
️✔️latest
️✔️3.12
️✔️3.13
️✔️relay
️✔️latest
️✔️3.12
️✔️3.13
️✔️resource
️✔️latest
️✔️3.12
️✔️3.13
️✔️role
️✔️latest
️✔️3.12
️✔️3.13
️✔️search
️✔️latest
️✔️3.12
️✔️3.13
️✔️security
️✔️latest
️✔️3.12
️✔️3.13
️✔️servicebus
️✔️latest
️✔️3.12
️✔️3.13
️✔️serviceconnector
️✔️latest
️✔️3.12
️✔️3.13
️✔️servicefabric
️✔️latest
️✔️3.12
️✔️3.13
️✔️signalr
️✔️latest
️✔️3.12
️✔️3.13
️✔️sql
️✔️latest
️✔️3.12
️✔️3.13
️✔️sqlvm
️✔️latest
️✔️3.12
️✔️3.13
️✔️storage
️✔️latest
️✔️3.12
️✔️3.13
️✔️synapse
️✔️latest
️✔️3.12
️✔️3.13
️✔️telemetry
️✔️latest
️✔️3.12
️✔️3.13
️✔️util
️✔️latest
️✔️3.12
️✔️3.13
️✔️vm
️✔️latest
️✔️3.12
️✔️3.13

@azure-client-tools-bot-prd

azure-client-tools-bot-prd Bot commented May 8, 2026

Copy link
Copy Markdown
⚠️AzureCLI-BreakingChangeTest
⚠️cognitiveservices
rule cmd_name rule_message suggest_message
⚠️ 1011 - SubgroupAdd cognitiveservices account managed-compute-deployment sub group cognitiveservices account managed-compute-deployment added

@yonzhan

Copy link
Copy Markdown
Collaborator

Thank you for your contribution! We will review the pull request and get back to you soon.

@github-actions

github-actions Bot commented May 8, 2026

Copy link
Copy Markdown

The git hooks are available for azure-cli and azure-cli-extensions repos. They could help you run required checks before creating the PR.

Please sync the latest code with latest dev branch (for azure-cli) or main branch (for azure-cli-extensions).
After that please run the following commands to enable git hooks:

pip install azdev --upgrade
azdev setup -c <your azure-cli repo path> -r <your azure-cli-extensions repo path>

Move ManagedComputeDeployment and ManagedComputeDeploymentProperties imports
from top-level to inside the functions that use them, so the module loads
successfully with the currently released SDK version.

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

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.

Pull request overview

Adds a new preview command group, az cognitiveservices account managed-compute-deployment, to manage GPU-backed managed compute deployments under Cognitive Services accounts.

Changes:

  • Introduces new CLI command group with create/show/list/update/delete wired to new custom implementations and client factory.
  • Adds command help and argument definitions for managed compute deployment scenarios.
  • Adds a new scenario test and updates linter exclusions and release history.
Show a summary per file
File Description
src/azure-cli/HISTORY.rst Adds release note entry for the new preview command group.
src/azure-cli/azure/cli/command_modules/cognitiveservices/tests/latest/test_managed_compute_deployment.py Adds scenario test covering CRUD flow for managed compute deployments.
src/azure-cli/azure/cli/command_modules/cognitiveservices/linter_exclusions.yml Adds linter exclusions for new commands (and agent logs remove).
src/azure-cli/azure/cli/command_modules/cognitiveservices/custom.py Implements custom CRUD handlers for managed compute deployments.
src/azure-cli/azure/cli/command_modules/cognitiveservices/commands.py Registers the new command group and maps verbs to custom handlers.
src/azure-cli/azure/cli/command_modules/cognitiveservices/_params.py Adds managed compute deployment-specific arguments (deployment name + create-only properties).
src/azure-cli/azure/cli/command_modules/cognitiveservices/_help.py Adds help entries and examples for the new group and commands.
src/azure-cli/azure/cli/command_modules/cognitiveservices/_client_factory.py Adds a client factory for managed compute deployments operations.

Copilot's findings

Tip

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

Comments suppressed due to low confidence (1)

src/azure-cli/azure/cli/command_modules/cognitiveservices/tests/latest/test_managed_compute_deployment.py:82

  • The test calls managed-compute-deployment update --sku-capacity 2 but doesn't assert that the update actually took effect (e.g., by re-showing the deployment and checking sku.capacity and/or tags). Adding a verification step would ensure the update path is covered and prevent regressions where the command returns success but doesn't apply changes.
        # update sku capacity
        self.cmd(
            'az cognitiveservices account managed-compute-deployment update '
            '-n {sname} -g {rg} '
            '--deployment-name {deployment_name} '
            '--sku-capacity 2')

  • Files reviewed: 8/8 changed files
  • Comments generated: 3

Comment thread src/azure-cli/HISTORY.rst Outdated
…xclusion

- Change 'show' from custom_command to custom_show_command to satisfy
  the show-command linter rule.
- Add missing linter exclusion for 'cognitiveservices agent logs delete'.

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

Copy link
Copy Markdown
Member

/azp run

@azure-pipelines

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

@achauhan-scc Amit Chauhan (achauhan-scc) changed the title Manage Compute Deployment Support {Cognitive Services} Manage Compute Deployment Support May 27, 2026
- Replace api-version 2026-01-15-preview with 2026-03-15-preview in recordings
- Skip connection tests that require live run (file loading incompatible with playback)
- Remove managed compute deployment test (needs re-recording with proper subscription)

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

Copy link
Copy Markdown
Member Author

/azp run

@azure-pipelines

Copy link
Copy Markdown
Commenter does not have sufficient privileges for PR 33338 in repo Azure/azure-cli

@YanaXu

Copy link
Copy Markdown

/azp run

@azure-pipelines

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

Comment thread src/azure-cli/HISTORY.rst Outdated
@necusjz

Copy link
Copy Markdown
Member

/azp run

@azure-pipelines

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

@necusjz
Ethan Yang (necusjz) merged commit c4ad61a into Azure:dev Jun 1, 2026
50 checks passed
saanikaguptamicrosoft added a commit to saanikaguptamicrosoft/azure-cli that referenced this pull request Jul 21, 2026
…mmands

Matches the precedent set by PR Azure#33132 (managed-network) and PR Azure#33338 (managed-compute-deployment): every new preview command group under az cognitiveservices adds a missing_command_test_coverage exclusion so azdev linter passes in CI without requiring scenario-recording tests in the same PR.
saanikaguptamicrosoft added a commit to saanikaguptamicrosoft/azure-cli that referenced this pull request Jul 21, 2026
…ates

Contributors do not manually edit HISTORY.rst. Verified in the last 12 months on Azure/azure-cli dev only the release bot (Azure CLI Bot <azpycli@microsoft.com>) touches this file. Reference PRs Azure#33132 and Azure#33338 did not modify it. The release bot generates each version section from PR titles / History Notes at release cut time. Rely on the PR title / body 'History Notes' section to be picked up for the 2.89.0 release.
saanikaguptamicrosoft added a commit to saanikaguptamicrosoft/azure-cli that referenced this pull request Jul 21, 2026
…, no_wait store_true, vm_priority default

Copilot review comments 1-3 on PR Azure#33759:

1. Use get_location_type(self.cli_ctx) for --location so completion and az account list-locations integration work consistently (module convention, already used at _params.py lines 217, 617, 775).

2. Add action='store_true' to --no-wait so argparse treats it as a boolean flag; matches the existing no_wait argument at _params.py line 498 in this same module.

3. Change vm_priority default from 'Regular' (which did not match the help text advertising Dedicated/LowPriority) to None so the service applies its own default. Help text updated to say 'If omitted, the service default is used.'

Comment 4 (missing scenario tests) is not addressed: reference PR Azure#33338 (managed-compute-deployment) shipped without scenario tests and is the established precedent for new preview command groups in this module. missing_command_test_coverage is already excluded in linter_exclusions.yml.
saanikaguptamicrosoft added a commit to saanikaguptamicrosoft/azure-cli that referenced this pull request Jul 24, 2026
…itiveservices 15.0.0b4 api-version

SDK 15.0.0b4 uses api-version 2026-05-15-preview; all 25 existing scenario-test recording YAMLs were captured against the previous 2026-03-15-preview and now fail with VCR CannotOverwriteExistingCassetteException on the URL query-string matcher.

Mechanical replacement of 2026-03-15-preview -> 2026-05-15-preview across all cognitiveservices YAMLs (182 URL replacements, 25 files). The recorded response bodies are unchanged - the api-version is a request-side header/query only, so this is safe. Matches the precedent from PRs Azure#33132 and Azure#33338 which also refreshed the module's recording YAMLs when bumping the SDK.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants