diff --git a/sdk/python/feast/infra/registry/proto_registry_utils.py b/sdk/python/feast/infra/registry/proto_registry_utils.py index e26b1e10e79..4dbc95d2a5a 100644 --- a/sdk/python/feast/infra/registry/proto_registry_utils.py +++ b/sdk/python/feast/infra/registry/proto_registry_utils.py @@ -116,6 +116,10 @@ def get_validation_reference( raise ValidationReferenceNotFound(name, project=project) +def list_validation_references(registry_proto: RegistryProto): + return registry_proto.validation_references + + def list_feature_services( registry_proto: RegistryProto, project: str, allow_cache: bool = False ) -> List[FeatureService]: diff --git a/sdk/python/feast/infra/registry/registry.py b/sdk/python/feast/infra/registry/registry.py index 4870c1d45d4..e2e98460595 100644 --- a/sdk/python/feast/infra/registry/registry.py +++ b/sdk/python/feast/infra/registry/registry.py @@ -740,6 +740,14 @@ def get_validation_reference( registry_proto, name, project ) + def list_validation_references( + self, project: str, allow_cache: bool = False + ) -> List[ValidationReference]: + registry_proto = self._get_registry_proto( + project=project, allow_cache=allow_cache + ) + return proto_registry_utils.list_validation_references(registry_proto) + def delete_validation_reference(self, name: str, project: str, commit: bool = True): registry_proto = self._prepare_registry_for_changes(project) for idx, existing_validation_reference in enumerate( diff --git a/sdk/python/feast/infra/registry/sql.py b/sdk/python/feast/infra/registry/sql.py index f0782515443..fd8b47cd81a 100644 --- a/sdk/python/feast/infra/registry/sql.py +++ b/sdk/python/feast/infra/registry/sql.py @@ -408,6 +408,22 @@ def get_validation_reference( not_found_exception=ValidationReferenceNotFound, ) + def list_validation_references( + self, project: str, allow_cache: bool = False + ) -> List[ValidationReference]: + if allow_cache: + self._refresh_cached_registry_if_necessary() + return proto_registry_utils.list_validation_references( + self.cached_registry_proto + ) + return self._list_objects( + table=validation_references, + project=project, + proto_class=ValidationReferenceProto, + python_class=ValidationReference, + proto_field_name="validation_reference_proto", + ) + def list_entities(self, project: str, allow_cache: bool = False) -> List[Entity]: if allow_cache: self._refresh_cached_registry_if_necessary() diff --git a/sdk/python/tests/unit/local_feast_tests/test_e2e_local.py b/sdk/python/tests/unit/local_feast_tests/test_e2e_local.py index 1ead69f52a0..fa272c4847f 100644 --- a/sdk/python/tests/unit/local_feast_tests/test_e2e_local.py +++ b/sdk/python/tests/unit/local_feast_tests/test_e2e_local.py @@ -21,7 +21,7 @@ def test_e2e_local() -> None: """ Tests the end-to-end workflow of apply, materialize, and online retrieval. - This test runs against several different types of repos: + This test runs against several types of repos: 1. A repo with a normal FV and an entity-less FV. 2. A repo using the SDK from version 0.19.0. 3. A repo with a FV with a ttl of 0.