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
vim-plugins: Add --debug flag to update.py. #83008
Conversation
pkgs/misc/vim-plugins/update.py
Outdated
@@ -407,6 +407,12 @@ def parse_args(): | |||
default=DEFAULT_OUT, | |||
help="Filename to save generated nix code", | |||
) | |||
parser.add_argument( | |||
"--debug", |
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.
How about --sync
?
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.
You can mention in the help test that this is useful for debugging.
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.
Done.
I am surprised that you are getting blocked. 30 requests is not really excessive. Most browsers open up to 30 requests in parallel. I never saw this issue. |
Me neither, however I just tried it myself and got this(which is how I stumbled upon this issue in the first place):
|
Ok. Maybe they changed something in their load balancer lately. In that case we maybe should try to reduce the pool size. |
It seems even a bit more trickier than that. They block not concurrent requests but something like requests per minute. In that case it depends on the users network connection when the throttling kicks in. |
An alternative would be the use of API keys. Than we have something like 5000 requests. |
This might also work to get the latest commit:
I don't know though if they also apply the same rate limits on their git api. |
Seems like most major services only trigger rate-banning if javascript is not being executed. I've been rate-banned from github for navigating too quickly in the browser with javascript disabled. |
8c5c33f
to
d09daef
Compare
d09daef
to
655cf62
Compare
Never had any problem with update.py. I just tried to package 3 vim plugins and witnessed the "new" limitation. Wouldn't it be more adaptable to choose the number of processes ? rather than a boolean |
@teto Yes, that would be more adaptable to this particular use case, but there is already a use case for updating synchronously, it was just commented out rather than exposed via flag. |
Don't you achieve the same behavior when setting processes to 1 ? this is less code. |
@teto You're right. I was under the impression that pdb wouldn't work but it does. I'd be fine with eliminating |
Sounds good to me! |
Unrelated probably but even after setting the number of processes to 1, I can't update from where I am (I never had these in the past):
|
This is based on discussion in NixOS#83008 and replaces it.
Closing in favor of #83798. |
Motivation for this change
I don't know how anybody is able to use this pooling so many github requests simultaneously. Github has always rate-banned me for doing stuff like this, even synchronously if it's too fast. At least with this flag one doesn't have to edit update.py to toggle this behavior.
Things done
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)nix path-info -S
before and after)