Uploaded image for project: 'Artifactory Binary Repository'
  1. Artifactory Binary Repository
  2. RTFACT-12379

NuGet skip logic is omitting results when a Virtual repo is used


    • Type: Bug
    • Status: Resolved
    • Priority: High
    • Resolution: Fixed
    • Affects Version/s: 4.13.2, 4.14.0, 5.1.0
    • Fix Version/s: 5.2.1
    • Component/s: NuGet
    • Labels:
    • Sprint:
      Leap 7, Leap 9


      A FindPackageById() query that has more than 80 results will generate a feed that contains the a "next" href to the second page of results. The problem is that when a virtual repo that aggregates two local repos for example is used -

      $skip=1 actually skips 2 packages
      $skip=2 actually skips 4 packages
      $skip=3 actually skips 6 packages, etc...

      To witness this behaviour:
      1.Create two local nuget repos nuget-local & nuget-local-2
      2.Create a virtual repo that contains both of them
      3.Use the attached script that will upload 81 packages to artifactory - 40 to nuget-local and 41 to nuget-local-2
      2.run the FindPackagesById() query on the virtual repo:
      3.grep for <entry> - note that you there are 79 results instead of 80

      Although we skipped just 1, we still got 79 packages, and not the expected 80.

      The $skip token we put in the "next" href always skips 80 packages. So, if a user has 160 package versions in his repo for example, skipping 80 is equivalent to skipping 160 packages. This essentially means that the next href will have zero results.


          Issue Links



              • Assignee:
                nadavy Nadav Yogev
                uriahl Uriah Levy
                Assigned QA:
                Yogev Abergel (Inactive)
              • Votes:
                5 Vote for this issue
                11 Start watching this issue


                • Created: