Skip to content

Commit 903bda5

Browse files
fix: Address additional Devin review feedback
- Set spec.project on snapshot protos in SqlRegistry before serializing, so version snapshots include the correct project field - Fix _check_versioned_read_support to check projection.version_tag instead of current_version_number, so explicitly version-qualified reads (@v0) are correctly rejected on non-SQLite stores Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent e9c4c68 commit 903bda5

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
lines changed

sdk/python/feast/infra/online_stores/online_store.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -244,9 +244,11 @@ def _check_versioned_read_support(self, grouped_refs):
244244
if isinstance(self, SqliteOnlineStore):
245245
return
246246
for table, _ in grouped_refs:
247-
version = getattr(table, "current_version_number", None)
248-
if version is not None and version > 0:
249-
raise VersionedOnlineReadNotSupported(self.__class__.__name__, version)
247+
version_tag = getattr(table.projection, "version_tag", None)
248+
if version_tag is not None:
249+
raise VersionedOnlineReadNotSupported(
250+
self.__class__.__name__, version_tag
251+
)
250252

251253
async def get_online_features_async(
252254
self,

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

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -729,7 +729,9 @@ def apply_feature_view(
729729

730730
# Update current_version_number before saving snapshot
731731
feature_view.current_version_number = next_ver
732-
snapshot_proto_bytes = feature_view.to_proto().SerializeToString()
732+
snapshot_proto = feature_view.to_proto()
733+
snapshot_proto.spec.project = project
734+
snapshot_proto_bytes = snapshot_proto.SerializeToString()
733735

734736
# Save new as next version (with correct current_version_number)
735737
self._save_version_snapshot(
@@ -755,7 +757,9 @@ def apply_feature_view(
755757
else:
756758
# New FV: save as v0
757759
feature_view.current_version_number = 0
758-
snapshot_proto_bytes = feature_view.to_proto().SerializeToString()
760+
snapshot_proto = feature_view.to_proto()
761+
snapshot_proto.spec.project = project
762+
snapshot_proto_bytes = snapshot_proto.SerializeToString()
759763
self._save_version_snapshot(
760764
feature_view.name,
761765
project,

0 commit comments

Comments
 (0)