Skip to content

Commit 79e1143

Browse files
authored
feat: Make RegistryServer writable (feast-dev#4231)
* make registry server writable Signed-off-by: tokoko <togurg14@freeuni.edu.ge> * fix remote registry tests Signed-off-by: tokoko <togurg14@freeuni.edu.ge> --------- Signed-off-by: tokoko <togurg14@freeuni.edu.ge>
1 parent b9cadd5 commit 79e1143

8 files changed

Lines changed: 444 additions & 79 deletions

File tree

protos/feast/core/Transformation.proto

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@ option go_package = "github.com/feast-dev/feast/go/protos/feast/core";
55
option java_outer_classname = "FeatureTransformationProto";
66
option java_package = "feast.proto.core";
77

8-
import "google/protobuf/duration.proto";
9-
108
// Serialized representation of python function.
119
message UserDefinedFunctionV2 {
1210
// The function name

protos/feast/registry/RegistryServer.proto

Lines changed: 107 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ syntax = "proto3";
33
package feast.registry;
44

55
import "google/protobuf/empty.proto";
6+
import "google/protobuf/timestamp.proto";
67
import "feast/core/Registry.proto";
78
import "feast/core/Entity.proto";
89
import "feast/core/DataSource.proto";
@@ -16,16 +17,22 @@ import "feast/core/InfraObject.proto";
1617

1718
service RegistryServer{
1819
// Entity RPCs
20+
rpc ApplyEntity (ApplyEntityRequest) returns (google.protobuf.Empty) {}
1921
rpc GetEntity (GetEntityRequest) returns (feast.core.Entity) {}
2022
rpc ListEntities (ListEntitiesRequest) returns (ListEntitiesResponse) {}
23+
rpc DeleteEntity (DeleteEntityRequest) returns (google.protobuf.Empty) {}
2124

2225
// DataSource RPCs
26+
rpc ApplyDataSource (ApplyDataSourceRequest) returns (google.protobuf.Empty) {}
2327
rpc GetDataSource (GetDataSourceRequest) returns (feast.core.DataSource) {}
2428
rpc ListDataSources (ListDataSourcesRequest) returns (ListDataSourcesResponse) {}
29+
rpc DeleteDataSource (DeleteDataSourceRequest) returns (google.protobuf.Empty) {}
2530

2631
// FeatureView RPCs
32+
rpc ApplyFeatureView (ApplyFeatureViewRequest) returns (google.protobuf.Empty) {}
2733
rpc GetFeatureView (GetFeatureViewRequest) returns (feast.core.FeatureView) {}
2834
rpc ListFeatureViews (ListFeatureViewsRequest) returns (ListFeatureViewsResponse) {}
35+
rpc DeleteFeatureView (DeleteFeatureViewRequest) returns (google.protobuf.Empty) {}
2936

3037
// StreamFeatureView RPCs
3138
rpc GetStreamFeatureView (GetStreamFeatureViewRequest) returns (feast.core.StreamFeatureView) {}
@@ -36,19 +43,28 @@ service RegistryServer{
3643
rpc ListOnDemandFeatureViews (ListOnDemandFeatureViewsRequest) returns (ListOnDemandFeatureViewsResponse) {}
3744

3845
// FeatureService RPCs
46+
rpc ApplyFeatureService (ApplyFeatureServiceRequest) returns (google.protobuf.Empty) {}
3947
rpc GetFeatureService (GetFeatureServiceRequest) returns (feast.core.FeatureService) {}
4048
rpc ListFeatureServices (ListFeatureServicesRequest) returns (ListFeatureServicesResponse) {}
49+
rpc DeleteFeatureService (DeleteFeatureServiceRequest) returns (google.protobuf.Empty) {}
4150

4251
// SavedDataset RPCs
52+
rpc ApplySavedDataset (ApplySavedDatasetRequest) returns (google.protobuf.Empty) {}
4353
rpc GetSavedDataset (GetSavedDatasetRequest) returns (feast.core.SavedDataset) {}
4454
rpc ListSavedDatasets (ListSavedDatasetsRequest) returns (ListSavedDatasetsResponse) {}
55+
rpc DeleteSavedDataset (DeleteSavedDatasetRequest) returns (google.protobuf.Empty) {}
4556

4657
// ValidationReference RPCs
58+
rpc ApplyValidationReference (ApplyValidationReferenceRequest) returns (google.protobuf.Empty) {}
4759
rpc GetValidationReference (GetValidationReferenceRequest) returns (feast.core.ValidationReference) {}
4860
rpc ListValidationReferences (ListValidationReferencesRequest) returns (ListValidationReferencesResponse) {}
49-
61+
rpc DeleteValidationReference (DeleteValidationReferenceRequest) returns (google.protobuf.Empty) {}
62+
63+
rpc ApplyMaterialization (ApplyMaterializationRequest) returns (google.protobuf.Empty) {}
5064
rpc ListProjectMetadata (ListProjectMetadataRequest) returns (ListProjectMetadataResponse) {}
65+
rpc UpdateInfra (UpdateInfraRequest) returns (google.protobuf.Empty) {}
5166
rpc GetInfra (GetInfraRequest) returns (feast.core.Infra) {}
67+
rpc Commit (google.protobuf.Empty) returns (google.protobuf.Empty) {}
5268
rpc Refresh (RefreshRequest) returns (google.protobuf.Empty) {}
5369
rpc Proto (google.protobuf.Empty) returns (feast.core.Registry) {}
5470

@@ -58,6 +74,12 @@ message RefreshRequest {
5874
string project = 1;
5975
}
6076

77+
message UpdateInfraRequest {
78+
feast.core.Infra infra = 1;
79+
string project = 2;
80+
bool commit = 3;
81+
}
82+
6183
message GetInfraRequest {
6284
string project = 1;
6385
bool allow_cache = 2;
@@ -72,6 +94,20 @@ message ListProjectMetadataResponse {
7294
repeated feast.core.ProjectMetadata project_metadata = 1;
7395
}
7496

97+
message ApplyMaterializationRequest {
98+
feast.core.FeatureView feature_view = 1;
99+
string project = 2;
100+
google.protobuf.Timestamp start_date = 3;
101+
google.protobuf.Timestamp end_date = 4;
102+
bool commit = 5;
103+
}
104+
105+
message ApplyEntityRequest {
106+
feast.core.Entity entity = 1;
107+
string project = 2;
108+
bool commit = 3;
109+
}
110+
75111
message GetEntityRequest {
76112
string name = 1;
77113
string project = 2;
@@ -87,8 +123,20 @@ message ListEntitiesResponse {
87123
repeated feast.core.Entity entities = 1;
88124
}
89125

126+
message DeleteEntityRequest {
127+
string name = 1;
128+
string project = 2;
129+
bool commit = 3;
130+
}
131+
90132
// DataSources
91133

134+
message ApplyDataSourceRequest {
135+
feast.core.DataSource data_source = 1;
136+
string project = 2;
137+
bool commit = 3;
138+
}
139+
92140
message GetDataSourceRequest {
93141
string name = 1;
94142
string project = 2;
@@ -104,8 +152,24 @@ message ListDataSourcesResponse {
104152
repeated feast.core.DataSource data_sources = 1;
105153
}
106154

155+
message DeleteDataSourceRequest {
156+
string name = 1;
157+
string project = 2;
158+
bool commit = 3;
159+
}
160+
107161
// FeatureViews
108162

163+
message ApplyFeatureViewRequest {
164+
oneof base_feature_view {
165+
feast.core.FeatureView feature_view = 1;
166+
feast.core.OnDemandFeatureView on_demand_feature_view = 2;
167+
feast.core.StreamFeatureView stream_feature_view = 3;
168+
}
169+
string project = 4;
170+
bool commit = 5;
171+
}
172+
109173
message GetFeatureViewRequest {
110174
string name = 1;
111175
string project = 2;
@@ -121,6 +185,12 @@ message ListFeatureViewsResponse {
121185
repeated feast.core.FeatureView feature_views = 1;
122186
}
123187

188+
message DeleteFeatureViewRequest {
189+
string name = 1;
190+
string project = 2;
191+
bool commit = 3;
192+
}
193+
124194
// StreamFeatureView
125195

126196
message GetStreamFeatureViewRequest {
@@ -157,6 +227,12 @@ message ListOnDemandFeatureViewsResponse {
157227

158228
// FeatureServices
159229

230+
message ApplyFeatureServiceRequest {
231+
feast.core.FeatureService feature_service = 1;
232+
string project = 2;
233+
bool commit = 3;
234+
}
235+
160236
message GetFeatureServiceRequest {
161237
string name = 1;
162238
string project = 2;
@@ -172,8 +248,20 @@ message ListFeatureServicesResponse {
172248
repeated feast.core.FeatureService feature_services = 1;
173249
}
174250

251+
message DeleteFeatureServiceRequest {
252+
string name = 1;
253+
string project = 2;
254+
bool commit = 3;
255+
}
256+
175257
// SavedDataset
176258

259+
message ApplySavedDatasetRequest {
260+
feast.core.SavedDataset saved_dataset = 1;
261+
string project = 2;
262+
bool commit = 3;
263+
}
264+
177265
message GetSavedDatasetRequest {
178266
string name = 1;
179267
string project = 2;
@@ -189,8 +277,20 @@ message ListSavedDatasetsResponse {
189277
repeated feast.core.SavedDataset saved_datasets = 1;
190278
}
191279

280+
message DeleteSavedDatasetRequest {
281+
string name = 1;
282+
string project = 2;
283+
bool commit = 3;
284+
}
285+
192286
// ValidationReference
193287

288+
message ApplyValidationReferenceRequest {
289+
feast.core.ValidationReference validation_reference = 1;
290+
string project = 2;
291+
bool commit = 3;
292+
}
293+
194294
message GetValidationReferenceRequest {
195295
string name = 1;
196296
string project = 2;
@@ -205,3 +305,9 @@ message ListValidationReferencesRequest {
205305
message ListValidationReferencesResponse {
206306
repeated feast.core.ValidationReference validation_references = 1;
207307
}
308+
309+
message DeleteValidationReferenceRequest {
310+
string name = 1;
311+
string project = 2;
312+
bool commit = 3;
313+
}

sdk/python/feast/infra/registry/base_registry.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -406,18 +406,14 @@ def get_saved_dataset(
406406
"""
407407
raise NotImplementedError
408408

409-
def delete_saved_dataset(self, name: str, project: str, allow_cache: bool = False):
409+
def delete_saved_dataset(self, name: str, project: str, commit: bool = True):
410410
"""
411411
Delete a saved dataset.
412412
413413
Args:
414414
name: Name of dataset
415415
project: Feast project that this dataset belongs to
416-
allow_cache: Whether to allow returning this dataset from a cached registry
417-
418-
Returns:
419-
Returns either the specified SavedDataset, or raises an exception if
420-
none is found
416+
commit: Whether the change should be persisted immediately
421417
"""
422418
raise NotImplementedError
423419

0 commit comments

Comments
 (0)