Skip to content

az ml online-endpoint create / online-deployment create fails if it already exists #23496

@bachlean

Description

@bachlean

az feedback auto-generates most of the information requested below, as of CLI version 2.0.62

Related command
az ml online-endpoint create ...
az ml online-deployment create ...

Describe the bug
Command fails (and with it, corresponding Tasks in AzureDevops Pipelines) despite the documentation stating:

[online-endpoint] To create an endpoint, provide a YAML file with batch endpoint configuration. If the endpoint already exists, it will be over-written with the new settings.
[online-deployment] Create a deployment. If the deployment already exists, it will be over-written with the new settings.

This is extremely annoying, because it forces you to include a separate check and an if/else construct for create/update when trying to automate.

To Reproduce
create the same endpoint/deployment twice in a row
az ml online-endpoint create -w <MLWS_NAME> -g <RG_NAME> -n dummy-endpoint
az ml online-endpoint create -w <MLWS_NAME> -g <RG_NAME> -n dummy-endpoint
=> cli.azure.cli.core.azclierror: Met error <class 'Exception'>:Endpoint already exists

Expected behavior
I expect the command to overwrite the existing endpoint (with potentially new settings) if it already exists (as would be the intended behavior according to the documentation)

Environment summary
Cloudshell bash in azure portal
azure-cli 2.39.0
core 2.39.0
telemetry 1.0.6 *
Extensions:
ml 2.6.1
ai-examples 0.2.5
ssh 1.1.2

Dependencies:
msal 1.18.0b1
azure-mgmt-resource 21.1.0b1

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions