Azure / Azure/azure-devops-cli-extension
az devops service-endpoint list fails to list an endpoint that never becomes isReady == true (ACR) [Bug]
- Dominant language
- Python
- Stars
- 682
- Forks
- 278
- Avg merge
- 3d 23h
- Merged PRs (30d)
- 3
Description
**Describe the bug**
After creating an ACR service endpoint via CLI, it can't be listed until the operation succeeds (which it may not) which effectively orphans the endpoint from the CLI point of view.
**To Reproduce**
Azure Cli Version:
azure-cli 2.9.1
Azure-Devops extension version:
azure-devops 0.18.0
Steps to reproduce the behavior:
```
az login
az devops service-endpoint create --service-endpoint-configuration service_connection.json --organization --project
(where service_connection.json is a template for an ACR endpoint)
This command is in preview. It may be changed/removed in a future release.
{
... blah ..
"data": {
"registrytype": "ACR",
"subscriptionId": ..blah..
},
"operationStatus": {
"state": "InProgress",
"statusMessage": ""
},
.. blah ..
"type": "dockerregistry",
"url": "https://hub.docker.com/"
}
```
Using the id returned I can 'show' the endpoint and track it's status but it wont appear in 'list' until operationStaus.state == "Ready" and/or isReady == true. So if the operation fails (e.g. points to non-existent ACR instance) unless I record the id returned by the create the endpoint is orphaned from the CLI (although I can delete it manually in the portal).
**Expected behavior**
Expect endpoint to be shown in list regardless of it's failure state.
**Screenshots**
na
**Debug logs**
Too many sensitive keys etc for this to be feasible.
**Additional context**
na
```
Contributor guide
Assessment
This issue has not been assessed yet.