Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Minoring formatting changes
Signed-off-by: Aniket Paluskar <apaluska@redhat.com>
  • Loading branch information
aniketpalu committed Dec 8, 2025
commit 833a610c4a6ca5cb25a79e9309f6043ac936d9ad
12 changes: 7 additions & 5 deletions sdk/python/feast/diff/infra_diff.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,9 @@ def tag_infra_proto_objects_for_keep_delete_add(


def diff_infra_protos(
current_infra_proto: InfraProto, new_infra_proto: InfraProto, project: Optional[str] = None
current_infra_proto: InfraProto,
new_infra_proto: InfraProto,
project: Optional[str] = None,
) -> InfraDiff:
infra_diff = InfraDiff()

Expand All @@ -114,18 +116,18 @@ def diff_infra_protos(
new_infra_objects = get_infra_object_protos_by_type(
new_infra_proto, infra_object_class_type
)

# Filter infra objects by project prefix when using shared online stores
# Table names include project prefix: {project}_{table_name}
if project:
project_prefix = f"{project}_"
current_infra_objects = [
obj for obj in current_infra_objects
obj
for obj in current_infra_objects
if obj.name.startswith(project_prefix)
]
new_infra_objects = [
obj for obj in new_infra_objects
if obj.name.startswith(project_prefix)
obj for obj in new_infra_objects if obj.name.startswith(project_prefix)
]
(
infra_objects_to_keep,
Expand Down
5 changes: 3 additions & 2 deletions sdk/python/feast/feature_store.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@
from feast.online_response import OnlineResponse
from feast.permissions.permission import Permission
from feast.project import Project
from feast.protos.feast.core.InfraObject_pb2 import Infra as InfraProto
from feast.protos.feast.serving.ServingService_pb2 import (
FieldStatus,
GetOnlineFeaturesResponse,
Expand Down Expand Up @@ -796,7 +795,9 @@ def plan(
desired_registry_proto = desired_repo_contents.to_registry_proto()
new_infra = self._provider.plan_infra(self.config, desired_registry_proto)
new_infra_proto = new_infra.to_proto()
infra_diff = diff_infra_protos(current_infra_proto, new_infra_proto, project=self.project)
infra_diff = diff_infra_protos(
current_infra_proto, new_infra_proto, project=self.project
)

return registry_diff, infra_diff, new_infra

Expand Down
Loading