Azure / azure-devops-cli-extension

Azure DevOps Extension for Azure CLI
https://docs.microsoft.com/en-us/cli/azure/ext/azure-devops/?view=azure-cli-latest
MIT License
617 stars 239 forks source link

Variables are not created without any error output #1101

Open czmirek opened 3 years ago

czmirek commented 3 years ago

Describe the bug Running variable create sometimes does NOT create the variable and does not produce any error. The bug is most consistently reproducible when attempting to create some number of variables at once parallely.

To Reproduce

$config = @{}

for ($i=0;$i -lt 100;$i++) {
    $num = $i.ToString("000")
    $config.Add("test_key_$($num)", "test_value_$($num)") 
}

# checks, creates or overwrites all variables
$config.Keys | ForEach-Object -Parallel {
    $variable_name = $_
    $variable_value = ($using:config)[$_]
    az pipelines variable-group variable create --group-id=67 --org="https://dev.azure.com/$($env:organization)" --project="$($env:project)" --name="$($variable_name)" --value="$($variable_value)"
} -ThrottleLimit 10

Azure Cli Version: 2.8.0 Azure-Devops extension version: azure-devops (0.18.0)

Expected behavior All variables are created in the variable group OR I get some notification error that I'm sending too many requests.

I suspect that the server is returning HTTP 429 Too Many Requests but the extension is just not handling it correctly when it should write an error message.

serge-portima commented 1 year ago

I get the same issue without any error message