NuGet / Home

Repo for NuGet Client issues
Other
1.49k stars 250 forks source link

Owners field always blank #2178

Closed HSAR closed 8 years ago

HSAR commented 8 years ago

The NuGet package property Owners is null in the data class when retrieved using NuGet.Core, and missing entirely from the JSON pulled down - see:

https://api-v3search-0.nuget.org/query?q=Id:Wintellect.Analyzers

The above package definitely has information in the Owners field, as it is listed on the NuGet.org website:

https://www.nuget.org/packages/Wintellect.Analyzers/

But it does not appear in the JSON, and Owners is blank if the same package is fetched programmatically using NuGet.Core.

yishaigalatzer commented 8 years ago
  1. NuGet.Core is no longer a supported codebase.
  2. V2 search does have the data (as expected) - https://nuget-prod-0-v2searchwebsite.azurewebsites.net/search/query?q=id:Wintellect.Analyzers
  3. V3 search does not support owners yet again as expected but we are working on a deployment that will do so shortly. CC @maartenba
pranavkm commented 8 years ago

Did this change go through? If so, what endpoint would I have to use to get the owner from nuget.org?

maartenba commented 8 years ago

It did. On https://api-v2v3search-0.nuget.org/query?q=Id:Wintellect.Analyzers you will see authors.

Use http://api.nuget.org/v3/index.json as the entry point and grab the first SearchQueryService item to get the correct endpoint.

pranavkm commented 8 years ago

Sweet. Thanks!

pranavkm commented 8 years ago

@maartenba - sorry, that looks like authors. I was looking for owners and that's still missing.

maartenba commented 8 years ago

Ah owners are in the referenced registration url.

pranavkm commented 8 years ago

Not seeing it here https://api.nuget.org/v3/registration0/wintellect.analyzers/index.json?

maartenba commented 8 years ago

And https://api-v2v3search-0.nuget.org/search/query?q=Id:Wintellect.Analyzers

pranavkm commented 8 years ago

Ok, I see it now.

pranavkm commented 8 years ago

Sorry, getting back to this - I don't see the endpoint listed on http://api.nuget.org/v3/index.json. (I thought it was the search service but that one's different).

maartenba commented 8 years ago

Best to use the V2 search for now (or SearchGalleryQueryService from the above document but that is an internal endpoint)

pranavkm commented 8 years ago

V2 Search doesn't have the field. What's SearchGalleryQueryService?

maartenba commented 8 years ago

The API that powers v2 search.

pranavkm commented 8 years ago

@maartenba - I've been using the /search/query API and it's been working well so far. However I ran into an anomaly today: https://www.nuget.org/packages/runtime.fedora.23-x64.Microsoft.NETCore.DotNetHostPolicy lists the owners as dotnetframework. However querying the API says:

{
    "totalHits": 1,
    "index": "v3-lucene0-v2v3-20160520",
    "indexTimestamp": "6/20/2016 9:56:48 PM",
    "data": [{
        "PackageRegistration": {
            "Id": "runtime.fedora.23-x64.Microsoft.NETCore.DotNetHostPolicy",
            "DownloadCount": 0,
            "Owners": []
        },
        "Version": "0.0.1-alpha",
        "NormalizedVersion": "0.0.1-alpha",
        "Title": "runtime.fedora.23-x64.Microsoft.NETCore.DotNetHostPolicy",
        "Description": "runtime.fedora.23-x64.Microsoft.NETCore.DotNetHostPolicy",
        "Summary": "",
        "Authors": "Microsoft",
        "Copyright": "Microsoft Corporation.  All rights reserved.",
        "Tags": "",
        "ReleaseNotes": "https://go.microsoft.com/fwlink/?LinkID=799421",
        "ProjectUrl": "https://dot.net/",
        "IconUrl": "http://go.microsoft.com/fwlink/?LinkID=288859",
        "IsLatestStable": false,
        "IsLatest": false,
        "Listed": false,
        "Created": "2016-06-20T18:45:22.0700000+00:00",
        "Published": "1900-01-01T00:00:00.0000000+00:00",
        "LastUpdated": "1900-01-01T00:00:00.0000000+00:00",
        "LastEdited": "2016-06-20T18:45:24.5930000+00:00",
        "DownloadCount": 0,
        "Dependencies": [],
        "SupportedFrameworks": [],
        "Hash": "brUa0qmB8nUwFf2S04UH7zb7wN7DvSLrBqPgnvjpJIBqCJaH07wmbrO9P7lDdC6wrxQG7J0Hm6gcA3W0Us/Upw==",
        "HashAlgorithm": "SHA512",
        "PackageFileSize": 2082,
        "LicenseUrl": "http://go.microsoft.com/fwlink/?LinkId=329770",
        "RequiresLicenseAcceptance": true
    }]
}

Note the empty owners array. Any idea what might cause this discrepancy?

maartenba commented 8 years ago

May be temporal, owner info is not always in there immediately.