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

[Bug] az pipelines release list lists only the first 100 releases #937

Open davidhabibi opened 4 years ago

davidhabibi commented 4 years ago

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:

  1. login using az login
  2. setup variables $organization and $project to match a project with over 100 deployments
  3. 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 az pipelines release list

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

atbagga commented 4 years ago

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?

davidhabibi commented 4 years ago

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.

elesel commented 2 years ago

@atbagga Has there been any recent work on this? I just ran into this problem today.

ron-premier commented 1 year ago

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.

AshishDadhich4h2 commented 2 months ago

any update?