-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[discuss] Require WSL2 for development on Windows #58069
Comments
Pinging @elastic/kibana-operations (Team:Operations) |
This sounds like a great idea to me. Allows us to deprio tons of things that provide no value to our customers 👍 |
I've used WSL (Ubuntu) for some minor tasks but haven't switched over to it as my main development mode. I'd like to take some time next week and really try switching over, using my IDE, etc. |
@tylersmalley can you run functional UI tests on your WSL? I installed google-chrome on mine and thought I'd be able to run tests with headless Chrome but hit this error;
Also, I came across these notes for dev on wsl https://medium.com/@janelgbrandon/a-guide-for-using-wsl-for-development-d135670313a6 Are you using VS Code? Did you do this? (I haven't tried yet); And do you lnk your Windows C: drive like they do? |
It sounds like if we go this route, we should at the very least provide some guidance in CONTRIBUTING.md on how to setup WSL for Kibana development. |
@LeeDr I run into issues with that and reporting too. Given the number of issues I think it makes sense to pick full support or no support. Getting CI setup to run native windows builds would go well with this. |
To be clear, I'm OK if we decide to drop support for development on Windows. I could likely get WSL working well enough, but I'd probably not do that and just use Ubuntu instead. So, what @jbudz said. |
@skearns64 @kimchy any thoughts on this overall? I don't know of a good way to gauge the impact on contributors. We don't want to alienate contributors but we also don't want to struggle with supporting an OS that certainly isn't used by most of the core Kibana team. |
I think it's helpful to provide more context here; we will plan to have a full guide to continued development on Windows using WSL2 which is supported by Microsoft. Development under native Windows is MUCH slower than even under WSL2 on the same hardware [1]. This is due to the file I/O performance under Windows and the sparse nature of a Node application. Additionally, supporting Windows directly for development has substantial overhead and leads to Windows specific errors. Compare this to the fact our CI runs on Ubuntu, which is supported by WSL. 1: There is a 60-70% increase in performance when using WSL2 on the same hardware. To bootstrap all of the Kibana node modules from scratch (using Yarn cache to eliminate the network latency from the test) average times went from 843s to 330s. Clean went from 76s to 21s. |
It seems you can't use WSL2 along with VirtualBox 5.x because of VT-x sharing (or lack of sharing). I've heard that some 6.x version of VirtualBox will work, but that the performance is very bad (I haven't tried myself yet). |
Now that I'm back on WSL version 1 (because I also need to use VirtualBox), it doesn't look like I get the performance improvements Tyler had in WSL2. From https://docs.microsoft.com/en-us/windows/wsl/wsl2-ux-changes "WSL 2 uses a Virtual Hardware Disk (VHD) to store your files ..." In fact, I find that WSL is slower :-(
So then I thought, I'll just Since I do use VirtualBox, I timed bootstrap on a Ubuntu VM running on my Windows laptop - Done in 327.84s. This is almost exactly what Tyler got on WSL2. My personal Intel Core-i5 CPU Ubuntu desktop with much lower hardware specs than my laptop beats them all with bootstrapping in 178s. |
I have been thinking about it, my biggest concern is that it will erode our ability to support windows over time. I mean, we don't really support windows for our packages, since we don't have an MSI installer for it (or for our full stack). I know this is unrelated, but I have seen it happening historically. We do live in a different world where WSL exists, so if this works well, I am supportive of it. Especially if this type of development on windows is happening for node not only in the context of Kibana? |
I can confirm that using WSL2 works well and gives significant performance improvements compared to both running plain Ubuntu or WSL1 on Windows. For anyone considering trying this out, these are the steps I took:
@tylersmalley However, I wasn't able to run functional tests with |
Looks like WSL2 is going to be easier to use soon https://www.infoq.com/news/2020/04/wsl-2-general-availability/ |
Do we happen to have any telemetry data on how many Kibana developers/contributors are using Windows without WSL? |
Closing this discuss issue. We are working on documentation for using WSL and will use it to provide to WIndows developers for direct feedback. |
With Windows Subsystem for Linux (WSL2), it's pretty seamless to develop using Ubuntu on Windows. I have been doing this for over a year now. So, it brings up the question as to if we want to continue supporting Windows development.
This would have no effect on the Windows package, and we would continue to support it as a platform in production.
Some things which greatly assist with Windows development on WSL2:
Related to:
npm run test
fails on Windows "EADDRNOTAVAIL 0.0.0.0:51126" #11407@LeeDr & @peteharverson, have you used WSL2 or have any reasons for not using it?
The text was updated successfully, but these errors were encountered: