Skip to content

Commit 2f7c4ed

Browse files
authored
fix: Update registry.refresh to have a default arg (feast-dev#3450)
Signed-off-by: Achal Shah <[email protected]> Signed-off-by: Achal Shah <[email protected]>
1 parent fbbb293 commit 2f7c4ed

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

sdk/python/feast/feature_store.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -738,7 +738,7 @@ def plan(
738738

739739
# Compute the desired difference between the current infra, as stored in the registry,
740740
# and the desired infra.
741-
self._registry.refresh(self.project)
741+
self._registry.refresh(project=self.project)
742742
current_infra_proto = self._registry.proto().infra.__deepcopy__()
743743
desired_registry_proto = desired_repo_contents.to_registry_proto()
744744
new_infra = self._provider.plan_infra(self.config, desired_registry_proto)

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -569,7 +569,7 @@ def commit(self):
569569
"""Commits the state of the registry cache to the remote registry store."""
570570

571571
@abstractmethod
572-
def refresh(self, project: Optional[str]):
572+
def refresh(self, project: Optional[str] = None):
573573
"""Refreshes the state of the registry cache by fetching the registry state from the remote registry store."""
574574

575575
@staticmethod

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -776,7 +776,7 @@ def commit(self):
776776
if self.cached_registry_proto:
777777
self._registry_store.update_registry_proto(self.cached_registry_proto)
778778

779-
def refresh(self, project: Optional[str]):
779+
def refresh(self, project: Optional[str] = None):
780780
"""Refreshes the state of the registry cache by fetching the registry state from the remote registry store."""
781781
self._get_registry_proto(project=project, allow_cache=False)
782782

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ def teardown(self):
209209
stmt = delete(t)
210210
conn.execute(stmt)
211211

212-
def refresh(self, project: Optional[str]):
212+
def refresh(self, project: Optional[str] = None):
213213
self.cached_registry_proto = self.proto()
214214
self.cached_registry_proto_created = datetime.utcnow()
215215

0 commit comments

Comments
 (0)