[RTFACT-12694] Nuget - correct implementation of the $top query param Created: 19/Oct/16  Updated: 14/Nov/17  Resolved: 23/Nov/16

Status: Resolved
Project: Artifactory Binary Repository
Component/s: NuGet
Affects Version/s: 4.13.2, 4.14.1
Fix Version/s: 4.14.2

Type: Bug Priority: High
Reporter: Uriah Levy Assignee: Shay Yaakov (Inactive)
Resolution: Fixed Votes: 3
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
Relationship
relates to RTFACT-12379 NuGet skip logic is omitting results ... Resolved
Support Tickets:

UCAS Enterprise Ltd - Support Case, Vanderlande Industries B.V. - Support Case, Aetna/Medicity - Support Case, Cylance Inc. - Support Case

Product Backlog: 16-Q4-leaps
Internal Priority: Normal
Internal Documentation: docRelNotes
Sprint: Leap 2

 Description   

Artifactory currently sends back the $skip link on queries that have the $top param - this is not inline with with how the gallery handles $top queries and confuses the client.

For example, if the client sends a first request with $top=30, and we give it back a next page link with $skip=80, we lose 50 results beacuse the client follows the pagination link instead of using its own logic for pagination (which is skipping 30 results at a time in correspondence to the $top value).

To reproduce, use the attached script on https://www.jfrog.com/jira/browse/RTFACT-12379 to upload some versions and use this command:

nuget.exe list -allversions -Source http://localhost:8080/artifactory/api/nuget/nuget-local -verbosity detailed

On mac:
mono --runtime=v4.0.30319 path/to/nuget.exe list -allversions -Source http://localhost:8080/artifactory/api/nuget/nuget-local -verbosity detailed

See that the first request asks for $top=30 and contains a link to the next page with $skip=80, effectively skipping 50 results


Generated at Mon Dec 16 11:47:43 UTC 2019 using JIRA 7.6.16#76018-sha1:9ed376192612a49536ac834c64177a0fed6290f5.