Title: REST feature server drops `feature_view_metadata` when `include_feature_view_version_metadata` is set · Issue #6922 · feast-dev/feast · GitHub
Open Graph Title: REST feature server drops `feature_view_metadata` when `include_feature_view_version_metadata` is set · Issue #6922 · feast-dev/feast
X Title: REST feature server drops `feature_view_metadata` when `include_feature_view_version_metadata` is set · Issue #6922 · feast-dev/feast
Description: Expected Behavior POST /get-online-features (and /search / /retrieve-online-documents with api_version: 2) accepts include_feature_view_version_metadata: true. With that flag set, the response metadata should contain feature_view_metadat...
Open Graph Description: Expected Behavior POST /get-online-features (and /search / /retrieve-online-documents with api_version: 2) accepts include_feature_view_version_metadata: true. With that flag set, the response meta...
X Description: Expected Behavior POST /get-online-features (and /search / /retrieve-online-documents with api_version: 2) accepts include_feature_view_version_metadata: true. With that flag set, the response meta...
Opengraph URL: https://github.com/feast-dev/feast/issues/6922
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"REST feature server drops `feature_view_metadata` when `include_feature_view_version_metadata` is set","articleBody":"## Expected Behavior\n\n`POST /get-online-features` (and `/search` / `/retrieve-online-documents` with `api_version: 2`) accepts `include_feature_view_version_metadata: true`. With that flag set, the response `metadata` should contain `feature_view_metadata`, a list of `{name, version}` entries, like the Python SDK and gRPC paths return. Three things support this:\n\n- `ServingService.proto`: `repeated FeatureViewMetadata feature_view_metadata = 2; // Only populated when requested`.\n- The `feast/feature_server_utils.py` docstring says `convert_response_to_dict` matches `MessageToDict(proto, preserving_proto_field_name=True)`. The only exception it documents is `double_val` precision. `MessageToDict` does emit `feature_view_metadata`.\n- `RemoteOnlineStore` sends the flag to the server, and its unit test says it does so \"so versioned reads work end-to-end\".\n\n## Current Behavior\n\nThe flag reaches `store.get_online_features(...)`, and `metadata.feature_view_metadata` is filled on the response proto. It is then dropped during JSON serialization. The HTTP response metadata only ever contains `feature_names`, so over REST the flag has no effect.\n\nThe field is lost in three places:\n\n1. `feature_server_utils._metadata_to_dict` only reads `metadata.feature_names`.\n2. `OnlineFeaturesMetadataResponse` in `feature_server.py` has no `feature_view_metadata` field. Before #6015, the endpoint returned a dict through `response_model=OnlineFeaturesResponse`, so this model already filtered the field out. In practice the field has not been returned over REST since the flag was added in #6101.\n3. `RemoteOnlineStore._build_online_response_from_json` (`infra/online_stores/remote.py`) rebuilds the metadata from `feature_names` only. Even if the server returned the field, a client using a remote online store would still lose it.\n\n## Steps to reproduce\n\nMinimal, no server needed (master @ 810391f):\n\n```python\nfrom google.protobuf.json_format import MessageToDict\nfrom feast import proto_json\nfrom feast.feature_server_utils import convert_response_to_dict\nfrom feast.protos.feast.serving.ServingService_pb2 import GetOnlineFeaturesResponse\n\nproto_json.patch()\nr = GetOnlineFeaturesResponse()\nr.metadata.feature_names.val.append(\"trips_today\")\nr.metadata.feature_view_metadata.add(name=\"driver_stats\", version=2)\n\nprint(convert_response_to_dict(r)[\"metadata\"])\n# {'feature_names': ['trips_today']}\nprint(MessageToDict(r, preserving_proto_field_name=True)[\"metadata\"])\n# {'feature_names': ['trips_today'], 'feature_view_metadata': [{'name': 'driver_stats', 'version': 2}]}\n```\n\nEnd to end, with `feast serve` on any repo. The PR's `test_get_online_features_returns_feature_view_version_metadata` checks the same thing through the FastAPI test client:\n\n```bash\ncurl -s -X POST localhost:6566/get-online-features -H 'Content-Type: application/json' -d '{\n \"features\": [\"driver_hourly_stats:conv_rate\"],\n \"entities\": {\"driver_id\": [1001]},\n \"include_feature_view_version_metadata\": true\n}' | jq .metadata\n# {\"feature_names\": [\"driver_id\", \"conv_rate\"]} \u003c- no feature_view_metadata\n```\n\n### Specifications\n\n- Version: master (810391f), 0.66.x dev\n- Platform: macOS 26.5 arm64, Python 3.11 (not platform specific)\n- Subsystem: Python feature server (REST), remote online store\n\n## Possible Solution\n\n- In `_metadata_to_dict`, emit `feature_view_metadata` when it is non-empty, in the same shape `MessageToDict` uses (default-valued `name`/`version` are omitted).\n- Add `feature_view_metadata: List[FeatureViewMetadataResponse]` to `OnlineFeaturesMetadataResponse` so the OpenAPI schema documents it.\n- In `RemoteOnlineStore._build_online_response_from_json`, parse the field back into the proto.\n\nI have a small PR with regression tests ready and will link it here.\n\n---\n_AI assistance: drafted with an AI coding assistant (Claude). The reproduction above was run locally against the current default branch._\n","author":{"url":"https://github.com/Zhuoxi2000","@type":"Person","name":"Zhuoxi2000"},"datePublished":"2026-10-01T15:00:10Z","url":"https://github.com/feast-dev/feast/issues/6922"}
| 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:20a1c663-b620-391a-1dbb-a56d04940252 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8D8E:6B7A6:EFCC56:13BC704:6AFE9816 |
| html-safe-nonce | 5a03062726435ccbeb0b500ec9d202b2046b850f632165c209d1d4d7dfaa6c01 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4RDhFOjZCN0E2OkVGQ0M1NjoxM0JDNzA0OjZBRkU5ODE2IiwidmlzaXRvcl9pZCI6IjQ3MjkyMjc4NzE5NzU4MDY5OTgiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | fba654e80035b2c4fb86434b10c090821c452fa0cbd55e1636a6613f2509d497 |
| hovercard-subject-tag | issue:5664299313 |
| 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/6922/issue_layout |
| twitter:image | https://opengraph.githubassets.com/52df0814b859c995859be1eb12e940dc3065d5092339937db645b490a36aeec7/feast-dev/feast/issues/6922 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/52df0814b859c995859be1eb12e940dc3065d5092339937db645b490a36aeec7/feast-dev/feast/issues/6922 |
| og:image:alt | Expected Behavior POST /get-online-features (and /search / /retrieve-online-documents with api_version: 2) accepts include_feature_view_version_metadata: true. With that flag set, the response meta... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | Zhuoxi2000 |
| 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