Skip to content
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

VS Code marketplace rate limit error #12840

Closed
garagatyi opened this issue Mar 6, 2019 · 24 comments
Closed

VS Code marketplace rate limit error #12840

garagatyi opened this issue Mar 6, 2019 · 24 comments
Assignees
Labels
kind/bug Outline of a bug - must adhere to the bug report template. lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale.

Comments

@garagatyi
Copy link

Description

VS Code marketplace impose rate limiting on access to the extensions binaries.
PR eclipse-che/che-plugin-broker#35 makes broker do retries and send pretty error to Che but still doesn't prevent blocking of workspace start because of rate limiting.
This often happens when user sets many VS Code extensions in his workspace configuration or several users share public IP which gets blocked when access rate is too high.
It seems VS Code itself bypasses this problem, but I haven't found how. We need to investigate how exactly it is done.
Another possible improvement is not to download extensions when workspace plugins list doesn't change, so provisioning could be cached.

Related issues:
#12831
#12762

Reproduction Steps

OS and version:

Diagnostics:

@garagatyi garagatyi added the kind/bug Outline of a bug - must adhere to the bug report template. label Mar 6, 2019
@garagatyi
Copy link
Author

@l0rd it is problem we discussed today.
@ibuziuk @skabashnyuk @benoitf @evidolob FYI

@l0rd
Copy link
Contributor

l0rd commented Mar 11, 2019

Full exception as reported by @benoitf:

{
"$id":"1",
"innerException":null,
"message":"Anonymous usage from IP address ***** has exceeded our rate limits and is being blocked. Anonymous access from this IP address will be unblocked within the next 1 minute. You can also consider logging in to get unblocked. Logged in users have higher limits. Learn more: https://go.microsoft.com/fwlink/?LinkId=823950.",
"typeName":"Microsoft.TeamFoundation.Framework.Server.RequestBlockedException,Microsoft.TeamFoundation.Framework.Server",
"typeKey":"RequestBlockedException",
"errorCode":0,
"eventId":3000
}

cc @slemeur

@l0rd
Copy link
Contributor

l0rd commented Mar 18, 2019

