Skip to content

Added handling for cache not being accessible - #1764

Merged
forki merged 1 commit into
fsprojects:masterfrom
xavierzwirtz:cache-error-handling
Jun 29, 2016
Merged

forki merged 1 commit into
fsprojects:masterfrom
xavierzwirtz:cache-error-handling

Conversation

@xavierzwirtz

Copy link
Copy Markdown
Contributor

Fixes #1758

I moved the directory creation to when the cache is loaded from the dependencies file. It tries to create the directory if it doesn't exist, and doesn't include the cache in the feed list or cache list if it fails.

@xavierzwirtz

Copy link
Copy Markdown
Contributor Author

This broke the Paket.DependenciesFile.ParserSpecs.should read config with caches test. It is no longer returning any caches that are not accessible.

@forki

forki commented Jun 28, 2016

Copy link
Copy Markdown
Member

yeah we should not do this during parsing.

@xavierzwirtz

Copy link
Copy Markdown
Contributor Author

Where would be the best place to do it? It feels like it needs to be done for every case where the cache would be accessed, the earlier in the process the better. Otherwise, in cases where there are a lot of dependencies there will be a slow call out to the network for every restore. What about an optional argument to DependenciesFile.ReadFromFile, defaulting to true, that ignores caches that are not accessible?

@forki

forki commented Jun 28, 2016

Copy link
Copy Markdown
Member

I think it should be done differently. We "just" need to make the cache calls more robust. we should not filter them out.

@xavierzwirtz
xavierzwirtz force-pushed the cache-error-handling branch from b17990d to 9da53ef Compare June 28, 2016 16:31
@xavierzwirtz

Copy link
Copy Markdown
Contributor Author

Pushed error handling. This resolves the issue, but there is now a pretty hefty speed penalty when the cache is not accessible. I think it would be better if there was a single check for cache accessibility, because as it stands now there are 2 * packageCount, and each check can take upwards of 2 seconds to timeout.

@forki

forki commented Jun 29, 2016

Copy link
Copy Markdown
Member

Maybe additionally we can now blacklist caches during the lifetime of one
paket call. But I think it was important to first make the calls safe
On Jun 28, 2016 6:49 PM, "Xavier Zwirtz" notifications@github.com wrote:

Pushed error handling. This resolves the issue, but there is now a pretty
hefty speed penalty when the cache is not accessible. I think it would be
better if there was a single check for cache accessibility, because as it
stands now there are 2 * packageCount, and each check can take upwards of
2 seconds to timeout.

—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#1764 (comment),
or mute the thread
https://github.com/notifications/unsubscribe/AADgNOogpjIQ6sgp6B4LvX04Y-fVzaVBks5qQVC1gaJpZM4I_RFi
.

@forki
forki merged commit 9da53ef into fsprojects:master Jun 29, 2016
@xavierzwirtz

Copy link
Copy Markdown
Contributor Author

Thanks! This is already a lot better. I am able to run paket restore now without being vpn'd into the main office.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants