Skip to content

Commit

Permalink
chore: Define Node.js version with Node Version Manager in Feast UI (f…
Browse files Browse the repository at this point in the history
  • Loading branch information
peruukki authored Oct 20, 2024
1 parent 986dc92 commit 651ef71
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 12 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build_wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ jobs:
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: '17.x'
node-version-file: './ui/.nvmrc'
registry-url: 'https://registry.npmjs.org'
- name: Build UI
run: make build-ui
Expand All @@ -91,7 +91,7 @@ jobs:
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: '17.x'
node-version-file: './ui/.nvmrc'
registry-url: 'https://registry.npmjs.org'
- name: Build and install dependencies
# There's a `git restore` in here because `make install-go-ci-dependencies` is actually messing up go.mod & go.sum.
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: "lts/*"
node-version-file: './ui/.nvmrc'
- name: Release (Dry Run)
id: get_versions
run: |
Expand All @@ -62,7 +62,7 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: "lts/*"
node-version-file: './ui/.nvmrc'
- name: Bump file versions
run: python ./infra/scripts/release/bump_file_versions.py ${CURRENT_VERSION} ${NEXT_VERSION}
- name: Install yarn dependencies
Expand Down Expand Up @@ -103,7 +103,7 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: "lts/*"
node-version-file: './ui/.nvmrc'
- name: Bump file versions (temporarily for Web UI publish)
run: python ./infra/scripts/release/bump_file_versions.py ${CURRENT_VERSION} ${NEXT_VERSION}
- name: Install yarn dependencies
Expand Down Expand Up @@ -138,7 +138,7 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: "lts/*"
node-version-file: './ui/.nvmrc'
- name: Set up Homebrew
id: set-up-homebrew
uses: Homebrew/actions/setup-homebrew@master
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/unit_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: '20.x'
node-version-file: './ui/.nvmrc'
registry-url: 'https://registry.npmjs.org'
- name: Install yarn dependencies
working-directory: ./ui
Expand Down
1 change: 1 addition & 0 deletions ui/.nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v20.18.0
3 changes: 3 additions & 0 deletions ui/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ You can see the logic in [../sdk/python/feast/ui](../sdk/python/feast/ui/). This

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.

## Node.js version
[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).

## NPM package project structure
The Web UI is powered by a JSON registry dump from Feast (running `feast registry-dump`). Running `yarn start` launches a UI
powered by test data.
Expand Down
2 changes: 1 addition & 1 deletion ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
"@testing-library/react": "^16.0.1",
"@testing-library/user-event": "^14.5.2",
"@types/jest": "^27.0.1",
"@types/node": "^16.7.13",
"@types/node": "^20.16.13",
"@types/react": "^18.3.11",
"@types/react-dom": "^18.3.0",
"msw": "^0.36.8",
Expand Down
15 changes: 11 additions & 4 deletions ui/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2469,10 +2469,12 @@
resolved "https://registry.yarnpkg.com/@types/node/-/node-18.7.18.tgz#633184f55c322e4fb08612307c274ee6d5ed3154"
integrity sha512-m+6nTEOadJZuTPkKR/SYK3A2d7FZrgElol9UP1Kae90VVU4a6mxnPuLiIW1m4Cq4gZ/nWb9GrdVXJCoCazDAbg==

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

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

undici-types@~6.19.2:
version "6.19.8"
resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-6.19.8.tgz#35111c9d1437ab83a7cdc0abae2f26d88eda0a02"
integrity sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==

unherit@^1.0.4:
version "1.1.3"
resolved "https://registry.yarnpkg.com/unherit/-/unherit-1.1.3.tgz#6c9b503f2b41b262330c80e91c8614abdaa69c22"
Expand Down

0 comments on commit 651ef71

Please sign in to comment.