Skip to content

Commit

Permalink
fix: Use CopyFrom() instead of __deepycopy__() for creating a copy of…
Browse files Browse the repository at this point in the history
… protobuf object. (#3999)

* fix: use CopyFrom() instead of __deepycopy__() for creating a copy of protobuf object.

Signed-off-by: Shuchu Han <[email protected]>

* fix: Use Infra instead of RegistryProto for the Infra proto.

Signed-off-by: Shuchu Han <[email protected]>

* fix: Update the Python requirements after upgrade the version of Protobuf.

Signed-off-by: Shuchu Han <[email protected]>

---------

Signed-off-by: Shuchu Han <[email protected]>
  • Loading branch information
shuchu authored Mar 12, 2024
1 parent 0441b8b commit 5561b30
Show file tree
Hide file tree
Showing 8 changed files with 242 additions and 266 deletions.
4 changes: 3 additions & 1 deletion sdk/python/feast/feature_store.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@
from feast.infra.registry.sql import SqlRegistry
from feast.on_demand_feature_view import OnDemandFeatureView
from feast.online_response import OnlineResponse
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 @@ -745,7 +746,8 @@ def plan(
# Compute the desired difference between the current infra, as stored in the registry,
# and the desired infra.
self._registry.refresh(project=self.project)
current_infra_proto = self._registry.proto().infra.__deepcopy__()
current_infra_proto = InfraProto()
current_infra_proto.CopyFrom(self._registry.proto().infra)
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()
Expand Down
Loading

0 comments on commit 5561b30

Please sign in to comment.