Skip to content

Commit 651ef71

Browse files
authored
chore: Define Node.js version with Node Version Manager in Feast UI (#4655)
1 parent 986dc92 commit 651ef71

File tree

7 files changed

+23
-12
lines changed

7 files changed

+23
-12
lines changed

.github/workflows/build_wheels.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ jobs:
6464
- name: Setup Node
6565
uses: actions/setup-node@v3
6666
with:
67-
node-version: '17.x'
67+
node-version-file: './ui/.nvmrc'
6868
registry-url: 'https://registry.npmjs.org'
6969
- name: Build UI
7070
run: make build-ui
@@ -91,7 +91,7 @@ jobs:
9191
- name: Setup Node
9292
uses: actions/setup-node@v3
9393
with:
94-
node-version: '17.x'
94+
node-version-file: './ui/.nvmrc'
9595
registry-url: 'https://registry.npmjs.org'
9696
- name: Build and install dependencies
9797
# There's a `git restore` in here because `make install-go-ci-dependencies` is actually messing up go.mod & go.sum.

.github/workflows/release.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636
- name: Setup Node.js
3737
uses: actions/setup-node@v3
3838
with:
39-
node-version: "lts/*"
39+
node-version-file: './ui/.nvmrc'
4040
- name: Release (Dry Run)
4141
id: get_versions
4242
run: |
@@ -62,7 +62,7 @@ jobs:
6262
- name: Setup Node.js
6363
uses: actions/setup-node@v3
6464
with:
65-
node-version: "lts/*"
65+
node-version-file: './ui/.nvmrc'
6666
- name: Bump file versions
6767
run: python ./infra/scripts/release/bump_file_versions.py ${CURRENT_VERSION} ${NEXT_VERSION}
6868
- name: Install yarn dependencies
@@ -103,7 +103,7 @@ jobs:
103103
- name: Setup Node.js
104104
uses: actions/setup-node@v3
105105
with:
106-
node-version: "lts/*"
106+
node-version-file: './ui/.nvmrc'
107107
- name: Bump file versions (temporarily for Web UI publish)
108108
run: python ./infra/scripts/release/bump_file_versions.py ${CURRENT_VERSION} ${NEXT_VERSION}
109109
- name: Install yarn dependencies
@@ -138,7 +138,7 @@ jobs:
138138
- name: Setup Node.js
139139
uses: actions/setup-node@v3
140140
with:
141-
node-version: "lts/*"
141+
node-version-file: './ui/.nvmrc'
142142
- name: Set up Homebrew
143143
id: set-up-homebrew
144144
uses: Homebrew/actions/setup-homebrew@master

.github/workflows/unit_tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ jobs:
4949
- uses: actions/checkout@v4
5050
- uses: actions/setup-node@v3
5151
with:
52-
node-version: '20.x'
52+
node-version-file: './ui/.nvmrc'
5353
registry-url: 'https://registry.npmjs.org'
5454
- name: Install yarn dependencies
5555
working-directory: ./ui

ui/.nvmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
v20.18.0

ui/CONTRIBUTING.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ You can see the logic in [../sdk/python/feast/ui](../sdk/python/feast/ui/). This
2121

2222
Under the hood, what happens is that the Feast SDK spins up a server which exposes an endpoint to the registry. It then mounts the UI on the server and points it to fetch data from that registry.
2323

24+
## Node.js version
25+
[Node Version Manager](https://github.com/nvm-sh/nvm) is used for conveniently ensuring a consistent Node.js version. The version is defined in the [`.nvmrc`](.nvmrc) file, and you can install and use that version by running `nvm install` (or `nvm use` once it's installed).
26+
2427
## NPM package project structure
2528
The Web UI is powered by a JSON registry dump from Feast (running `feast registry-dump`). Running `yarn start` launches a UI
2629
powered by test data.

ui/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@
7777
"@testing-library/react": "^16.0.1",
7878
"@testing-library/user-event": "^14.5.2",
7979
"@types/jest": "^27.0.1",
80-
"@types/node": "^16.7.13",
80+
"@types/node": "^20.16.13",
8181
"@types/react": "^18.3.11",
8282
"@types/react-dom": "^18.3.0",
8383
"msw": "^0.36.8",

ui/yarn.lock

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2469,10 +2469,12 @@
24692469
resolved "https://registry.yarnpkg.com/@types/node/-/node-18.7.18.tgz#633184f55c322e4fb08612307c274ee6d5ed3154"
24702470
integrity sha512-m+6nTEOadJZuTPkKR/SYK3A2d7FZrgElol9UP1Kae90VVU4a6mxnPuLiIW1m4Cq4gZ/nWb9GrdVXJCoCazDAbg==
24712471

2472-
"@types/node@^16.7.13":
2473-
version "16.11.21"
2474-
resolved "https://registry.yarnpkg.com/@types/node/-/node-16.11.21.tgz#474d7589a30afcf5291f59bd49cca9ad171ffde4"
2475-
integrity sha512-Pf8M1XD9i1ksZEcCP8vuSNwooJ/bZapNmIzpmsMaL+jMI+8mEYU3PKvs+xDNuQcJWF/x24WzY4qxLtB0zNow9A==
2472+
"@types/node@^20.16.13":
2473+
version "20.16.13"
2474+
resolved "https://registry.yarnpkg.com/@types/node/-/node-20.16.13.tgz#148c152d757dc73f8d65f0f6f078f39050b85b0c"
2475+
integrity sha512-GjQ7im10B0labo8ZGXDGROUl9k0BNyDgzfGpb4g/cl+4yYDWVKcozANF4FGr4/p0O/rAkQClM6Wiwkije++1Tg==
2476+
dependencies:
2477+
undici-types "~6.19.2"
24762478

24772479
"@types/numeral@^2.0.5":
24782480
version "2.0.5"
@@ -11065,6 +11067,11 @@ undici-types@~6.19.2:
1106511067
resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-6.19.8.tgz#35111c9d1437ab83a7cdc0abae2f26d88eda0a02"
1106611068
integrity sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==
1106711069

11070+
undici-types@~6.19.2:
11071+
version "6.19.8"
11072+
resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-6.19.8.tgz#35111c9d1437ab83a7cdc0abae2f26d88eda0a02"
11073+
integrity sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==
11074+
1106811075
unherit@^1.0.4:
1106911076
version "1.1.3"
1107011077
resolved "https://registry.yarnpkg.com/unherit/-/unherit-1.1.3.tgz#6c9b503f2b41b262330c80e91c8614abdaa69c22"

0 commit comments

Comments
 (0)