Open wkoeter opened 2 months ago
Hi @wkoeter,
2.56.0 is not the latest Azure CLI(2.63.0).
If you haven't already attempted to do so, please upgrade to the latest Azure CLI version by following https://learn.microsoft.com/en-us/cli/azure/update-azure-cli.
Thank you for opening this issue, we will look into it.
Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @v-anvashist, @V-hmusukula.
Hi @wkoeter,
2.56.0 is not the latest Azure CLI(2.63.0).
If you haven't already attempted to do so, please upgrade to the latest Azure CLI version by following https://learn.microsoft.com/en-us/cli/azure/update-azure-cli.
Same result after upgrade
Describe the bug
When I have 2 branches with smiliar prefix, and I perform
az repos ref delete --name {branchName}
it will mentionref not found. Failed to find object_id for ref {branchName}. Please provide object_id.
e.g. having 2 branches:
heads/auto/branch1
heads/auto/branch12
calling
az repos ref delete --myproject --myrepository --name heads/auto/branch1
returns the error mentioned above.I think underlying issue is that it does a filter and cannot distinguish between both branches because they both contain the name. I think this because after deleting
heads/auto/branch12
manually, the call succeeds without any errors.This is also supported by the debug logging that finds 2 entries
"count":2}
.Related command
az repos ref delete
Errors
ref not found Failed to find object_id for ref heads/auto/branch1. Please provide object_id.
Issue script & Debug output
Expected behavior
Branch deleted, or error mentioning it cannot distinguish between multiple branches.
Environment Summary
azure-cli 2.56.0 *
core 2.56.0 * telemetry 1.1.0
Extensions: account 0.2.5 azure-devops 1.0.1 interactive 0.5.1
Dependencies: msal 1.24.0b2 azure-mgmt-resource 23.1.0b2
Python location 'C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\python.exe' Extensions directory 'C:\Users__.azure\cliextensions'
Python (Windows) 3.11.5 (tags/v3.11.5:cce6ba9, Aug 24 2023, 14:21:31) [MSC v.1936 32 bit (Intel)]
Legal docs and information: aka.ms/AzureCliLegal
You have 2 update(s) available. Consider updating your CLI installation with 'az upgrade'
Additional context
No response