Title: Enforce unique feature view names across all feature view types during apply · Issue #5995 · feast-dev/feast · GitHub
Open Graph Title: Enforce unique feature view names across all feature view types during apply · Issue #5995 · feast-dev/feast
X Title: Enforce unique feature view names across all feature view types during apply · Issue #5995 · feast-dev/feast
Description: Problem In the Feast Python SDK, get_online_features resolves feature view names through _get_any_feature_view, which checks the registry tables in a fixed order: Regular FeatureView OnDemandFeatureView StreamFeatureView This means if a ...
Open Graph Description: Problem In the Feast Python SDK, get_online_features resolves feature view names through _get_any_feature_view, which checks the registry tables in a fixed order: Regular FeatureView OnDemandFeatur...
X Description: Problem In the Feast Python SDK, get_online_features resolves feature view names through _get_any_feature_view, which checks the registry tables in a fixed order: Regular FeatureView OnDemandFeatur...
Opengraph URL: https://github.com/feast-dev/feast/issues/5995
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Enforce unique feature view names across all feature view types during apply","articleBody":"## Problem\n\nIn the Feast Python SDK, `get_online_features` resolves feature view names through `_get_any_feature_view`, which checks the registry tables in a fixed order:\n\n1. Regular `FeatureView`\n2. `OnDemandFeatureView`\n3. `StreamFeatureView`\n\nThis means if a project registers both a regular `FeatureView` and a `StreamFeatureView` (or `OnDemandFeatureView`) sharing the same name, `get_online_features` will always return the regular feature view — even if the stream view is the one producing the freshest data.\n\n### Relevant code\n\n**`SqlRegistry._get_any_feature_view`** ([sql.py#L374-L409](https://github.com/feast-dev/feast/blob/master/sdk/python/feast/infra/registry/sql.py#L374-L409)):\n```python\ndef _get_any_feature_view(self, name: str, project: str) -\u003e BaseFeatureView:\n fv = self._get_object(table=feature_views, ...)\n if not fv:\n fv = self._get_object(table=on_demand_feature_views, ...)\n if not fv:\n fv = self._get_object(table=stream_feature_views, ...)\n return fv\n```\n\n**`proto_registry_utils.get_any_feature_view`** follows the same fixed-order pattern for the cached registry path.\n\n### Same pattern in `FeatureStore.apply`\n\nDuring `apply`, the different feature view types are separated into independent lists (`views_to_update`, `sfvs_to_update`, `odfvs_to_update`) and applied independently — there is no cross-type uniqueness check on names.\n\n## Expected Behavior\n\n`feast apply` should **fail with a clear error** if a feature view name collides across different feature view types (e.g., a `FeatureView` and a `StreamFeatureView` sharing the same name). This would prevent silent, hard-to-debug issues at serving time.\n\n## Proposed Solution\n\nAdd a validation step in `FeatureStore.apply()` (or `_validate_feature_views`) that collects all feature view names across `FeatureView`, `OnDemandFeatureView`, and `StreamFeatureView`, and raises a `ValueError` if any duplicates are found.\n\n### Implementation guidance\n\n1. **Where to add the check**: In `FeatureStore.apply()` ([feature_store.py#L770](https://github.com/feast-dev/feast/blob/master/sdk/python/feast/feature_store.py#L770)), after the objects are separated into `views_to_update`, `sfvs_to_update`, and `odfvs_to_update` (around line 849), add a cross-type name uniqueness validation.\n\n2. **What the check should do**:\n - Collect all names from `views_to_update`, `sfvs_to_update`, and `odfvs_to_update`\n - Detect any duplicate names across these lists\n - Raise a clear `ValueError` listing the duplicated name(s) and which types collide\n\n3. **Alternatively or additionally**, the `_validate_feature_views` method ([feature_store.py#L560-L579](https://github.com/feast-dev/feast/blob/master/sdk/python/feast/feature_store.py#L560-L579)) could be extended to include this cross-type check.\n\n4. **Tests**: Add unit tests that verify `apply` raises an error when feature views of different types share the same name.\n\n## References\n\n- Discussed in Feast Slack #feast-beginners: [thread](https://feastopensource.slack.com/archives/C01MSKCMB37/p1770637394216179)","author":{"url":"https://github.com/devin-ai-integration[bot]","@type":"Person","name":"devin-ai-integration[bot]"},"datePublished":"2026-02-20T05:24:55.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/5995/feast/issues/5995"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:03a41c6a-6f0e-47ce-8f0e-25848325b416 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8AB4:162B2:2C6E1F3:3D7992E:6A4F0FED |
| html-safe-nonce | b2883956712ebcca3d91cc1ac946e885ede67352204a2bb234e79707dcaecc9e |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4QUI0OjE2MkIyOjJDNkUxRjM6M0Q3OTkyRTo2QTRGMEZFRCIsInZpc2l0b3JfaWQiOiI3MDcyMzcwODgxMTQyMzk0ODYxIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | cbf797285c74fff4ed4dd0d5e8b83fdd91bd11aaca7b63670e6eb9f6d1a3a799 |
| hovercard-subject-tag | issue:3966672707 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/feast-dev/feast/5995/issue_layout |
| twitter:image | https://opengraph.githubassets.com/cbc2fdf8c4797127528646eb9938eccfa9163847167dabc9e6bd2d9d748a7913/feast-dev/feast/issues/5995 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/cbc2fdf8c4797127528646eb9938eccfa9163847167dabc9e6bd2d9d748a7913/feast-dev/feast/issues/5995 |
| og:image:alt | Problem In the Feast Python SDK, get_online_features resolves feature view names through _get_any_feature_view, which checks the registry tables in a fixed order: Regular FeatureView OnDemandFeatur... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | devin-ai-integration[bot] |
| hostname | github.com |
| expected-hostname | github.com |
| None | b92d11c0aa4a77d54ef4af1078b6a15fb5a70a215b30c4ecf28889d5a8e656d9 |
| turbo-cache-control | no-preview |
| go-import | github.com/feast-dev/feast git https://github.com/feast-dev/feast.git |
| octolytics-dimension-user_id | 57027613 |
| octolytics-dimension-user_login | feast-dev |
| octolytics-dimension-repository_id | 161133770 |
| octolytics-dimension-repository_nwo | feast-dev/feast |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 161133770 |
| octolytics-dimension-repository_network_root_nwo | feast-dev/feast |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 2b8f23afb982271f1b22258a94aede67a6b77760 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width