Listing packages with a sufficiently large result size misses some packages
- Dominant language
- C#
- Stars
- 11.5k
- Forks
- 960
- PR merge metrics
- No merged PRs in 30d
Description
### What You Are Seeing?
With a repository with a sufficiently large package base, `choco (list|search|find) --AllVersions --PreRelease` does not return all packages.
### What is Expected?
All packages and all package versions should be returned.
### How Did You Get This To Happen? (Steps to Reproduce)
1. Loaded a repository with 400 "stable" packages, 150 "alpha" packages, and 150 "beta" packages
2. Ran `choco list --AllVersions --PreRelease --Source MySource`
3. Chocolatey returned 690 packages
Looking in fiddler, it appears that the repository is returning all 700 packages, but Chocolatey CLI is only reporting up until the last response.
**Note:** I ran this also with `nuget.exe` and got similar results. It appears this is an upstream issue, but I haven't moved upstream to the NuGet repositories to investigate further.
### System Details
* OS Build (In PowerShell run `[System.Environment]::OSVersion.version.tostring()`): 10.0.19044.0
* Windows PowerShell version (Run: `$PSVersionTable`):
```
Name Value
---- -----
PSVersion 5.1.19041.1682
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.19041.1682
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
```
* Chocolatey version (Run `choco --version`): 1.1.0
### Output Log
Currently I don't have the full log output. I will gather it when I have an opportunity to run the query again.
Full Log Output
~~~sh
IF YOUR LOG CONTENT IS SHORT, PLACE IT HERE - WE NEED _ALL_ DETAILED OUTPUT BASED ON THE ABOVE TO BE ABLE TO PROVIDE SUPPORT (YOU WILL FIND THAT IN THE $env:ChocolateyInstall\logs\chocolatey.log between the `=====`)
IF YOUR LOG CONTENT IS LONG, PLEASE LINK TO A GIST (see https://docs.github.com/en/github/writing-on-github/editing-and-sharing-content-with-gists/creating-gists)
~~~
Contributor guide
Research direction
Start by reproducing `choco list --AllVersions --PreRelease --Source MySource` with the reported 700-package repository and compare the CLI output with the responses observed in Fiddler. Trace the `list`, `search`, and `find` command entry points to determine where the final response is missed, then verify that all packages and versions are returned; compare behavior with `nuget.exe` as an upstream reference.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100