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

Upgrade Node.js to v18 #21724

Closed
gzdunek opened this issue Feb 13, 2023 · 5 comments · Fixed by #30985
Closed

Upgrade Node.js to v18 #21724

gzdunek opened this issue Feb 13, 2023 · 5 comments · Fixed by #30985
Assignees
Labels
github-actions teleport-connect Issues related to Teleport Connect. ui

Comments

@gzdunek
Copy link
Contributor

gzdunek commented Feb 13, 2023

Our builders currently use Node v16 which EOL is September 11th, 2023.
The main problem with the upgrade is that we use CentOS 7 image for Linux pipelines, which Node v18 does not support.
The proposed solution (after moving to GHA) is to use different image for each stage. We can then build tsh on CentOS 7 image and Connect on Ubuntu 22.04. That will be still one pipeline/build, but with multiple different OS-es.
We will have to do something similar for the Web UI.

See the discussion https://gravitational.slack.com/archives/C0DF0TPMY/p1675850357270049

@ravicious
Copy link
Member

ravicious commented Mar 3, 2023

Note on Electron and node-pty. Electron v23 ships with Node v18 already. As node-pty's docs say:

Node.JS 16 or Electron 19 is required to use node-pty. What version of node is supported is currently mostly bound to whatever version Visual Studio Code is using.

The VSCode team is yet to upgrade to Electron v22 (microsoft/vscode#166265). So we have to either wait for them to upgrade to v23 or check if node-pty is indeed incompatible with Node v18. node-pty docs are slightly out of date as node-pty is working just fine with Electron v22.

Edit: Grzegorz says that during cursory testing node-pty was working fine with Electron v23 so we might be safe to update.

@wadells
Copy link
Contributor

wadells commented May 25, 2023

@gzdunek: Did #26072 take care of this, or is there still more work to be done for this upgrade?

@zmb3 zmb3 added the teleport-connect Issues related to Teleport Connect. label May 25, 2023
@gzdunek
Copy link
Contributor Author

gzdunek commented May 26, 2023

No, it didn't take care of it. As I wrote in #26856 (comment) we still have to update the version in the buildboxes.

@gzdunek
Copy link
Contributor Author

gzdunek commented May 26, 2023

Some updates on the Node upgrade:

There is an idea to build Node from source on the systems that don't support it. I experimented with that, here Node is built on centos:7 and it works fine https://drone.platform.teleport.sh/gravitational/teleport/24491/3/1 (it takes around 8 minutes).

But I talked to @jakule yesterday and we believe that it is not an ideal solution, and a better approach would be to build WebUI and Connect on a newer OS (to be precise, Connect is going to be built on a different image soon).

There is a plan to move the rest of our pipeline to GHA in Q2/Q3, so our proposal is to wait, let's say until the end of July, and see if we have GHA for Linux or not. If yes, then we can move building WebUI to run on a different stage then the teleport binary, if not, then we can go to plan B (build from source).

Does it sound good?

@jakule
Copy link
Contributor

jakule commented May 26, 2023

Here is some more context about building Node on CentOS 7 nodejs/node#43246

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
github-actions teleport-connect Issues related to Teleport Connect. ui
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants