azure-devops-cli-extension
azure-devops-cli-extension copied to clipboard
[Bug] az pipelines release list lists only the first 100 releases
az pipelines release list lists only the first 100 releases regardless of --top 1000 option
To @Reproduce Azure Cli Version: azure-cli 2.0.78 *
Azure-Devops extension version: azure-devops 0.16.0
Steps to reproduce the behavior:
- login using az login
- setup variables $organization and $project to match a project with over 100 deployments
- Run command: az pipelines release list --org $organization --project $project --top 1000 -o table | Measure-Object -Line It returns 102 lines (100 releases +2 lines of header)
Expected behavior It should return N+2 lines (N releases over 100 +2 lines of header)
Screenshots
Debug logs I cannot do that - private data
Additional context Already reported in the wrong thread by someone else. The issue was then closed by @fengzhou-msft. https://github.com/Azure/azure-cli/issues/11256
The support for continuation token was missing in the older client (5.0/5.1). This got fixed in the 6.0 client. This affects a lot of list commands including the one you pointed out here. We will upgrade the client dependency to fix this (currently the version 6.0 is in preview, so it could be a while).
Would having one of the filters (like release-id) help you or you want to list out all the releases always?
I found a workaround using --definition-id option. This should be fine for a while as for each pipeline we have less than 100 release deployed.
@atbagga Has there been any recent work on this? I just ran into this problem today.
I have this problem with test plans. The TestPlanClient [https://github.com/Azure/azure-devops-cli-extension/blob/7fc9bfc19c61876ebf7e12eb23f55b38d2bdc78e/azure-devops/azext_devops/devops_sdk/v6_0/test_plan/test_plan_client.py#L177] does not return the response headers, so it's impossible to know if a continuation token was present or not.