Skip to content

Manage Compute Deployment Support#33338

Draft
achauhan-scc wants to merge 3 commits intoAzure:devfrom
achauhan-scc:maap-support
Draft

Manage Compute Deployment Support#33338
achauhan-scc wants to merge 3 commits intoAzure:devfrom
achauhan-scc:maap-support

Conversation

@achauhan-scc
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.

achauhan-scc and others added 2 commits May 8, 2026 14:35
…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>
Copilot AI review requested due to automatic review settings May 8, 2026 09:15
@azure-client-tools-bot-prd
Copy link
Copy Markdown

Validation for Azure CLI Full Test Starting...

Thanks for your contribution!

@azure-client-tools-bot-prd
Copy link
Copy Markdown

Validation for Breaking Change Starting...

Thanks for your contribution!

@yonzhan
Copy link
Copy Markdown
Collaborator

yonzhan commented May 8, 2026

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

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 8, 2026

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>
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

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
* `az cognitiveservices agent logs show`: Add console log streaming for hosted agents (#32701)
* `az cognitiveservices agent create`: Add `--show-logs` flag for deployment troubleshooting (#32701)
* `az cognitiveservices agent start`: Add `--show-logs` and `--timeout` flags (#32701)
* [PREVIEW] `az cognitiveservices account managed-compute-deployment`: Add new command group for managing GPU-backed managed compute deployments with create, show, list, update, and delete operations
Comment on lines +686 to +688
c.argument('version_upgrade_option', options_list=['--version-upgrade-option'],
help='Version upgrade policy. Allowed values: OnceNewDefaultVersionAvailable, '
'OnceCurrentVersionExpired, NoAutoUpgrade.')
Comment on lines +12 to +16
class CognitiveServicesManagedComputeDeploymentTests(ScenarioTest):
@serial_test()
@ResourceGroupPreparer()
def test_cognitiveservices_managed_compute_deployment(self, resource_group):
sname = self.create_random_name(prefix='cs_cli_test_', length=16)
@yonzhan yonzhan assigned necusjz and unassigned kairu-ms May 8, 2026
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.

6 participants