fix: scope data source operations by project in shared registry#6207
Open
mango766 wants to merge 1 commit intofeast-dev:masterfrom
Open
fix: scope data source operations by project in shared registry#6207mango766 wants to merge 1 commit intofeast-dev:masterfrom
mango766 wants to merge 1 commit intofeast-dev:masterfrom
Conversation
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 feast-dev#6206
Member
|
@mango766 please include tests |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #6206
apply_data_sourceanddelete_data_sourceinRegistrymatch data sources by name only, without filtering by project. When multiple projects share the same registry and have data sources with the same name (e.g. the defaultvals_to_add), this causes cross-project overwrites.Fix
Add the
projectfilter to both methods, consistent with howapply_entity(line 349-352),apply_feature_service(line 447-451), andapply_feature_view(line 779-781) already scope their lookups.apply_data_source:
existing_data_source_proto.name == data_source.name and existing_data_source_proto.project == projectdelete_data_source:
data_source_proto.name == name and data_source_proto.project == projectTest plan
feast applyfor project A with data sourcevals_to_adddoes not overwrite project B'svals_to_addfeast applyfor the same project still correctly updates existing data sources