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

NuGet /$batch & packages/$count endpoints return bad results

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: 6.0.1
    • Fix Version/s: 6.6.0
    • Component/s: NuGet
    • Labels:
    • Sprint:
      Leap 33, Leap 35

      Description

      Two Bugs:

      Environment:
      create remote and virtual NuGet repositories. (No need for local repo)

      Bug 1:
      send post request with Content-Type = multipart/mixed and body =

      --batch_629e8349-8930-4c2d-be61-c771d6192116
      Content-Type: application/http
      Content-Transfer-Encoding: binary
      
      GET http://127.0.0.1:51577/artifactory/api/nuget/nuget-virtual/GetUpdates()?packageIds='jQuery|Newtonsoft.Json'&versions='2.0.0.0|5.0.4'&includePrerelease=true&includeAllVersions=true&targetFrameworks='net45'&versionConstraints=''
      DataServiceVersion: 2.0;NetFx
      
      --batch_629e8349-8930-4c2d-be61-c771d6192116--
      

      to http://localhost:8080/artifactory/api/nuget/nuget/$batch (Virtual repo)

      artifactory will create the next request:

      https://www.nuget.org/api/v2/GetUpdates()?targetFrameworks=%27net45%27&includePrerelease=true&$top=80&packageIds=%27jQuery%7CNewtonsoft.Json%27&versions=%272.0.0.0%7C5.0.4%27&includeAllVersions=true
      

      which result:

      A query with "Top" set of operators is not supported. Please refer to : https://github.com/NuGet/Home/wiki/Filter-OData-query-requests for additional information.
      

      for valid scenario send the same request to the remote repository and you will see a valid response(no top param added).

      Test (Network test) already exist NuGetGalleryITest:testBatchGetUpdatesRequest
      please validate the test pass after fix

      Bug 2:
      GET Request to

      http://localhost:8080/artifactory/api/nuget/nuget-remote/Packages()/$count
      

      and to

      http://localhost:8080/artifactory/api/nuget/nuget/Packages()/$count
      

      have different results.
      Test already exist NuGetGalleryITest:testPackagesRequest

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                liorg Lior Gur (Inactive)
                Reporter:
                Dudim Dudi Morad
                Assigned QA:
                Inbar Tal
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: