Visitar URL original
fix: scope data source operations by project in shared registry by mango766 · Pull Request #6207 · feast-dev/feast · GitHub
Skip to content
Closed
Changes from all commits
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
fix: scope data source operations by project in shared registry
apply_data_source and delete_data_source match by name only, without
filtering by project. When multiple projects share the same registry
and have data sources with the same name, this causes cross-project
overwrites.

Add the project filter to both methods, consistent with how
apply_entity, apply_feature_service, and apply_feature_view already
scope their lookups by both name and project.

Fixes #6206
  • Loading branch information
easonysliu
easonysliu committed Apr 1, 2026
commit c39116d5a59ea6398cde1b11e552ced7c7d92119
7 changes: 5 additions & 2 deletions sdk/python/feast/infra/registry/registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,10 @@ def apply_data_source(
registry = self._prepare_registry_for_changes(project)

for idx, existing_data_source_proto in enumerate(registry.data_sources):
if existing_data_source_proto.name == data_source.name:
if (
existing_data_source_proto.name == data_source.name
and existing_data_source_proto.project == project
):
existing_data_source = DataSource.from_proto(existing_data_source_proto)
# Check if the data source has actually changed
if existing_data_source == data_source:
Expand Down Expand Up @@ -423,7 +426,7 @@ def delete_data_source(self, name: str, project: str, commit: bool = True):
for idx, data_source_proto in enumerate(
self.cached_registry_proto.data_sources
):
if data_source_proto.name == name:
if data_source_proto.name == name and data_source_proto.project == project:
del self.cached_registry_proto.data_sources[idx]
if commit:
self.commit()
Expand Down