azure-devops-cli-extension icon indicating copy to clipboard operation
azure-devops-cli-extension copied to clipboard

Variables are not created without any error output

Open czmirek opened this issue 4 years ago • 1 comments

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

  • Create a variable group
  • set $env:organization and $env:project in your terminal
  • Run the following powershell script. It should create 100 variables numbered from 000 to 099
$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
  • The script does not produce any error (except the notification that the extension is in preview)
  • Check the variable group and see that there are some variables missing.

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.

czmirek avatar Feb 10 '21 16:02 czmirek

I get the same issue without any error message

serge-portima avatar Apr 03 '23 08:04 serge-portima