Skip to content

Commit b6a2b75

Browse files
committed
fix: Add hybrid online store to ONLINE_STORE_CLASS_FOR_TYPE mapping (feast-dev#5810)
* fix: Add hybrid online store to ONLINE_STORE_CLASS_FOR_TYPE mapping This fixes the import error when using HybridOnlineStore with the shorthand type configuration in feature_store.yaml. Changes: - Add missing __init__.py to hybrid_online_store package - Add "hybrid" entry to ONLINE_STORE_CLASS_FOR_TYPE in repo_config.py - Update HybridOnlineStoreConfig type Literal to use standard "hybrid" shorthand - Update documentation to use type: hybrid Signed-off-by: yassinnouh21 <yassinnouh21@gmail.com> * fix: Add hybrid to Go operator ValidOnlineStoreDBStorePersistenceTypes The data source types test validates that Python ONLINE_STORE_CLASS_FOR_TYPE matches the Go operator's ValidOnlineStoreDBStorePersistenceTypes. This adds the hybrid type to both v1 and v1alpha1 API versions. Signed-off-by: yassinnouh21 <yassinnouh21@gmail.com> --------- Signed-off-by: yassinnouh21 <yassinnouh21@gmail.com>
1 parent ce35ce6 commit b6a2b75

File tree

8 files changed

+16
-7
lines changed

8 files changed

+16
-7
lines changed

docs/reference/online-stores/hybrid.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ project: my_feature_repo
2020
registry: data/registry.db
2121
provider: local
2222
online_store:
23-
type: hybrid_online_store.HybridOnlineStore
23+
type: hybrid
2424
routing_tag: team # or any tag name you want to use in FeatureView's for routing
2525
online_stores:
2626
- type: bigtable

infra/feast-operator/api/v1/featurestore_types.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,7 @@ type OnlineStoreFilePersistence struct {
371371
// OnlineStoreDBStorePersistence configures the DB store persistence for the online store service
372372
type OnlineStoreDBStorePersistence struct {
373373
// Type of the persistence type you want to use.
374-
// +kubebuilder:validation:Enum=snowflake.online;redis;ikv;datastore;dynamodb;bigtable;postgres;cassandra;mysql;hazelcast;singlestore;hbase;elasticsearch;qdrant;couchbase.online;milvus
374+
// +kubebuilder:validation:Enum=snowflake.online;redis;ikv;datastore;dynamodb;bigtable;postgres;cassandra;mysql;hazelcast;singlestore;hbase;elasticsearch;qdrant;couchbase.online;milvus;hybrid
375375
Type string `json:"type"`
376376
// Data store parameters should be placed as-is from the "feature_store.yaml" under the secret key. "registry_type" & "type" fields should be removed.
377377
SecretRef corev1.LocalObjectReference `json:"secretRef"`
@@ -396,6 +396,7 @@ var ValidOnlineStoreDBStorePersistenceTypes = []string{
396396
"qdrant",
397397
"couchbase.online",
398398
"milvus",
399+
"hybrid",
399400
}
400401

401402
// LocalRegistryConfig configures the registry service

infra/feast-operator/api/v1alpha1/featurestore_types.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,7 @@ type OnlineStoreFilePersistence struct {
371371
// OnlineStoreDBStorePersistence configures the DB store persistence for the online store service
372372
type OnlineStoreDBStorePersistence struct {
373373
// Type of the persistence type you want to use.
374-
// +kubebuilder:validation:Enum=snowflake.online;redis;ikv;datastore;dynamodb;bigtable;postgres;cassandra;mysql;hazelcast;singlestore;hbase;elasticsearch;qdrant;couchbase.online;milvus
374+
// +kubebuilder:validation:Enum=snowflake.online;redis;ikv;datastore;dynamodb;bigtable;postgres;cassandra;mysql;hazelcast;singlestore;hbase;elasticsearch;qdrant;couchbase.online;milvus;hybrid
375375
Type string `json:"type"`
376376
// Data store parameters should be placed as-is from the "feature_store.yaml" under the secret key. "registry_type" & "type" fields should be removed.
377377
SecretRef corev1.LocalObjectReference `json:"secretRef"`
@@ -396,6 +396,7 @@ var ValidOnlineStoreDBStorePersistenceTypes = []string{
396396
"qdrant",
397397
"couchbase.online",
398398
"milvus",
399+
"hybrid",
399400
}
400401

401402
// LocalRegistryConfig configures the registry service

infra/feast-operator/config/crd/bases/feast.dev_featurestores.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1322,6 +1322,7 @@ spec:
13221322
- qdrant
13231323
- couchbase.online
13241324
- milvus
1325+
- hybrid
13251326
type: string
13261327
required:
13271328
- secretRef
@@ -5358,6 +5359,7 @@ spec:
53585359
- qdrant
53595360
- couchbase.online
53605361
- milvus
5362+
- hybrid
53615363
type: string
53625364
required:
53635365
- secretRef
@@ -9521,6 +9523,7 @@ spec:
95219523
- qdrant
95229524
- couchbase.online
95239525
- milvus
9526+
- hybrid
95249527
type: string
95259528
required:
95269529
- secretRef
@@ -13557,6 +13560,7 @@ spec:
1355713560
- qdrant
1355813561
- couchbase.online
1355913562
- milvus
13563+
- hybrid
1356013564
type: string
1356113565
required:
1356213566
- secretRef

infra/feast-operator/dist/install.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1330,6 +1330,7 @@ spec:
13301330
- qdrant
13311331
- couchbase.online
13321332
- milvus
1333+
- hybrid
13331334
type: string
13341335
required:
13351336
- secretRef
@@ -5366,6 +5367,7 @@ spec:
53665367
- qdrant
53675368
- couchbase.online
53685369
- milvus
5370+
- hybrid
53695371
type: string
53705372
required:
53715373
- secretRef
@@ -9529,6 +9531,7 @@ spec:
95299531
- qdrant
95309532
- couchbase.online
95319533
- milvus
9534+
- hybrid
95329535
type: string
95339536
required:
95349537
- secretRef
@@ -13565,6 +13568,7 @@ spec:
1356513568
- qdrant
1356613569
- couchbase.online
1356713570
- milvus
13571+
- hybrid
1356813572
type: string
1356913573
required:
1357013574
- secretRef

sdk/python/feast/infra/online_stores/hybrid_online_store/__init__.py

Whitespace-only changes.

sdk/python/feast/infra/online_stores/hybrid_online_store/hybrid_online_store.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
Example configuration (feature_store.yaml):
2222
2323
online_store:
24-
type: hybrid_online_store.HybridOnlineStore
24+
type: hybrid
2525
routing_tag: team # or any tag name you want to use for routing
2626
online_stores:
2727
- type: feast.infra.online_stores.bigtable.BigtableOnlineStore
@@ -64,9 +64,7 @@ class HybridOnlineStoreConfig(FeastConfigBaseModel):
6464
online_stores: A list of OnlineStoresWithConfig, each specifying the type and config for an online store backend.
6565
"""
6666

67-
type: Literal["HybridOnlineStore", "hybrid_online_store.HybridOnlineStore"] = (
68-
"hybrid_online_store.HybridOnlineStore"
69-
)
67+
type: Literal["hybrid"] = "hybrid"
7068

7169
class OnlineStoresWithConfig(FeastConfigBaseModel):
7270
"""

sdk/python/feast/repo_config.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@
8484
"qdrant": "feast.infra.online_stores.qdrant_online_store.qdrant.QdrantOnlineStore",
8585
"couchbase.online": "feast.infra.online_stores.couchbase_online_store.couchbase.CouchbaseOnlineStore",
8686
"milvus": "feast.infra.online_stores.milvus_online_store.milvus.MilvusOnlineStore",
87+
"hybrid": "feast.infra.online_stores.hybrid_online_store.hybrid_online_store.HybridOnlineStore",
8788
**LEGACY_ONLINE_STORE_CLASS_FOR_TYPE,
8889
}
8990

0 commit comments

Comments
 (0)