fsprojects / fsprojects/Paket

Package resolution randomly fails with Artifactory 5.4.6

Open
#2,775 8 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug extern sdk: dotnet/sdk
Dominant language
F#
Stars
2.1k
Forks
528
Avg merge
1d 12m
Merged PRs (30d)
54

Description

Description

We use Artifactory 5.4.6 as package server and we use Paket as package manager for our projects.
Since we upgraded some of our projects to .NET Core 2 we upgraded Paket from 4.x to 5.91.0 becuase support of .NET Core 2 (netstandard2.0, netcoreapp2.0, ...) was added somewhere in 5.x.
Since then the builds randomly fail when resolving packages from Artifactory.

Repro steps

Repro steps are quite vague but all I can say is that combination of Paket and Artifactory of certain versions has issues.

  1. Have Artifactory 5.4.6 installed as package server

  2. Use Paket 5.91.0 to resolve packages from Artifactory

Expected behavior

Packages are resolved, installed, everything works.

Actual behavior

Package resolution gets lots of warnings and randomly fails or times out because it's not able to find proper packages. But then the next run usually passes, however still with warnings in log.

Examples of errors:

[08:42:53][Step 1/1] At least one 'next' link (index 0) returned a empty result (noticed on 'http://dev-artifactory.dev.local/artifactory/api/nuget/nuget_libs/FindPackagesById()?semVerLevel=2.0.0&id='docfx.console'&$orderby=Published desc'): ['http://dev-artifactory.dev.local:80/artifactory/api/nuget/nuget_libs/FindPackagesById()?$skip=80&semVerLevel=2.0.0&$orderby=Published desc&id='docfx.console'']
[08:42:53][Step 1/1]  - docfx.console 2.24.0
[08:42:55][Step 1/1] At least one 'next' link (index 0) returned a empty result (noticed on 'http://dev-artifactory.dev.local/artifactory/api/nuget/nuget_libs/FindPackagesById()?semVerLevel=2.0.0&id='vswhere'&$orderby=Published desc'): ['http://dev-artifactory.dev.local:80/artifactory/api/nuget/nuget_libs/FindPackagesById()?$skip=80&semVerLevel=2.0.0&$orderby=Published desc&id='vswhere'']
[08:42:55][Step 1/1] At least one 'next' link (index 0) returned a empty result (noticed on 'http://dev-artifactory.dev.local/artifactory/api/nuget/nuget_libs/FindPackagesById()?semVerLevel=2.0.0&id='Pickles.CommandLine'&$orderby=Published desc'): ['http://dev-artifactory.dev.local:80/artifactory/api/nuget/nuget_libs/FindPackagesById()?$skip=80&semVerLevel=2.0.0&$orderby=Published desc&id='Pickles.CommandLine'']
[08:42:55][Step 1/1]  - Pickles.CommandLine 2.16.2
[08:42:55][Step 1/1] Source 'http://dev-artifactory.dev.local/artifactory/api/nuget/nuget-OrionPlatform-stable' exception: System.Exception: error ---> System.Exception: Could not retrieve data from 'http://dev-artifactory.dev.local/artifactory/api/nuget/nuget-OrionPlatform-stable/Packages(Id='vswhere',Version='2.1.3')' ---> Paket.Utils+RequestFailedException: Request to 'http://dev-artifactory.dev.local/artifactory/api/nuget/nuget-OrionPlatform-stable/Packages(Id='vswhere',Version='2.1.3')' failed with: 'NotFound'
[08:42:55][Step 1/1]    at Paket.Utils.failIfNoSuccess@498-5.Invoke(RequestFailedInfo _arg1)
[08:42:55][Step 1/1]    at Microsoft.FSharp.Control.AsyncBuilderImpl.args@823-1.Invoke(a a)
[08:42:55][Step 1/1]    --- End of inner exception stack trace ---
[08:42:55][Step 1/1]    at Paket.Utils.getFromUrl@694-8.Invoke(Exception _arg4)
[08:42:55][Step 1/1]    at Microsoft.FSharp.Control.AsyncBuilderImpl.callA@839.Invoke(AsyncParams`1 args)
[08:42:55][Step 1/1]    --- End of inner exception stack trace ---
[08:42:55][Step 1/1]    at Paket.NuGetV2.getDetailsFromNuGetViaODataFast@373-1.Invoke(FSharpChoice`2 _arg5)
[08:42:55][Step 1/1]    at Microsoft.FSharp.Control.AsyncBuilderImpl.args@823-1.Invoke(a a)
[08:42:55][Step 1/1] Source 'http://dev-artifactory.dev.local/artifactory/api/nuget/nuget-OrionPlatform-stable' exception: System.Exception: error ---> System.Exception: Could not retrieve data from 'http://dev-artifactory.dev.local/artifactory/api/nuget/nuget-OrionPlatform-stable/Packages(Id='Pickles.CommandLine',Version='2.16.1')' ---> Paket.Utils+RequestFailedException: Request to 'http://dev-artifactory.dev.local/artifactory/api/nuget/nuget-OrionPlatform-stable/Packages(Id='Pickles.CommandLine',Version='2.16.1')' failed with: 'NotFound'
[08:42:55][Step 1/1]    at Paket.Utils.failIfNoSuccess@498-5.Invoke(RequestFailedInfo _arg1)
[08:42:55][Step 1/1]    at Microsoft.FSharp.Control.AsyncBuilderImpl.args@823-1.Invoke(a a)
[08:42:55][Step 1/1]    --- End of inner exception stack trace ---
[08:42:55][Step 1/1]    at Paket.Utils.getFromUrl@694-8.Invoke(Exception _arg4)
[08:42:55][Step 1/1]    at Microsoft.FSharp.Control.AsyncBuilderImpl.callA@839.Invoke(AsyncParams`1 args)
[08:42:55][Step 1/1]    --- End of inner exception stack trace ---
[08:42:55][Step 1/1]    at Paket.NuGetV2.getDetailsFromNuGetViaODataFast@373-1.Invoke(FSharpChoice`2 _arg5)
[08:42:55][Step 1/1]    at Microsoft.FSharp.Control.AsyncBuilderImpl.args@823-1.Invoke(a a)

All the packages are present on the server with correct versions. If I re-run the build it usually passes with exactly the same packages available.

I assume that main problem is no support of SemVer 2 in Artifactory and they have a case for that already - https://www.jfrog.com/jira/browse/RTFACT-13090. But if Paket is not able to work without SemVer 2 (even though it used to in 4.x branch) then it's a blocker for us being on .NET Core 2.0.

Known workarounds

Switch to Nuget. :-(

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at Paket.NuGetV2.getDetailsFromNuGetViaODataFast, named in the stack trace, and reproduce package resolution against Artifactory 5.4.6 with Paket 5.91.0. Compare the failing OData requests and warnings with a successful rerun; done means the listed packages resolve reliably without the reported empty-result and NotFound failures.

Written by the indexing model from the issue text.

Assessment

Tech stack
fsharp
Domain
build-system, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.