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

Incorrect NuGet server API implementation: incorrect results for "Search()"

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 4.3.3, 4.6.0, 4.7.1, 4.7.6, 4.8.2, 4.11.2
    • Fix Version/s: 4.13.1
    • Component/s: NuGet
    • Labels:
      None

      Description

      I already reported an issue with incorrect NuGet server implementation - see RTFACT-9275.
      This is another one. Now Artifactory doesn't return expected packages for requests from NuGet client when we're browsing a repo in NuGet Package Manager in Visual Studio.

      I have a repo with 3175 packages most of which are pre-release.
      Some users started complaining that they can't find fresh packages. I checked the repo via WebApp (https://myserver/webapp/) and I did see the package. Then I opened VS's dialog "Manage NuGet Packages" and browsed the repo (with enabled "Include Prerelaese" option). There was no the latest package! Only the previous one ("2.0.0-SNAPSHOT-1706406").

      Then I checked via nuget powershell ("Package Manager Console"):

      get-package -Filter XFW3.DslDesigner -ListAvailable -Source https://myserver/api/nuget/rnd-nuget-dev -IncludePrerelease
      

      and it returned my latest package ("2.0.0-SNAPSHOT-1706758").

      I checked via Fiddler what requests are being sent by nuget.
      In the first case (when I browse the repo in VS) it's this one:
      https://myserver/api/nuget/rnd-nuget-dev/Search()?$filter=IsAbsoluteLatestVersion&includePrerelease=true&searchTerm=XFW3.DslDesigner

      Artifactory returns two items for this request - both are for package the same "Croc.DslDesigner" but with different versions: 1.19.2 ?? 2.0.0-SNAPSHOT-1706406. It's incorrect but not critical. The worst thing is that Artifactory didn't return the latest version - "2.0.0-SNAPSHOT-1706758"!

      In the other case (when I run "get-package -listavailable" in Package Console (powershell) NuGet at first sends the same request as before and gets two versions (incorrect) but then it sends:

      https://myserver/api/nuget/rnd-nuget-dev/FindPackagesById()?id='XFW3.DslDesigner'
      and get all versions for this package 'XFW3.DslDesigner'. And now there is the latest version among received ones.

      So PS-command get-package shows my the latest version but in UI-dialog I can see only the previous one.

      But it's not the end unfortunetelly.

      I tried to reindex the repo. I'm not sure when reindexing has finished but after a while (while I was filling this bug) Artifactory stopped returning prerelease packages at all. The means that absolutely the same request (I just hit F5 in the browser) returns only latest release version (1.19.2). PS-command (that is FindPackageById action) still works.

      Please fix it ASAP. We hold Pro licence.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              shayy Shay Yaakov (Inactive)
              Reporter:
              Shrike Sergei Dorogin
              Votes:
              8 Vote for this issue
              Watchers:
              8 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: