fsprojects / fsprojects/Paket

concurrent package restores sometimes fail

Open
#4,240 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

bug performance
Dominant language
F#
Stars
2.1k
Forks
528
Avg merge
1d 12m
Merged PRs (30d)
54

Description

Description

We have a bunch of test projects and our CI process runs them in parallel so the test portion doesn't take 20 minutes to complete.

dotnet test << parameters.project >> /p:CollectCoverage=true /p:CoverletOutput='../coverage/' /p:Exclude="[*.Test]*" /p:CoverletOutputFormat="lcov" --logger "trx" -- Expecto.fail-on-focused-tests=true

Transient errors sometimes occur during paket restore. This appears to be the relevant part:

Download of FSharp.Core 7.0.300 done in 429 milliseconds. (52273 kbit/s, 2 MB)
Something went wrong while downloading FSharp.Core 7.0.300
Message: The file '/root/.nuget/packages/fsharp.core/fsharp.core.7.0.300.nupkg' already exists.
==> Last trial
Downloading FSharp.Core 7.0.300
Not moving as '/root/.nuget/packages/fsharp.core/7.0.300/fsharp.core.7.0.300.nupkg' already exists (maybe some other instance downloaded it as well)
Download of FSharp.Core 7.0.300 done in 28 milliseconds. (826700 kbit/s, 2 MB)

No doubt we need to rework the pipeline so the test steps are all using the same build artifact, but could the file-exists check be used to prevent the unneeded retries?

This is Paket v7.2.1

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 with Paket's package restore and download handling, using the concurrent test-project command and the FSharp.Core 7.0.300 failure as the reproduction case. Done means concurrent restores recognize an existing package file without unnecessary retries and the restore completes successfully.

Written by the indexing model from the issue text.

Assessment

Tech stack
fsharp
Domain
tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.