-
-
Notifications
You must be signed in to change notification settings - Fork 51
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
Auto-update index periodically #1447
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see why you want to do this, we regularly have questions from people that never update the index. However I am a but worried about the consequences :)
What happens if there's no internet connection?
Actually I thought that you also wanted it :) given the discussion in #1348. Yup, I forgot to test what happens in the offline case. We should fail the update gracefully with a warning and continue as before. We probably don't want to try again immediately but back-off for the configured period in any case. I'll do a bit more testing. |
I like the change. I was once on of those that had to ask why alr couldn't find a newer version of a crate that I could see in the index on GitHub. One comment I have is that while |
dbf3fc2
to
f9e3603
Compare
a9474f5
to
38090b0
Compare
Updated to ensure that an automatic update failure causes the regular backoff, and is handled as a warning. Also added a test for it. I didn't find a simple solution to make the test locally, so that test uses an online repo I created to that effect. There may be solutions around that by using a local git server, but that seemed too complex just to avoid going online, given that that's not a crucial situation for our testing. |
Default every 24h. The user is asked the first time.
Fixes #1348