-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Fix 429 errors on OVSX requests #14030
Conversation
Could you explain a bit how #13825 lead to the 429 errors? After all, we did not rate limit before and we didn't after. Did we just increase the number of requests? |
@tsmaeder Yes, exactly :) After #13825, we perform 2 requests for every |
af7ea6a
to
8ac4717
Compare
e435dbc
to
c877cb8
Compare
I just ran |
@tsmaeder I've added exponential backoff to our requests. I think this should work around the issues of open-vsx reasonably well. |
if (context.res.statusCode === 429) { | ||
// If there are still more attempts left, retry the request with a higher token count | ||
if (i < attempts - 1) { | ||
continue; |
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.
As a last nitpick, can we get a warning if we ran into 429's even if we eventually succeed? IMO it's important info also for open-vsx.
What it does
After #13825 we started having a few 429 errors (and adopters as well) when downloading plugins from extension packs.
This change correctly propagates the OVSX rate limit through all layers of the application including the runtime. This can be seen in the
ovsx-http-client.ts
file changes. This should ensure that users never hit 429 errors from OVSX. If they do, they can use a lower rate limit via a CLI option.How to test
I've upped the rate limit in the CI - the CI should run successfully.
Also, simply running the
theia download:plugins
CLI command should run without errors.Review checklist
Reminder for reviewers