azure-devops-cli-extension
azure-devops-cli-extension copied to clipboard
[Bug] az pipelines variable delete does not work with —variable-name
Describe the bug Running:
$: az pipelines variable delete —pipeline-name “foo” —name “var_name” # rest of parameters
does not work. However, running:
$: az pipelines variable delete —pipeline-id $id —name “var_name” # rest of parameters
does. This works as intended when one runs az pipelines variable create.
—pipeline-name seems to be a supported parameter when running az pipelines variable delete —help.
Upon looking at —debug, it seems that the client tries to do this:
DEBUG: urllib3.connectionpool: https://dev.azure.com:443 “GET /org_name/project_name/_apis/build/Definitions?name=foo
instead of this
DEBUG: urllib3.connectionpool: https://dev.azure.com:443 “GET /org_name/project_name/_apis/build/Definitions/$id?name=foo
To Reproduce Azure Cli Version: 2.8.0
Azure-Devops extension version: 0.18.0
Steps to reproduce the behavior:
- Create a pipeline; doesn’t matter how.
- Create a variable:
AZURE_DEVOPS_EXT_PAT=pat az pipelines variable create —name foo —project project —org https://dev.azure.com/org —pipeline-name pipeline —value bar - Delete that variable:
AZURE_DEVOPS_EXT_PAT=pat az pipelines variable delete —name foo —project project —org https://dev.azure.com/org —pipeline-name pipeline
Expected behavior
The variable should get deleted.
I suspect this has been overlooked given the time from it being logged until now.
It's still happening in 0.26.0.
Any estimate on when it might be fixed? Or at the very least, when the documentation could be updated to remove the --pipeline-name parameter?