From eb489638112761bf6e1149035dcf6dc6314d4ca6 Mon Sep 17 00:00:00 2001 From: Achal Shah Date: Wed, 18 Jan 2023 22:09:58 +0530 Subject: [PATCH] fix: Update registry.refresh to have a default arg Signed-off-by: Achal Shah --- sdk/python/feast/feature_store.py | 2 +- sdk/python/feast/infra/registry/base_registry.py | 2 +- sdk/python/feast/infra/registry/registry.py | 2 +- sdk/python/feast/infra/registry/sql.py | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sdk/python/feast/feature_store.py b/sdk/python/feast/feature_store.py index d3656e13554..afac34b6657 100644 --- a/sdk/python/feast/feature_store.py +++ b/sdk/python/feast/feature_store.py @@ -738,7 +738,7 @@ def plan( # Compute the desired difference between the current infra, as stored in the registry, # and the desired infra. - self._registry.refresh(self.project) + self._registry.refresh(project=self.project) current_infra_proto = self._registry.proto().infra.__deepcopy__() desired_registry_proto = desired_repo_contents.to_registry_proto() new_infra = self._provider.plan_infra(self.config, desired_registry_proto) diff --git a/sdk/python/feast/infra/registry/base_registry.py b/sdk/python/feast/infra/registry/base_registry.py index fc65932ea16..14b098bb123 100644 --- a/sdk/python/feast/infra/registry/base_registry.py +++ b/sdk/python/feast/infra/registry/base_registry.py @@ -569,7 +569,7 @@ def commit(self): """Commits the state of the registry cache to the remote registry store.""" @abstractmethod - def refresh(self, project: Optional[str]): + def refresh(self, project: Optional[str] = None): """Refreshes the state of the registry cache by fetching the registry state from the remote registry store.""" @staticmethod diff --git a/sdk/python/feast/infra/registry/registry.py b/sdk/python/feast/infra/registry/registry.py index e2e98460595..3aee7e12f6d 100644 --- a/sdk/python/feast/infra/registry/registry.py +++ b/sdk/python/feast/infra/registry/registry.py @@ -776,7 +776,7 @@ def commit(self): if self.cached_registry_proto: self._registry_store.update_registry_proto(self.cached_registry_proto) - def refresh(self, project: Optional[str]): + def refresh(self, project: Optional[str] = None): """Refreshes the state of the registry cache by fetching the registry state from the remote registry store.""" self._get_registry_proto(project=project, allow_cache=False) diff --git a/sdk/python/feast/infra/registry/sql.py b/sdk/python/feast/infra/registry/sql.py index fd8b47cd81a..2326651b1c0 100644 --- a/sdk/python/feast/infra/registry/sql.py +++ b/sdk/python/feast/infra/registry/sql.py @@ -209,7 +209,7 @@ def teardown(self): stmt = delete(t) conn.execute(stmt) - def refresh(self, project: Optional[str]): + def refresh(self, project: Optional[str] = None): self.cached_registry_proto = self.proto() self.cached_registry_proto_created = datetime.utcnow()