Welcome to the Inedo Forums! Check out the Forums Guide for help getting started.

If you are experiencing any issues with the forum software, please visit the Contact Form on our website and let us know!

Feedback about PG-2268 Integrated .snupkg NuGet Symbol Support



  • Hi,

    since we're highly interested in this feature, I spend some time trying it out, but ran into two issues.

    1. According to this post on GitHub from a Microsoft employee, when pushing packages with nuget.exe using an API key, it should pickup and reuse this key also for the symbol package.

    When only having an API key set for the package feed itself, I get a password prompt for the symbol package.

    Pushing SourceLinkTestLib.2.0.0.nupkg to 'https://192.168.x.x/nuget/nuget-hosted/package'...
      PUT https://192.168.x.x/nuget/nuget-hosted/package/
      Created https://192.168.x.x/nuget/nuget-hosted/package/ 54ms
    Your package was pushed.
    Pushing SourceLinkTestLib.2.0.0.snupkg to 'https://192.168.x.x/nuget/nuget-hosted/symbolpackage'...
      PUT https://192.168.x.x/nuget/nuget-hosted/symbolpackage/
    MSBuild auto-detection: using msbuild version '17.4.1.60106' from 'C:\Program Files\Microsoft Visual Studio\2022\Professional\MSBuild\Current\Bin'.
    Please provide credentials for: https://192.168.x.x/nuget/nuget-hosted/v3/index.json
    UserName:
    

    When also setting an API key for the */symbolpackage URL, this prompt goes away. But according to the Microsoft guy, this should not really be required.

    1. When fixing the issue decribed in 1., pushing the .snupkg returns an error, the package itself seems to be actually copied to the ProGet package directory on disk.

    Log message:

    An error occurred processing a PUT request to https://192.168.x.x/nuget/nuget-hosted/symbolpackage/: The EXECUTE permission was denied on the object 'IndexedSymbolEntry', database 'ProGet', schema 'dbo'.
    

    Details:

    Microsoft.Data.SqlClient.SqlException (0x80131904): The EXECUTE permission was denied on the object 'IndexedSymbolEntry', database 'ProGet', schema 'dbo'.
    at Microsoft.Data.SqlClient.SqlCommand.<>c.<ExecuteDbDataReaderAsync>b__207_0(Task`1 result)
    at System.Threading.Tasks.ContinuationResultTaskFromResultTask`2.InnerInvoke()
    at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
    --- End of stack trace from previous location ---
    at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread)
    --- End of stack trace from previous location ---
    at Inedo.Data.DatabaseContext.DbResult.CreateAsync(DbCommand command, DatabaseContext context, DateTimeOffset startTime, Stopwatch stopwatch)
    at Inedo.Data.DatabaseContext.ExecuteInternalAsync(String storedProcName, GenericDbParameter[] parameters)
    at Inedo.Data.SqlServerDatabaseContext.ExecuteInternalAsync(String storedProcName, GenericDbParameter[] parameters)
    at Inedo.Data.DatabaseContext.ExecuteNonQueryAsync(String storedProcName, GenericDbParameter[] parameters)
    at Inedo.ProGet.Feeds.NuGet.NuGetFeed.InstallOrUpdateSnupkgAsync(Stream stream, Nullable`1 publishDate)
    at Inedo.ProGet.WebApplication.FeedEndpoints.NuGet.NuGetApi.PutHandler.ProcessPutRequestAsync(HttpContext context, WebApiContext apiContext, RequestData urlData, NuGetFeed feed)
    at Inedo.ProGet.WebApplication.FeedEndpoints.NuGet.NuGetApi.ProcessRequestAsync(HttpContext context, WebApiContext apiContext, NuGetFeed feed, String relativeUrl)
    at Inedo.ProGet.WebApplication.FeedEndpoints.NuGet.NuGetFeedHandler.ProcessRequestAsync(HttpContext context, WebApiContext apiContext, NuGetFeed feed, String relativeUrl)
    at Inedo.ProGet.WebApplication.FeedEndpoints.FeedEndpointHandler.FeedRequestHandler.ProcessRequestAsync(HttpContext context)
    ClientConnectionId:ab40b37a-98dc-4cf4-be5d-7ff3ed663d8f
    Error Number:229,State:5,Class:14
    

  • inedo-engineer

    Hi @lm , thanks for the feedback!

    I'm not sure about #1, but I was curious about #2, and spotted a typo in our database updating code.

    If you run this against your ProGet database, this will work and should unblock you:

    GRANT EXECUTE ON TYPE::[IndexedSymbolEntry] TO [ProGetUser_Role]
    

    This will also be fixed in in ProGet 2022.21 as PG-2287.

    Cheers,
    Alana



  • @atripp

    Thanks for the query, this has indeed fixed the 2nd issue and pushing packages now works without error.

    About the 1st issue. Since the source code for nuget.exe is public, one could try to debug this directly in the client, to see what the expectations from a server are.


  • inedo-engineer

    @lm thanks for letting us know that it worked!

    I'm glad you were able to find the issue on GitHub. Looking closer, it is a NuGet client bug; I posted an update on the issue. The only workaround is what you described (setting a separate API key).


Log in to reply
 

Inedo Website HomeSupport HomeCode of ConductForums GuideDocumentation