-
-
Notifications
You must be signed in to change notification settings - Fork 14.3k
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
vimPlugins: Add description attribute from GitHub metadata. #90257
Conversation
@progval thanks for opening your first nixpkgs PR :) |
3434dd9
to
792eaf2
Compare
not entirely sure why, but the description line is missing a space:
should be
|
792eaf2
to
fa0348b
Compare
oh yeah I committed an older version of the file. It's fixed now |
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.
diff LGTM
1 package is getting updated, but I think that's acceptable.
just want to hear from some others
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.
Great idea, this would be nice to have. I do have concerns about the rate limit though.
# https://github.com/settings/tokens | ||
# and paste it, to get a rate-limit high enough for the script to complete | ||
# in reasonable time: | ||
OAUTH_TOKEN = None |
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.
The script previously explicitly avoided the GitHub API because of the rate limiting. Requiring every contributor to generate & set an oauth token is a significant change. I'm not entirely sure its worth the benefit.
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.
Also if we do decide to require an OAUTH token, it should be passed in through the environment instead of hard-coded into the script (os.environ.get("GH_TOKEN")
with some appropriate error message when it is not specified).
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.
The script previously explicitly avoided the GitHub API because of the rate limiting. Requiring every contributor to generate & set an oauth token is a significant change. I'm not entirely sure its worth the benefit.
You needed to provide one already anyway or otherwise you would get most likely rate limited.
Co-authored-by: Timo Kaufmann <[email protected]>
Yeah, that's a concern. Btw, when generating it from scratch, I also got rate-limited on |
That happens a lot though. Every time we update the vim plugins, which often happens when someone adds a new plugin. Requiring an oauth token increases the friction, meaning it will happen less often.
I added the backoff-retry mechanism at some point to work around that. Doesn't that work anymore? The advantage is that the rate limit is much softer than the one for the API. A backoff of ~10 seconds may already help. The API has a strict hourly rate limit (60 unauthenticated requests / hour), so just waiting it out is not really an option. I think the best way forward would be to teach nixpkgs-update about vim plugins (#83119 (comment)). Then individual contributors would only be concerned with new additions, which should fit into the 60 request limits. As long as vim plugin updates are manual, I'd prefer to keep the friction as low as possible so that people will keep doing it. |
not with the default value of
Understandable. Should I close this PR? |
That's a shame. The way we currently do things definitely isn't idea. Once we have nixpkgs-update do the package set updates, we could also start using the proper API for everything else the script does.
I have my concerns, but I don't want to block this PR alone. I'm curious what @jonringer, @teto or @evanjs think. Another approach would be to conditionally only fetch descriptions if the oauth token is set. That would mean that the descriptions would sometimes be available, sometimes not (depending on who last made the update). Might be confusing. If you do want to invest some time into improving the vim plugin infrastructure on nix, consider working on the nixpkgs-update integration. @ryantm has previously said that he would be open to contributions there. |
I don't really have the time to work on that, sorry :/ |
I think we actually need to switch to |
We probably need to switch at some point, but I think currently at least without any parallelism the update still works right? Being able to use the oauth token would be much nicer, but I do think it would decrease the amount of people willing to do an update. |
It might be bearable if it was easy to setup i.e. having to run a one liner. After all everyone has a github account anyway when contributing to nixpkgs. |
Yeah my concern is less that people cannot do it, its just that it adds just enough friction that they won't. Now you either have to store your oauth token somewhere (and do that securely) or regenerate it every time. Still I'm not completely opposed to this, since the status quo is far from perfect too. I don't know. If you want to move this forward, go ahead :) |
I marked this as stale due to inactivity. → More info |
an interesting thing to have. Maybe without token, it could retreive the existing nix description or leave the field empty. |
I marked this as stale due to inactivity. → More info |
Motivation for this change
Adding the missing
metadata
attribute (for searches, etc.)Things done
Changed the
update.py
to output it, and recreatedgenerated.nix
.There are no changes to the derivations.