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 nodejs apt source repo from 18.x to 20.x #2955

Merged
merged 2 commits into from
Jun 21, 2024

Conversation

kkimurak
Copy link
Contributor

Required version is updated from v18.16.x to v20.13.x with GitLab v17.0.0 release.
This PR upgrade nodejs apt source repo from 18.x to 20.x. Currently nodejs 20.15.0 is installed.

Documentation:

.tool-versions:

GitLab v17.0.0 or later requires (grants) nodejs v20.13.x or later, but nodejs v20.5.1 is installed for focal even later LTS are released.
To avoid this issue, official installer script uses "nodistro" instead of specific distribution. So this PR also change apt source for nodjs from "focal" to "nodistro"
See: https://github.com/nodesource/distributions/blob/83867e0fdde8ebb17f5f83644f00c4bb180a4568/scripts/deb/setup_20.x#L74

If we change the source repo to 20.x, GPG key also must be updated (if not, build fails with GPG error on installting nodejs).


Alternate design : replace nodejs installation to use nodesource script like below:

 curl -fsSL https://deb.nodesource.com/setup_20.x | sudo bash - 

https://deb.nodesource.com/

Official documentation also do similar thing. See https://docs.gitlab.com/17.0/ee/install/installation.html#5-node

kkimurak added 2 commits June 21, 2024 10:24
Required version is updated from v18.16.x to v20.13.x
with GitLab v17.0.0 release.

Documentation:
- "Bump required Node.js version to 20 in installation guide"
  https://gitlab.com/gitlab-org/gitlab/-/merge_requests/154523

.tool-versions:
- "Update .tool-versions and .nvmrc to use nodejs v20.12.2"
  https://gitlab.com/gitlab-org/gitlab/-/merge_requests/149615

- Set distro to "nodistro" for nodejs to get later updates

GitLab v17.0.0 or later requires (grants) nodejs v20.13.x or later,
but nodejs v20.5.1 is installed for focal even later LTS are released.
To avoid this issue, official installer script uses "nodistro"
instead of specific distribution.

See:
https://github.com/nodesource/distributions/blob/83867e0fdde8ebb17f5f83644f00c4bb180a4568/scripts/deb/setup_20.x#L74
as original one caused following error:

    W: GPG error: https://deb.nodesource.com/node_20.x nodistro InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 2F59B5F99B1BE0B4
    E: The repository 'https://deb.nodesource.com/node_20.x nodistro InRelease' is not signed.
Copy link
Collaborator

@sachilles sachilles left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@sachilles
Copy link
Collaborator

@kkimurak Thank you!

@sachilles sachilles merged commit 2e99bb1 into sameersbn:master Jun 21, 2024
3 checks passed
@kkimurak kkimurak deleted the bump-nodejs-to-20.x branch June 23, 2024 14:37
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

Successfully merging this pull request may close these issues.

2 participants