Skip to content

Commit

Permalink
fix: Update registry.refresh to have a default arg (#3450)
Browse files Browse the repository at this point in the history
Signed-off-by: Achal Shah <achals@gmail.com>

Signed-off-by: Achal Shah <achals@gmail.com>
  • Loading branch information
achals authored Jan 18, 2023
1 parent fbbb293 commit 2f7c4ed
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion sdk/python/feast/feature_store.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion sdk/python/feast/infra/registry/base_registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion sdk/python/feast/infra/registry/registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
2 changes: 1 addition & 1 deletion sdk/python/feast/infra/registry/sql.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down

0 comments on commit 2f7c4ed

Please sign in to comment.