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

Is it make sense for Node.js team to enable codespaces #1071

Open
gengjiawen opened this issue Aug 13, 2021 · 10 comments
Open

Is it make sense for Node.js team to enable codespaces #1071

gengjiawen opened this issue Aug 13, 2021 · 10 comments

Comments

@mcollina
Copy link
Member

I think this would be a good idea if Github gently donated the cloud resources.

I'm also not sure codespaces can actually build node..
@bnb definitely knows more.

@targos
Copy link
Member

targos commented Aug 13, 2021

Codespaces aren't available to the Node.js organization yet, but we can definitely have the conversation before.

@mcollina You can do anything in them, they are ubuntu vms with root access.

@mcollina
Copy link
Member

I mean I'm unsure how long it would take to build Node.js in there without some kind of compilation cache.

@devsnek
Copy link
Member

devsnek commented Aug 13, 2021

it took 46 minutes the last time i tested it.

@devsnek
Copy link
Member

devsnek commented Aug 13, 2021

That being said i would be 110% for a project sponsored compilation cache. Perhaps we could use electron's.

@jasnell
Copy link
Member

jasnell commented Aug 13, 2021

@mcollina:

I'm also not sure codespaces can actually build node..

They can. I've done it many times before. With a codespace, it's possible to set it up with a default configuration and custom .dotfiles so that ccache can be made available. That's not going to speed up a fresh build, of course, but a codespace (once created) can be persisted for a while so that subsequent builds are faster.

@bnb
Copy link
Contributor

bnb commented Aug 20, 2021

hi sorry going through my notifications now and just catching this.

I've built Node.js on every single machine size (I assume this likely surprises nobody). Codespaces can indeed build Node.js, but machine size really matters - you basically want to go as high as you can.

I did a side-by-side comparison back when it was still VS Codespaces (the infra is largely the same from what I understand) on Basic vs. Premium. Basic crashed before the compile completed, after about 2 hours. Premium (8 cores) took about 20-25 minutes. The Normal (4 core) machines that Codespaces defaulted to until they added the ability to switch between sizes took about 40-45 minutes IIRC, which matches the time that @devsnek pointed out.

Pre-building a Docker image would likely help quite a bit, which aligns with nodejs/node#39672 pretty nicely. Dropping in a devcontainer.json file with some additional configuration on top of that would likely make this a pretty good experience.

@bnb
Copy link
Contributor

bnb commented Aug 20, 2021

That being said i would be 110% for a project sponsored compilation cache. Perhaps we could use electron's.

AFAIK this is pretty tied to Azure-based infrastructure. Happy to internally advocate for donating that infrastructure to the project if we do go down this path.

@mcollina
Copy link
Member

That would be indeed a really good stack/progress.

@simoneb
Copy link

simoneb commented Jun 16, 2022

I posted the same in nodejs/node#39672.

https://github.blog/changelog/2022-06-15-prebuilding-codespaces-is-generally-available/

/cc @ShogunPanda

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants