From c39116d5a59ea6398cde1b11e552ced7c7d92119 Mon Sep 17 00:00:00 2001 From: easonysliu Date: Wed, 1 Apr 2026 13:06:40 +0800 Subject: [PATCH] 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 --- sdk/python/feast/infra/registry/registry.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/sdk/python/feast/infra/registry/registry.py b/sdk/python/feast/infra/registry/registry.py index 76da6ad831d..dc264213462 100644 --- a/sdk/python/feast/infra/registry/registry.py +++ b/sdk/python/feast/infra/registry/registry.py @@ -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: @@ -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()