GeezerVison is showing github.com — fix: Correct project_id scoping in get_user_metadata and delete_project by Abhishek8108 · Pull Request #6248 · feast-dev/feast
Conversation
Abhishek8108
commented
Apr 8, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
Summary
Two pre-existing SQL correctness bugs in SnowflakeRegistry, noticed while working on #6243.
get_user_metadata (line 1119)
The SELECT query filtered only by {fv_column_name}_name, without scoping to project_id. The primary key for feature view tables is (feature_view_name, project_id), so in a shared Snowflake registry this could return user metadata from a different project's feature view with the same name. Fixed by adding project_id = '{project}' to the WHERE clause — consistent with apply_user_metadata which already does this correctly.
delete_project (line 1326)
The DELETE query interpolated project, which is a Project object returned by self.get_project(name). Project.__str__ returns str(MessageToJson(self.to_proto())) — a JSON blob — which never matches any project_id stored in the database. This made delete_project a silent no-op: all DELETE statements executed successfully but matched zero rows. Fixed by using the name string parameter directly.
Testing
Both are SQL correctness fixes. The existing integration test suite in test_universal_registry.py covers both methods end-to-end; no new unit test surface is introduced by these changes.
Relates to #6243.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
michaelinaclauer93 and saragebrs reacted with thumbs up emoji
issela-makes, raehanna-22, and rodriguez-anna reacted with rocket emoji
All reactions
-
👍
2 reactions
-
🚀
3 reactions
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✅ Devin Review: No Issues Found
Devin Review analyzed this PR and found no potential bugs to report.
View in Devin Review to see 3 additional findings.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
ntkathole
changed the title
fix: correct project_id scoping in get_user_metadata and delete_project
fix: Correct project_id scoping in get_user_metadata and delete_project
Apr 10, 2026
get_user_metadata was filtering only by feature view name, allowing a
shared Snowflake registry to return user metadata from a different
project's feature view with the same name. Added project_id = '{project}'
to the WHERE clause, consistent with apply_user_metadata.
delete_project was interpolating a Project object into the SQL string
instead of the project name string, which would use __str__ of the object
rather than the actual name. Changed to use the `name` parameter directly.
Signed-off-by: Abhishek8108 <[email protected]>
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Milestone
No milestone
Development
Successfully merging this pull request may close these issues.
Uh oh!
There was an error while loading. Please reload this page.
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.