Skip to content

Commit 3a6a103

Browse files
AdityaPatil22Aditya Patil
andauthored
fix: Updated projects-list.json in order to display newly added projects (feast-dev#6657)
* fix: Updated projects-list.json in order to display newly added projects Signed-off-by: Aditya Patil <[email protected]> * fix: Bypass registry cache for projects-list endpoint Signed-off-by: Aditya Patil <[email protected]> * feat: Added registry refresh button in UI Signed-off-by: Aditya Patil <[email protected]> * fix: Move UI registry refresh button to layout header Signed-off-by: Aditya Patil <[email protected]> * fix: Moved registry refresh endpoint to REST and refactored UI refresh Signed-off-by: Aditya Patil <[email protected]> * fix: Enforced UPDATE permission on REST registry refresh Signed-off-by: Aditya Patil <[email protected]> * fix: Moved registry refresh endpoint to dedicated router Signed-off-by: Aditya Patil <[email protected]> * fix: Serve projects-list.json dynamically instead of writing static file at startup Signed-off-by: Aditya Patil <[email protected]> --------- Signed-off-by: Aditya Patil <[email protected]> Co-authored-by: Aditya Patil <[email protected]>
1 parent 79b33ce commit 3a6a103

13 files changed

Lines changed: 790 additions & 496 deletions

‎docs/reference/alpha-web-ui.md‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,3 +153,12 @@ const tabsRegistry = {
153153
```
154154

155155
Examples of custom tabs can be found in the `ui/custom-tabs` folder.
156+
157+
## Refreshing the registry
158+
159+
The Feast UI caches registry data (projects, feature views, entities, etc.) using the registry cache. After running `feast apply` to make changes, it may take up to `cache_ttl_seconds` before the updates appear in the UI.
160+
161+
To see changes faster:
162+
163+
- **Lower the TTL**: Set `cache_ttl_seconds: 10` (or similar) in your `feature_store.yaml` registry config. This makes all registry consumers — including the UI — pick up changes within 10 seconds.
164+
- **Refresh on demand**: The UI has a **Refresh** button that explicitly invalidates the server-side registry cache (`POST /api/v1/registry/refresh`) and reloads the UI without a full page refresh.

‎sdk/python/feast/api/registry/rest/__init__.py‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
from feast.api.registry.rest.metrics import get_metrics_router
1515
from feast.api.registry.rest.monitoring import get_monitoring_router
1616
from feast.api.registry.rest.permissions import get_permission_router
17-
from feast.api.registry.rest.projects import get_project_router
17+
from feast.api.registry.rest.projects import get_project_router, get_registry_router
1818
from feast.api.registry.rest.saved_datasets import get_saved_dataset_router
1919
from feast.api.registry.rest.search import get_search_router
2020

@@ -44,6 +44,9 @@ def register_all_routes(app: FastAPI, grpc_handler, server=None, store=None):
4444
app.include_router(get_monitoring_router(grpc_handler, store=resolved_store))
4545
app.include_router(get_compute_engine_router(grpc_handler, store=resolved_store))
4646

47+
if resolved_store:
48+
app.include_router(get_registry_router(resolved_store))
49+
4750
_register_openlineage_consumer(app, resolved_store)
4851

4952

‎sdk/python/feast/api/registry/rest/projects.py‎

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from fastapi import APIRouter, Depends, Query
1+
from fastapi import APIRouter, Depends, Query, Response, status
22

33
from feast.api.registry.rest.rest_utils import (
44
get_pagination_params,
@@ -50,3 +50,19 @@ def list_projects(
5050
}
5151

5252
return router
53+
54+
55+
def get_registry_router(store) -> APIRouter:
56+
router = APIRouter()
57+
58+
@router.post("/registry/refresh")
59+
def refresh_registry():
60+
from feast.permissions.action import AuthzedAction
61+
from feast.permissions.security_manager import assert_permissions
62+
63+
project = store.registry.get_project(name=store.project, allow_cache=True)
64+
assert_permissions(resource=project, actions=[AuthzedAction.UPDATE])
65+
store.refresh_registry()
66+
return Response(status_code=status.HTTP_200_OK)
67+
68+
return router

0 commit comments

Comments
 (0)