From 2d88b8b7520e80c0eb5b48d75dce94c5be3f42fd Mon Sep 17 00:00:00 2001 From: ntkathole Date: Thu, 15 May 2025 18:39:08 +0530 Subject: [PATCH] chore: Added make command to build locally built Feast UI package Signed-off-by: ntkathole --- Makefile | 5 +++++ docs/project/development-guide.md | 11 ++++++++++- sdk/python/feast/ui/README.md | 9 +++++++++ 3 files changed, 24 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 75f05a28fc8..eaf42f557d1 100644 --- a/Makefile +++ b/Makefile @@ -644,6 +644,11 @@ build-helm-docs: build-ui: cd $(ROOT_DIR)/sdk/python/feast/ui && yarn upgrade @feast-dev/feast-ui --latest && yarn install && npm run build --omit=dev +build-ui-local: + cd $(ROOT_DIR)/ui && yarn install && npm run build --omit=dev + rm -rf $(ROOT_DIR)/sdk/python/feast/ui/build + cp -r $(ROOT_DIR)/ui/build $(ROOT_DIR)/sdk/python/feast/ui/ + format-ui: cd $(ROOT_DIR)/ui && NPM_TOKEN= yarn install && NPM_TOKEN= yarn format diff --git a/docs/project/development-guide.md b/docs/project/development-guide.md index 5b2d0a521e8..5e28ca4daf6 100644 --- a/docs/project/development-guide.md +++ b/docs/project/development-guide.md @@ -135,11 +135,20 @@ Note that this means if you are midway through working through a PR and rebase, - activate the venv: `source venv/bin/activate` - Install dependencies `make install-python-dependencies-dev` -### building the UI +### Building the UI +To build the UI from the latest released NPM package (hosted under @feast-dev/feast-ui): + ```sh make build-ui ``` +If you want to test backend and frontend together using 'feast ui' command and with a locally built Feast UI package, you can build using: + +```sh +make build-ui-local +``` +Use this when you are making changes to the React UI code and want to see them live via the backend. + ### Recompiling python lock files Recompile python lock files. This only needs to be run when you make changes to requirements or simply want to update python lock files to reflect latest versions. diff --git a/sdk/python/feast/ui/README.md b/sdk/python/feast/ui/README.md index 28290f0326a..e3fdbb6b2c8 100644 --- a/sdk/python/feast/ui/README.md +++ b/sdk/python/feast/ui/README.md @@ -26,6 +26,15 @@ The `feast ui` command will generate the necessary `projects-list.json` file and ## Dev To test with a locally built Feast UI package, do: + +```bash + make build-ui-local + feast ui + ``` + +OR + +You can also do: 1. `yarn link` in ui/ 2. `yarn install` in ui/ 3. `yarn link` in ui/node_modules/react