Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bootstrapper] Should not request Github while cache is valid #2365

Closed
matthid opened this issue May 25, 2017 · 3 comments
Closed

[Bootstrapper] Should not request Github while cache is valid #2365

matthid opened this issue May 25, 2017 · 3 comments
Labels

Comments

@matthid
Copy link
Member

matthid commented May 25, 2017

Description

The following behavior was noticed in a netcore project when restoring stuff with the bootstrapper in magic mode:

EXEC : The remote server returned an error : (429) Too Many Requests. (Github - cached (temporarily ignore updates)) [C:\PROJ\FAKE\src\app\Fake.DotNet.Testing.NUnit\Fake.DotNet.Testing.NUnit.fsproj]
C:\PROJ\FAKE\.paket\Paket.Restore.targets(17,5): error MSB3073: The command ""C:\PROJ\FAKE\.paket\paket.exe" restore --project "C:\PROJ\FAKE\src\app\Fake.DotNet.Testing.NUnit\Fake.DotNet.Testing.NUnit.fsproj" --target-framework netstandard1.6" exited with code -1. [C:\PROJ\FAKE\src\app\Fake.DotNet.Testing.NUnit\Fake.DotNet.Testing.NUnit.fsproj]
EXEC : The remote server returned an error : (429) Too Many Requests. (Github - cached (temporarily ignore updates)) [C:\PROJ\FAKE\src\app\Fake.DotNet.Testing.XUnit2\Fake.DotNet.Testing.XUnit2.fsproj]
C:\PROJ\FAKE\.paket\Paket.Restore.targets(17,5): error MSB3073: The command ""C:\PROJ\FAKE\.paket\paket.exe" restore --project "C:\PROJ\FAKE\src\app\Fake.DotNet.Testing.XUnit2\Fake.DotNet.Testing.XUnit2.fsproj" --target-framework netstandard1.6" exited with code -1. [C:\PROJ\FAKE\src\app\Fake.DotNet.Testing.XUnit2\Fake.DotNet.Testing.XUnit2.fsproj]
EXEC : The remote server returned an error : (429) Too Many Requests. (Github - cached (temporarily ignore updates)) [C:\PROJ\FAKE\src\app\Fake.IO.Zip\Fake.IO.Zip.fsproj]
C:\PROJ\FAKE\.paket\Paket.Restore.targets(17,5): error MSB3073: The command ""C:\PROJ\FAKE\.paket\paket.exe" restore --project "C:\PROJ\FAKE\src\app\Fake.IO.Zip\Fake.IO.Zip.fsproj" --target-framework netstandard1.6" exited with code -1. [C:\PROJ\FAKE\src\app\Fake.IO.Zip\Fake.IO.Zip.fsproj]

It seems like the bootstrapper still does a lot of requests when it shouldn't (that would improve speed in this scenario as well)

$ .paket/paket.bootstrapper.exe --max-file-age=720 --run --version
Checking Paket version (version 5.0.0-beta006 requested)...
Hash file of version 5.0.0-beta006 not found in cache.
Starting download from https://github.com/fsprojects/Paket/releases/download/5.0.0-beta006/paket-sha256.txt
Hash file of version 5.0.0-beta006 not found in cache.
Starting download from https://github.com/fsprojects/Paket/releases/download/5.0.0-beta006/paket-sha256.txt
No hash file of version 5.0.0-beta006 found in cache.
Copying version 5.0.0-beta006 from cache.
Done in 1.33 second(s).
Paket version 5.0.0-beta006

Known workarounds

Do not use magic mode

@matthid matthid added the bug label May 25, 2017
@forki
Copy link
Member

forki commented May 26, 2017

/cc @vbfox

@vbfox
Copy link
Contributor

vbfox commented May 26, 2017

It's a regression introduced by the hash file download, the cache for it never works (File is downloaded to a temporary location and never moved to the cache) it's not really linked to magic mode :)
Any use of the boostrapper would produce the same effect.

I'll fix it anyway 🦊

@matthid
Copy link
Member Author

matthid commented May 26, 2017

@vbfox Yeah I know (see my bug report which is without magic mode). It's just that this bug renders magic mode unusable with solutions containing a couple of netcore projects, because github is blocking quite fast...

Yeah I fix would be highly welcome because it is quite frustrating that I had to remove magic mode for now. (Sorry usually I'd just fix this myself but atm I'm trying to focus on a FAKE 5 release)

vbfox added a commit to vbfox/Paket that referenced this issue May 26, 2017
The hash file was never cached and always downloaded again

Fixes fsprojects#2365
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants