Title: sqlite.py's OnlineStore.plan() raises typeguard.TypeCheckError for stream feature views · Issue #6658 · feast-dev/feast · GitHub
Open Graph Title: sqlite.py's OnlineStore.plan() raises typeguard.TypeCheckError for stream feature views · Issue #6658 · feast-dev/feast
X Title: sqlite.py's OnlineStore.plan() raises typeguard.TypeCheckError for stream feature views · Issue #6658 · feast-dev/feast
Description: Expected Behavior feast plan (or any OnlineStore.plan() implementation that follows the same pattern as SqliteOnlineStore.plan()) should work the same way whether the registry contains regular feature views, streaming feature views, or b...
Open Graph Description: Expected Behavior feast plan (or any OnlineStore.plan() implementation that follows the same pattern as SqliteOnlineStore.plan()) should work the same way whether the registry contains regular feat...
X Description: Expected Behavior feast plan (or any OnlineStore.plan() implementation that follows the same pattern as SqliteOnlineStore.plan()) should work the same way whether the registry contains regular feat...
Opengraph URL: https://github.com/feast-dev/feast/issues/6658
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"sqlite.py's OnlineStore.plan() raises typeguard.TypeCheckError for stream feature views","articleBody":"## Expected Behavior\n\n`feast plan` (or any `OnlineStore.plan()` implementation that follows the same pattern as `SqliteOnlineStore.plan()`) should work the same way whether the registry contains regular feature views, streaming feature views, or both.\n\n## Current Behavior\n\nFeast has two kinds of feature views: regular ones (`FeatureView`) and streaming ones (`StreamFeatureView`, for Kafka-style sources). Under the hood, each is a distinct protobuf message type — `FeatureViewProto` vs `StreamFeatureViewProto`. They're similar in shape, but not interchangeable.\n\n`SqliteOnlineStore.plan()` loops over every feature view in the registry — both kinds together — and reconstructs each one with the same call ([sdk/python/feast/infra/online_stores/sqlite.py](https://github.com/feast-dev/feast/blob/v0.65.0/sdk/python/feast/infra/online_stores/sqlite.py#L318-L337)):\n\n```python\ndef plan(\n self, config: RepoConfig, desired_registry_proto: RegistryProto\n) -> List[InfraObject]:\n ...\n infra_objects: List[InfraObject] = [\n SqliteTable(\n path=self._get_db_path(config),\n name=_table_id(project, FeatureView.from_proto(view), versioning),\n )\n for view in [\n *desired_registry_proto.feature_views,\n *desired_registry_proto.stream_feature_views,\n ]\n ]\n```\n\n`FeatureView.from_proto()` is guarded by a runtime type checker (`typeguard`, via `@typechecked` on the class — [sdk/python/feast/feature_view.py#L110-L111](https://github.com/feast-dev/feast/blob/v0.65.0/sdk/python/feast/feature_view.py#L110-L111)) that only accepts a `FeatureViewProto`. It works fine for the `feature_views` list. But when the loop reaches an entry from `stream_feature_views`, it hands over a `StreamFeatureViewProto` — the wrong type for that function — and typeguard raises:\n\n```\ntypeguard.TypeCheckError: argument \"feature_view_proto\" (feast.core.StreamFeatureView_pb2.StreamFeatureView) is not an instance of feast.core.FeatureView_pb2.FeatureView\n```\n\nIn short: `plan()` calls the wrong reconstruction function on the wrong kind of feature view, so it crashes for any repo that has at least one `StreamFeatureView` registered — a fairly common setup, not an edge case.\n\nWe ran into this adding `plan()`/`InfraObject` support to a custom DynamoDB online store (the stock `DynamoDBOnlineStore.plan()` is just the no-op default and never triggers this) and initially copied `sqlite.py`'s pattern as the reference implementation, since it's the only in-tree store that implements `plan()`.\n\n## Steps to reproduce\n\n```python\nfrom feast import FileSource\nfrom feast.data_format import JsonFormat\nfrom feast.data_source import KafkaSource\nfrom feast.stream_feature_view import StreamFeatureView\nfrom feast.infra.online_stores.sqlite import SqliteOnlineStore\nfrom feast.protos.feast.core.Registry_pb2 import Registry as RegistryProto\nfrom feast.repo_config import RepoConfig\n\nconfig = RepoConfig(project=\"p\", registry=\"/tmp/x.db\", provider=\"local\", online_store=\"sqlite\")\n\nstream_fv = StreamFeatureView(\n name=\"driver_dropoffs_stream\",\n entities=[],\n schema=[],\n source=KafkaSource(\n name=\"k\",\n timestamp_field=\"event_timestamp\",\n message_format=JsonFormat(schema_json=\"\"),\n kafka_bootstrap_servers=\"localhost:9092\",\n topic=\"t\",\n batch_source=FileSource(path=\"dummy.parquet\", timestamp_field=\"event_timestamp\"),\n ),\n)\n\nregistry_proto = RegistryProto()\nregistry_proto.stream_feature_views.append(stream_fv.to_proto())\n\nSqliteOnlineStore().plan(config, registry_proto) # raises typeguard.TypeCheckError\n```\n\nFull traceback:\n\n```\nTraceback (most recent call last):\n File \"repro.py\", line 28, in \u003cmodule>\n SqliteOnlineStore().plan(config, registry_proto)\n File \".../feast/infra/online_stores/sqlite.py\", line 321, in plan\n infra_objects: List[InfraObject] = [\n ^\n File \".../feast/infra/online_stores/sqlite.py\", line 326, in \u003clistcomp>\n FeatureView.from_proto(view),\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File \".../feast/feature_view.py\", line 523, in from_proto\n def from_proto(cls, feature_view_proto: FeatureViewProto) -> \"FeatureView\":\n File \".../typeguard/_functions.py\", line 180, in check_argument_types_internal\n check_type_internal(value, annotation, memo)\n File \".../typeguard/_checkers.py\", line 994, in check_type_internal\n raise TypeCheckError(f\"is not an instance of {qualified_name(origin_type)}\")\ntypeguard.TypeCheckError: argument \"feature_view_proto\" (feast.core.StreamFeatureView_pb2.StreamFeatureView) is not an instance of feast.core.FeatureView_pb2.FeatureView\n```\n\n### Specifications\n\n- Version: reproduced on 0.62.0 (installed via `pip install feast==0.62.0`); confirmed the same code pattern is still present on `v0.65.0` (latest tag) as of this report.\n- Platform: macOS, Python 3.11\n- Subsystem: online store / `feast plan` / registry\n\n## Possible Solution\n\nUse the matching class for each list instead of `FeatureView.from_proto()` for both:\n\n```python\nviews = [\n FeatureView.from_proto(view) for view in desired_registry_proto.feature_views\n] + [\n StreamFeatureView.from_proto(view) for view in desired_registry_proto.stream_feature_views\n]\n```\n\nOpened a PR with this fix: #6659","author":{"url":"https://github.com/casaar97","@type":"Person","name":"casaar97"},"datePublished":"2026-07-29T12:18:48Z","url":"https://github.com/feast-dev/feast/issues/6658"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| 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:79f154de-4057-a0f2-be6a-829c11a47411 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E7D6:A7C4D:F0DF44:14915E0:6AFE981E |
| html-safe-nonce | fcfb8c4b056115a8a2948e074e56b2ccf70a9732d7404898a5d26e0aa8e13212 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFN0Q2OkE3QzREOkYwREY0NDoxNDkxNUUwOjZBRkU5ODFFIiwidmlzaXRvcl9pZCI6IjE3NTU4ODgxMzM5NzY1Mjg5MjYiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 7e648e6de7f25ae730d7e5fd6c8c63936e5e890fe3993cab089d3925d22a76b6 |
| hovercard-subject-tag | issue:5009138666 |
| 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/6658/issue_layout |
| twitter:image | https://opengraph.githubassets.com/ae3c1ed9d407070d64578dd4795ebca13652513145388fbeedfe0e74cee39ab3/feast-dev/feast/issues/6658 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/ae3c1ed9d407070d64578dd4795ebca13652513145388fbeedfe0e74cee39ab3/feast-dev/feast/issues/6658 |
| og:image:alt | Expected Behavior feast plan (or any OnlineStore.plan() implementation that follows the same pattern as SqliteOnlineStore.plan()) should work the same way whether the registry contains regular feat... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | casaar97 |
| hostname | github.com |
| expected-hostname | github.com |
| None | b3c0f155eafc27e60db6e254d1ffff0e072e9ab3b4018a5ee518797c19d89f86 |
| 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 | 4a10310af51a1bfffbedc4fd81cb582acf0cb0ff |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width