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 to Node 20 #3783

Merged
merged 1 commit into from
Feb 28, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x]
node-version: [20.x]
steps:
- uses: actions/checkout@v4
- name: Setup Node.js ${{ matrix.node-version }}
Expand Down Expand Up @@ -41,7 +41,7 @@ jobs:
${{ github.workspace }}/node_modules
${{ github.workspace }}/backend/node_modules
${{ github.workspace }}/frontend/node_modules
key: ${{ runner.os }}-18.x-modules-${{ hashFiles('**/package-lock.json') }}
key: ${{ runner.os }}-20.x-modules-${{ hashFiles('**/package-lock.json') }}
- name: Run linting and formatting checks
run: npm run lint:frontend:backend

Expand All @@ -58,7 +58,7 @@ jobs:
${{ github.workspace }}/node_modules
${{ github.workspace }}/backend/node_modules
${{ github.workspace }}/frontend/node_modules
key: ${{ runner.os }}-18.x-modules-${{ hashFiles('**/package-lock.json') }}
key: ${{ runner.os }}-20.x-modules-${{ hashFiles('**/package-lock.json') }}
- name: Run backend unit tests with coverage
run: |
npm run test:backend:unit-coverage
Expand Down Expand Up @@ -147,7 +147,7 @@ jobs:
${{ github.workspace }}/node_modules
${{ github.workspace }}/backend/node_modules
${{ github.workspace }}/frontend/node_modules
key: ${{ runner.os }}-18.x-modules-${{ hashFiles('**/package-lock.json') }}
key: ${{ runner.os }}-20.x-modules-${{ hashFiles('**/package-lock.json') }}
- name: Run Cypress Mock tests
run: |
if [ "${{ matrix.test-group }}" == "default" ]; then
Expand Down Expand Up @@ -225,7 +225,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x]
node-version: [20.x]
needs:
- Setup
- Lint
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
ARG SOURCE_CODE=.

# Use ubi8/nodejs-18 as default base image
ARG BASE_IMAGE="registry.access.redhat.com/ubi8/nodejs-18:latest"
ARG BASE_IMAGE="registry.access.redhat.com/ubi8/nodejs-20:latest"

FROM ${BASE_IMAGE} as builder

Expand Down
2 changes: 1 addition & 1 deletion backend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion backend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"url": "https://github.com/opendatahub-io/odh-dashboard/issues"
},
"engines": {
"node": ">=18.0.0"
"node": ">=20.0.0"
},
"main": "src/server.ts",
"scripts": {
Expand Down
4 changes: 2 additions & 2 deletions docs/dev-setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
ODH requires the following to run:

- [NodeJS and NPM](https://nodejs.org/)
- Node recommended version -> `18.18.2`
- NPM recommended version -> `9.8.1`
- Node recommended version -> `20.18.0`
- NPM recommended version -> `10.8.2`
- [OpenShift CLI](https://docs.redhat.com/en/documentation/openshift_container_platform/4.16/html/cli_tools/openshift-cli-oc)
- [kustomize](https://github.com/kubernetes-sigs/kustomize) (if you need to do deployment)

Expand Down
2 changes: 1 addition & 1 deletion frontend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"url": "https://github.com/opendatahub-io/odh-dashboard/issues"
},
"engines": {
"node": ">=18.0.0"
"node": ">=20.0.0"
},
"scripts": {
"build": "run-s build:prod",
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"url": "https://github.com/opendatahub-io/odh-dashboard/issues"
},
"engines": {
"node": ">=18.0.0"
"node": ">=20.0.0"
},
"scripts": {
"build": "run-p -l build:*",
Expand Down
2 changes: 1 addition & 1 deletion scripts/ci/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ ARG CYPRESS_CACHE=$USER_HOME/.cypress-cache
ARG CHROME=https://dl.google.com/linux/direct/google-chrome-stable_current_x86_64.rpm
ARG OCP_CLI=https://mirror.openshift.com/pub/openshift-v4/clients/ocp/stable/openshift-client-linux.tar.gz
ARG NVM_INSTALLER=https://raw.githubusercontent.com/creationix/nvm/v0.39.7/install.sh
ARG NODE_VERSION=v20.15.0
ARG NODE_VERSION=v20.18.0
Copy link
Member

Choose a reason for hiding this comment

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

Have we always built our images with 20? lol... interesting...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, @manosnoam suggested this a long time ago, I cannot recall the conversation but we agreed on having ci tests on Node 20.


USER root

Expand Down
Loading