-
Notifications
You must be signed in to change notification settings - Fork 5.9k
[Feat]: Allow installing .vsix extensions in restricted environments #5465
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
Comments
I believe we can already do this by running the following:
I've tested this without a network connection and everything works as expected. |
You're right 🤔 Weird. I used cc @code-asher can you confirm you're seeing the same thing? Maybe this is no longer an issue. |
Huh yeah it works for me too now. I tried the Python extension which was the one that was hanging for me. |
Hmm...this person says it's still happening. I may investigate adding an integration test to verify that it does not make any network requests and works offline. |
I'm using a slightly outdated version of code-server (v4.3.0) but I run into the same issue which is that it takes a little over 2 minutes for a single extension to install. I've never had one outright fail to install, it's always just been very slow because of the call to the marketplace that's been added to VS Code sometime ago now. |
@cccs-nik are you in an offline or restricted environment? @code-asher noticed that the behavior is different with the latest version. |
Yeah I'm in a restricted environment. I'll give the latest version a try and get back to you. |
@jsjoeio I tried with code-server v4.6.0 (Code 1.70.1) and I'm getting the same behavior still. A little over 2 minutes for a single extension to install. |
@cccs-nik very helpful - thank you so much! Appreciate your help. I was chatting with @code-asher - we believe that this only happens in restricted environments. He was doing some poking around to see if we could figure out what the root cause is. Still working on that though. |
Yeah I am still unclear on how exactly to reproduce. I have tried 1) going |
If there is a firewall dropping packets then I assume there is a timeout somewhere in code-server we can lower although I am not sure what a good timeout is; maybe in some slow environments it really does take two minutes to resolve. So if this is what is happening then the ideal fix is likely to make the firewall respond with a denial rather than silently dropping. |
@code-asher i've ran tcpdump while starting code server and installing local VSIX extesions.
|
That makes sense, those queries must be timing out in some environments. Looks like the upstream issue has stalled unfortunately. One dumb hack that I think will work is to unset the marketplace gallery:
|
Closing this out for now since it appears to be an upstream issue which while we could patch, would be better fixed upstream, and because I think this can be resolved by blocking requests immediately rather than timing them out, although admittedly I am fuzzy on how this happens. |
What is your suggestion?
Allow users to install
.vsix
extensions offline via the CLI.Why do you want this feature?
Some community members and customers work in airgapped or offline environments and want to be able to install extensions.
Are there any workarounds to get this functionality today?
No.
Are you interested in submitting a PR for this?
Yes
Related
Technically this is upstream, but I'm considering fixing it first in code-server and then submitting a patch upstream
microsoft/vscode#142812
The text was updated successfully, but these errors were encountered: