NuGet / NuGetGallery

NuGet Gallery is a package repository that powers https://www.nuget.org. Use this repo for reporting NuGet.org issues.
https://www.nuget.org/
Apache License 2.0
1.54k stars 644 forks source link

RequireLicenseAcceptance is sometimes incorrect in registration #4570

Open scottbommarito opened 7 years ago

scottbommarito commented 7 years ago

I have seen this a couple times in the past, but it happened recently (2017-08-11T01:58:32+00:00) so it is an ongoing issue.

{
    "validator": {
        "Name": "NuGet.Services.Metadata.Catalog.Monitoring.RegistrationRequireLicenseAcceptanceValidator"
    },
    "result": "Fail",
    "exception": {
        "ClassName": "NuGet.Services.Metadata.Catalog.Monitoring.ValidationException",
        "Message": "Registration index metadata does not match the FindPackagesById metadata!",
        "Data": null,
        "InnerException": {
            "ClassName": "NuGet.Services.Metadata.Catalog.Monitoring.MetadataFieldInconsistencyException`1[NuGet.Services.Metadata.Catalog.Monitoring.PackageRegistrationIndexMetadata]",
            "Message": "The metadata between V2 and V3 is inconsistent! RequireLicenseAcceptance does not match!",
            "Data": {
                "V2Metadata": "{\"Authors\":\"Vitaly Tartynov\",\"Description\":\"ObjectARX .NET libraries for AutoCAD 2013, 2014 and 2015\",\"IconUrl\":\"\",\"Id\":\"AutoCAD.ObjectARX.2013\",\"LicenseUrl\":null,\"MinClientVersion\":null,\"ProjectUrl\":\"\",\"RequireLicenseAcceptance\":true,\"Summary\":null,\"Tags\":[\"AutoCAD\",\"ObjectARX\"],\"Title\":\"AutoCAD.ObjectARX.2013\",\"Version\":\"1.0.0\",\"Listed\":true,\"PackageContent\":\"https://www.nuget.org/api/v2/package/AutoCAD.ObjectARX.2013/1.0.0\",\"Published\":\"2017-08-11T01:58:15.617+00:00\"}",
                "V3Metadata": "{\"Authors\":\"Vitaly.Tartynov\",\"Description\":\"ObjectARX for AutoCAD 2013, 2014 and 2015\",\"IconUrl\":\"\",\"Id\":\"AutoCAD.ObjectARX.2013\",\"LicenseUrl\":\"http://usa.autodesk.com/adsk/servlet/item?siteID=123112&id=785550\",\"MinClientVersion\":null,\"ProjectUrl\":\"\",\"RequireLicenseAcceptance\":false,\"Summary\":\"\",\"Tags\":[\"AutoCAD\",\"ObjectARX\"],\"Title\":\"ObjectARX for AutoCAD 2013, 2014 and 2015\",\"Version\":\"1.0.0\",\"Listed\":true,\"PackageContent\":\"https://api.nuget.org/v3-flatcontainer/autocad.objectarx.2013/1.0.0/autocad.objectarx.2013.1.0.0.nupkg\",\"Published\":\"2017-08-11T01:58:15.617+00:00\"}",
                "V2Metadata.RequireLicenseAcceptance": true,
                "V3Metadata.RequireLicenseAcceptance": false
            },
            "InnerException": null,
            "HelpURL": null,
            "StackTraceString": "   at NuGet.Services.Metadata.Catalog.Monitoring.RegistrationRequireLicenseAcceptanceValidator.<CompareIndex>d__2.MoveNext() in C:\\vsts-agent\\_work\\5\\s\\src\\NuGet.Services.Metadata.Catalog.Monitoring\\Validation\\Test\\Registration\\RegistrationRequireLicenseAcceptanceValidator.cs:line 32\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at NuGet.Services.Metadata.Catalog.Monitoring.RegistrationIndexValidator.<RunInternal>d__2.MoveNext() in C:\\vsts-agent\\_work\\5\\s\\src\\NuGet.Services.Metadata.Catalog.Monitoring\\Validation\\Test\\Registration\\RegistrationIndexValidator.cs:line 36",
            "RemoteStackTraceString": null,
            "RemoteStackIndex": 0,
            "ExceptionMethod": "8\nMoveNext\nNuGet.Services.Metadata.Catalog.Monitoring, Version=4.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35\nNuGet.Services.Metadata.Catalog.Monitoring.RegistrationRequireLicenseAcceptanceValidator+<CompareIndex>d__2\nVoid MoveNext()",
            "HResult": -2146233088,
            "Source": "NuGet.Services.Metadata.Catalog.Monitoring",
            "WatsonBuckets": null
        },
        "HelpURL": null,
        "StackTraceString": "   at NuGet.Services.Metadata.Catalog.Monitoring.RegistrationIndexValidator.<RunInternal>d__2.MoveNext() in C:\\vsts-agent\\_work\\5\\s\\src\\NuGet.Services.Metadata.Catalog.Monitoring\\Validation\\Test\\Registration\\RegistrationIndexValidator.cs:line 43\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at NuGet.Services.Metadata.Catalog.Monitoring.Validator.<ValidateAsync>d__7.MoveNext() in C:\\vsts-agent\\_work\\5\\s\\src\\NuGet.Services.Metadata.Catalog.Monitoring\\Validation\\Test\\Validator.cs:line 63",
        "RemoteStackTraceString": null,
        "RemoteStackIndex": 0,
        "ExceptionMethod": "8\nMoveNext\nNuGet.Services.Metadata.Catalog.Monitoring, Version=4.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35\nNuGet.Services.Metadata.Catalog.Monitoring.RegistrationIndexValidator+<RunInternal>d__2\nVoid MoveNext()",
        "HResult": -2146233088,
        "Source": "NuGet.Services.Metadata.Catalog.Monitoring",
        "WatsonBuckets": null
    }
}
skofman1 commented 7 years ago

@scottbommarito ,looks like a monitoring issue. In the DB RequireLicenseAcceptance=false, which is consistent with the catalog and registration: https://api.nuget.org/v3/registration3/autocad.objectarx.2013/index.json https://api.nuget.org/v3/catalog0/data/2017.08.16.23.59.56/autocad.objectarx.2013.1.0.0.json

The package was edited on August 16th (which is the date you created this issue), so might be related.

scottbommarito commented 7 years ago

It isn't a monitoring issue. When I saw the issue I reflowed the package, creating that catalog entry. The issue definitely exists--I should have saved the entire status blob so we know what catalog entry was associated with this issue.

skofman1 commented 6 years ago

We haven't seen this for a while. Keeping open for now for tracking. Please update the issue if you see an occurrence.