The possible solution for this problem can range from a lazy caching mechanism (once we request one vs code extensions we don't request it anymore) to a vs code extension mirror (we pre-fetch all the extensions).

In the short term, to mitigate the problem, we could look at these solutions:

  • embed the vs code extensions that are currently in the che-plugin-registry in their sidecar image
  • embed the extensions in the che-plugin-registry docker image and change the meta.yml to point to it.
  • look at some already existing alternative URLs to download the extension (i.e. the artifact produced by the CI/CD of the extensions)

@garagatyi
Copy link
Author

Additional details for the assignee:
We have 10 VS Code plugins in the registry that are useful (I do not treat sonarlint extension as such).
4 of them are published by Red Hat.
We should check if any of plugins (especially non-redhat owned ones) are publishing github releases or host archive binaries anywhere else.

@apupier
Copy link
Contributor

apupier commented Apr 15, 2019

I also hit this issue having just 1 or 2 plugins (I reproduced several times with a mix of Camel, Java and XML) in my stack. this is quite annoying and it was not easy to find the root cause.

What about an even shorter-term solution which is reporting a better error message to user, inviting her/him to retry later pointing that there is a rate limit reached?

@fbricon
Copy link

fbricon commented Apr 18, 2019

The latest vsix have been "released" on github:

@ibuziuk
Copy link
Member

ibuziuk commented Apr 18, 2019

@skabashnyuk @garagatyi @l0rd guys, I'm not very fluent with plugin versioning update process. Could you please clarify the policy? e.g. both xml and yaml plugins used in our registry are obsolete. Should we create dedicated folders with versioning? So, far I created eclipse-che/che-plugin-registry#113 just for url switch

@garagatyi
Copy link
Author

@ibuziuk problematic part is that we do not have proper ways for a user to use newer version of plugins in a workspace. So, we usually update just URL to the binary of the plugin.
But since VS Code plugins are properly versioned this seems a bad practice.
We should definitely invest in #12937

At this point of time I'm +1 to create new version for yaml and xml plugins.

@ibuziuk
Copy link
Member

ibuziuk commented Apr 19, 2019

At this point of time I'm +1 to create new version for yaml and xml plugins.

@garagatyi @l0rd so are you ok if UD would display 'n' versions of plugin atm once we add latest versions to the registry?

@l0rd
Copy link
Contributor

l0rd commented Apr 19, 2019

@ibuziuk yes that's ok. That's a UD problem and we are removing the list of plugins and editors from the create workspace panel in UD #12896 and moving it inside che-theia #12905.

@l0rd
Copy link
Contributor

l0rd commented Apr 19, 2019

@ibuziuk since you have done the first PR can you add the newest version of JDT LS as well? Hence adding new meta.yaml.

@ibuziuk
Copy link
Member

ibuziuk commented Apr 19, 2019

@l0rd sure thing will do
@fbricon @gorkem could you please give a hand with redhat-developer/vscode-java#892

@ibuziuk
Copy link
Member

ibuziuk commented Apr 23, 2019

Some updates before updating plugin registry on prod:

@fbricon
Copy link

fbricon commented Apr 23, 2019

vscode-yaml 0.3.0 and vscode-redhat.java recent builds have now been attached to github releases

@apupier
Copy link
Contributor

apupier commented Apr 24, 2019

Is usage of Github release artefact a temporary hack?
We are loosing the metrics having them.
it is forcing to add an extra step to configure jobs to push the artefact too.

@ibuziuk
Copy link
Member

ibuziuk commented Apr 24, 2019

@apupier yes, this might be temporary if we find a better way to avoid rate limit issues, so far there was no straight forward solution found

@l0rd
Copy link
Contributor

l0rd commented Apr 24, 2019

@ibuziuk @apupier this is a temporary solution to mitigate a blocking problem. After Che 7 GA is released we should start working on a lazy caching mechanism or a VS Code Marketplace mirroring as described #12840 (comment).

@ibuziuk
Copy link
Member

ibuziuk commented Apr 25, 2019

@l0rd atm there are only 2 plugins that still use marketplace (node-debug / node-debug2), so I sent PR for updating prod (also includes naming convention changes) - openshiftio/saas-openshiftio#1255

Once merged I believe we can stop working on this issue at least till GA since the error should not appear with the updated registry. It might make sense to add some section in README to discourage referencing marketplace directly for the time being WDYT?

@l0rd
Copy link
Contributor

l0rd commented Apr 25, 2019

@ibuziuk thanks makes sense

ibuziuk added a commit to openshiftio/saas-openshiftio that referenced this issue Apr 25, 2019
Includes changes required for naming convention and vs code marketplace rate limit error:
- eclipse-che/che-plugin-registry#55
- eclipse-che/che#12840
@ibuziuk
Copy link
Member

ibuziuk commented May 7, 2019

Sometimes hit this problem during installation of java debugger - microsoft/vscode-java-debug#583

vrubezhny added a commit to che-incubator/vscode-intelephense that referenced this issue May 24, 2019
The initial commit for PHP Intelephense Language Support extension.
The aim is to create the `Releases` download source the extension  `vsix` archives on GitHub
in order to workaround the `VS Code marketplace rate limit error #12840` issue (eclipse-che/che#12840)

Issue eclipse-che/che#12797

Signed-off-by: Victor Rubezhny <vrubezhny@redhat.com>
@benoitf
Copy link
Contributor

benoitf commented May 28, 2019

@ibuziuk
Copy link
Member

ibuziuk commented Jun 4, 2019

@benoitf I haven't tried but I believe any link with valid vsix would work

@benoitf
Copy link
Contributor

benoitf commented Jun 5, 2019

I mean, these links are generics, it's easy to have links for any vs code extension and it's like the final redirect of marketplace download so there is no limit rate

@che-bot
Copy link
Contributor

che-bot commented Dec 5, 2019

Issues go stale after 180 days of inactivity. lifecycle/stale issues rot after an additional 7 days of inactivity and eventually close.

Mark the issue as fresh with /remove-lifecycle stale in a new comment.

If this issue is safe to close now please do so.

Moderators: Add lifecycle/frozen label to avoid stale mode.

@che-bot che-bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Dec 5, 2019
@che-bot che-bot closed this as completed Dec 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Outline of a bug - must adhere to the bug report template. lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale.
Projects
None yet
Development

No branches or pull requests

7 participants