-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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
[v2] Rewrite code-server to use new web stuff #857
Conversation
Reading, watching, saving, etc all seem to work now.
I didn't like how the inner objects accessed parent objects, so I restructured all that.
This makes the file tree work.
@sabrehagen My CI passes (it provides dailies) so Idk what failed in the CI. I'll investigate later on. |
It wasn't merged with CI failing; it was merged with CI in
progress. The only thing added since the last successful build was
a flag to the Docker command in the README so waiting wasn't
necessary.
Once the branch was merged and deleted, the pending checks failed
because they couldn't clone the branch. 💥
|
@code-asher sweet, just a technicality 👍 |
@code-asher, how does this address #241? I'm attempting to run the container in k8s under a path /code-server but cannot get it to work. It gets the GET /code-server/ request, but just returns 404. Is the idea that I have to put an additional nginx reverse proxy after the LB just to make this happen? Thanks |
how to give base path? |
V3 no longer requires a base path so you won't need to pass it in. If you're still using v2 and you're trying to access code-server at
|
@code-asher I'm running 3.1.1 and while most of VSCode works, there are still things pointing to /static/* which are getting 404 since my code-server instance is being proxied via /vscode. Specifically, the Terminal will not load. Here's one of the errors: I'm running code-server behind an nginx proxy using the following:
This could totally be something I did wrong... any ideas? |
Looking at the vscode html returned... I see the following for all "/static/.*" links:
Shouldn't this be |
I was able to get this all running with the following changes to the nginx config... this is less than ideal though as it could interfere with locations in my / config...
I'm sure I can simplify the config a bit with a location regex... but this was just for a test. I'm down to one remaining error... but that might be a vscode issue:
|
The If you do plan on doing that, it might have something to do with your oauth proxy? Browsers won't send cookies for You're right about the 404 error for the |
It happens with any request under /static so the UI never loads since all the JavaScript and CSS are located there. |
Bugger, I'm not sure what the issue could be in that case. What are you using to do the oauth? I'll try to run the same and see if I can replicate the issue. |
I'm using https://github.com/oauth2-proxy/oauth2-proxy in docker. I'm using the following containers: linuxserver/code-server FWIW, even when I completely disabled the oauth2-proxy on that handler (basically no auth_request directive) I'm still unable to get it working as a subfolder. The oauth stuff was only added once I had a working config by adding the /static and /update locations so I don't want those oauth lines to throw you off. It didn't work with the following nginx config:
When I switched to using a subdomain instead of subfolder, everything works as expected. So I'm not sure why code-server isn't trying to access https://host/code-server/static and instead tries to access http://host/static. I have all 3 of these containers running within a separate network and the only host exposure is 80/443 in linuxserver/letsencrypt. Let me know if a docker-compose.yml and some basic config files to replicate the issue in a github repo would help out and I can create that. |
Ahh interesting, I'll try it out today with a subfolder and see what I can turn up. |
Ohh wait is it the trailing slash? If you browse to: With the former, a relative URL will result in |
This uses the new web and remote functionality VS Code has implemented which has made it possible to shrink the code base by about a factor of ten. It should be much easier to upgrade VS Code versions now and it'll fix a decent number of issues. As the web portion of VS Code matures we'll be able to shrink our patch and maybe even remove it entirely or almost entirely.
There are also some differences in defaults. Mainly things have been made additive instead of subtractive.
No password instead of password.(Have since changed this back.)Flags have changed:
--auth password
to enable password authentication. The idea here is to eventually support other authentication methods.I think v2 is on par feature-wise with v1 except:
Can't upload vsix files.(1.37.0 added this)Running tasks doesn't work.(fixed)Can't upload files.(implemented)Todo:
The next big thing will be to get language support working which I think should be pretty easy now (that's another big benefit to this rewrite).(Implemented.)This time around for the patch I opted to keep context because I found that no context made upgrading tricky in the past.