feast-dev / feast

The Open Source Feature Store for Machine Learning
https://feast.dev
Apache License 2.0
5.62k stars 1k forks source link

fix: Read project data from the 'projects' key while loading the registry state in the Feast UI #4772

Open boliri opened 1 day ago

boliri commented 1 day ago

What this PR does / why we need it:

Starting from 0.41.x releases, the Feast UI is no longer able to load the project summary in the projects overview / landing page. The reason why this is happening is that, after some changes from https://github.com/feast-dev/feast/pull/4475 got merged into master, the Registry class is unable to build and persist the project's metadata to the backend used as the registry through its method _prepare_registry_for_changes - this behavior has been observed in, at least, the file registry, but it might be applicable to others as well.

Since project's metadata is not generated, and the useLoadRegistry function from the UI is expecting those metadata to exist, the UI fails to render the Project Overview page and hints that the issue might be in the feature_store.yaml, which is not the case.

The purpose of this PR is pretty simple: make the UI extract the project information from the projects array instead of the projectMetadata object while it is refreshing the registry state. With this tiny fix in place, the UI renders components as usual.

Which issue(s) this PR fixes:

Fixes https://github.com/feast-dev/feast/issues/4743

boliri commented 1 day ago

I regenerated the registry.db file locally and, after running yarn test, the UI tests passed without issues. However, there's still something wrong in the GitHub Action for these tests as it cannot finish properly:

Error: src/FeastUISansProviders.test.tsx(58,5): error TS2533: Object is possibly 'null' or 'undefined'.
Error: src/queries/useLoadRegistry.ts(55,22): error TS2533: Object is possibly 'null' or 'undefined'.

This might be related to how the proto representation of the Registry is decoded in the UI tests, but I'm not 100% sure.

Thoughts?

EDIT: made some changes to the useLoadRegistry and UI tests are finally passing, but for some reason the job build-docker-image-java won't start :confused: