Skip to content

Commit 2321c07

Browse files
rohit-bharmalcursoragentfranciscojavierarceo
authored
feat: Allow CRUD on entities, data sources, and feature views from UI (#6412)
* feat: Add modals for creating and editing data sources, entities, and feature views Signed-off-by: Rohit Bharmal <rohitbharmal123@gmail.com> * feat: Introduce UI versioning context and toggle component Signed-off-by: Rohit Bharmal <rohitbharmal123@gmail.com> * feat: Add UI REST integration for entity management Co-authored-by: Cursor <cursoragent@cursor.com> Signed-off-by: Rohit Bharmal <rohitbharmal123@gmail.com> * feat: Add UI REST integration for data sources and feature views Co-authored-by: Cursor <cursoragent@cursor.com> Signed-off-by: Rohit Bharmal <rohitbharmal123@gmail.com> * refactor: Clean up formatting and improve readability in various components Signed-off-by: Rohit Bharmal <rohitbharmal123@gmail.com> * refactor: Remove unused proxy setting and streamline data loading in data sources and other Signed-off-by: Rohit Bharmal <rohitbharmal123@gmail.com> * refactor: Remove UIVersion context and related components to simplify UI structure Signed-off-by: Rohit Bharmal <rohitbharmal123@gmail.com> * fix: Ensure tag values are converted to strings Signed-off-by: Rohit Bharmal <rohitbharmal123@gmail.com> * Fix REST UI mutation consistency * Show entity create errors in modal * Add local REST mocks for UI dev * Avoid Milvus setup in mock vector store tests --------- Signed-off-by: Rohit Bharmal <rohitbharmal123@gmail.com> Co-authored-by: Cursor <cursoragent@cursor.com> Co-authored-by: Francisco Javier Arceo <farceo@redhat.com>
1 parent c0e7e5d commit 2321c07

26 files changed

Lines changed: 3191 additions & 62 deletions

sdk/python/feast/api/registry/rest/feature_views.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
class FeatureModel(BaseModel):
3333
name: str
3434
value_type: int = 2
35+
description: Optional[str] = ""
3536

3637

3738
class ApplyFeatureViewRequestBody(BaseModel):
@@ -307,7 +308,13 @@ def list_all_feature_views(
307308
def apply_feature_view(body: ApplyFeatureViewRequestBody):
308309
feature_specs = []
309310
for f in body.features or []:
310-
feature_specs.append(FeatureSpecV2(name=f.name, value_type=f.value_type))
311+
feature_specs.append(
312+
FeatureSpecV2(
313+
name=f.name,
314+
value_type=f.value_type,
315+
description=f.description or "",
316+
)
317+
)
311318

312319
batch_source_proto = (
313320
DataSourceProto(name=body.batch_source) if body.batch_source else None

sdk/python/tests/unit/api/test_api_rest_registry.py

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2091,8 +2091,16 @@ def test_apply_and_delete_feature_view_via_rest(fastapi_test_app):
20912091
"project": "demo_project",
20922092
"entities": ["user_id"],
20932093
"features": [
2094-
{"name": "trip_count", "value_type": 2},
2095-
{"name": "avg_rating", "value_type": 4},
2094+
{
2095+
"name": "trip_count",
2096+
"value_type": 2,
2097+
"description": "Number of completed trips",
2098+
},
2099+
{
2100+
"name": "avg_rating",
2101+
"value_type": 4,
2102+
"description": "Average driver rating",
2103+
},
20962104
],
20972105
"ttl_seconds": 86400,
20982106
"online": True,
@@ -2107,7 +2115,10 @@ def test_apply_and_delete_feature_view_via_rest(fastapi_test_app):
21072115
# Verify it exists
21082116
response = fastapi_test_app.get("/feature_views/driver_stats?project=demo_project")
21092117
assert response.status_code == 200
2110-
assert response.json()["spec"]["name"] == "driver_stats"
2118+
spec = response.json()["spec"]
2119+
assert spec["name"] == "driver_stats"
2120+
assert spec["features"][0]["description"] == "Number of completed trips"
2121+
assert spec["features"][1]["description"] == "Average driver rating"
21112122

21122123
# Delete it
21132124
response = fastapi_test_app.delete(

sdk/python/tests/utils/rag_test_utils.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,9 @@ def run_side_effect(cmd, *args, **kwargs):
9292
with runner.local_repo(
9393
get_example_repo("example_feature_repo_1.py"),
9494
offline_store="file",
95-
online_store="milvus",
95+
# The vector store tests below use MockVectorStore and only need the
96+
# feature view registered; avoid Milvus Lite index setup flakiness.
97+
online_store="sqlite",
9698
apply=False,
9799
teardown=True,
98100
) as store:

0 commit comments

Comments
 (0)