Title: `feast apply` silently ignores ttl updates when the new ttl is `None` or `timedelta(0)` · Issue #6703 · feast-dev/feast · GitHub
Open Graph Title: `feast apply` silently ignores ttl updates when the new ttl is `None` or `timedelta(0)` · Issue #6703 · feast-dev/feast
X Title: `feast apply` silently ignores ttl updates when the new ttl is `None` or `timedelta(0)` · Issue #6703 · feast-dev/feast
Description: Expected Behavior Re-applying an existing FeatureView with ttl=None or ttl=timedelta(0) should clear the ttl in the registry. After feast apply, store.get_feature_view("foo_fv").ttl should reflect the new "no expiry" value. Current Behav...
Open Graph Description: Expected Behavior Re-applying an existing FeatureView with ttl=None or ttl=timedelta(0) should clear the ttl in the registry. After feast apply, store.get_feature_view("foo_fv").ttl should reflect ...
X Description: Expected Behavior Re-applying an existing FeatureView with ttl=None or ttl=timedelta(0) should clear the ttl in the registry. After feast apply, store.get_feature_view("foo_fv").ttl shoul...
Opengraph URL: https://github.com/feast-dev/feast/issues/6703
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"`feast apply` silently ignores ttl updates when the new ttl is `None` or `timedelta(0)`","articleBody":"## Expected Behavior\n\nRe-applying an existing `FeatureView` with `ttl=None` or `ttl=timedelta(0)` should clear the ttl in the registry. After `feast apply`, `store.get_feature_view(\"foo_fv\").ttl` should reflect the new \"no expiry\" value.\n\n## Current Behavior\n\nThe old ttl is silently retained. `store.get_feature_view(\"foo_fv\").ttl` still returns the previous finite value, with no warning or error, while `feast apply` keeps printing the same \"changed\" diff on every run.\n\n`Registry.apply_feature_view()` routes ttl changes through `_update_metadata_fields()` instead of creating a new version, and that method gates the ttl copy behind a truthiness check on the raw `timedelta`:\n\n```python\nif (\n hasattr(existing_proto.spec, \"ttl\")\n and hasattr(updated_fv, \"ttl\")\n and updated_fv.ttl # falsy for both None and timedelta(0)\n):\n```\n\nSince `None` and `timedelta(0)` are both falsy — and both are the documented way to express \"no ttl\" — the update is dropped exactly in the case it should support. `get_ttl_duration()` already handles `None` correctly; only the outer guard is wrong. Still present on `master` as of 2026-08.\n\nPractical impact: a `FeatureView` intended to never expire silently kept a stale finite ttl, causing `get_historical_features` to drop ~11.6% of otherwise-valid rows from a point-in-time join, with no error or warning.\n\n## Steps to reproduce\n\n```python\nfrom datetime import timedelta\nfrom feast import Entity, FeatureView, Field, FileSource, Project\nfrom feast.types import Float32\n\nproject = Project(name=\"ttl_repro\")\nentity = Entity(name=\"foo\", join_keys=[\"foo_id\"])\nsource = FileSource(\n name=\"foo_source\",\n path=\"./data/foo.parquet\",\n timestamp_field=\"event_timestamp\",\n)\n\n# 1. Apply with a finite ttl -> fv.ttl == 10 days (correct)\nfv = FeatureView(\n name=\"foo_fv\",\n entities=[entity],\n ttl=timedelta(days=10),\n schema=[Field(name=\"bar\", dtype=Float32)],\n source=source,\n)\n\n# 2. Change ttl to \"no expiry\" and `feast apply` again\nfv_v2 = FeatureView(\n name=\"foo_fv\",\n entities=[entity],\n ttl=None, # or timedelta(days=0) - same result\n schema=[Field(name=\"bar\", dtype=Float32)],\n source=source,\n)\n```\n\nThen check `store.get_feature_view(\"foo_fv\").ttl` — it is still `timedelta(days=10)`.\n\n### Specifications\n\n- Version: 0.65.0 (PyPI); also confirmed on `master` as of 2026-08\n- Platform: \u003c!-- e.g. macOS 14.5, Python 3.10 -->\n- Subsystem: Registry — `sdk/python/feast/infra/registry/registry.py`, `Registry._update_metadata_fields()`\n\n## Possible Solution\n\nDrop the outer truthiness check and always sync ttl on update, relying on `get_ttl_duration()`'s existing `None`-handling and defaulting to an explicit zero `Duration` when unset:\n\n```python\nif hasattr(existing_proto.spec, \"ttl\") and hasattr(updated_fv, \"ttl\"):\n if isinstance(updated_fv, FeatureView):\n existing_proto.spec.ttl.CopyFrom(updated_fv.get_ttl_duration() or Duration())\n elif isinstance(updated_fv, LabelView):\n ttl_duration = Duration()\n if updated_fv.ttl is not None:\n ttl_duration.FromTimedelta(updated_fv.ttl)\n existing_proto.spec.ttl.CopyFrom(ttl_duration)\n```\n\nHappy to open a PR with this plus a regression test (apply with finite ttl, re-apply with `ttl=None`, assert the registry reflects it)","author":{"url":"https://github.com/erald02","@type":"Person","name":"erald02"},"datePublished":"2026-08-04T20:38:14Z","url":"https://github.com/feast-dev/feast/issues/6703"}
| 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:4e91e8cb-b11a-d631-7378-f5ff12606a40 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D8D0:2893E9:2C24B9:3CC4F1:6AFE9810 |
| html-safe-nonce | 89ec209c618dc6cef0d050a63d813227108391fb3e50c29c57e87f6c1bc9d99b |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEOEQwOjI4OTNFOToyQzI0Qjk6M0NDNEYxOjZBRkU5ODEwIiwidmlzaXRvcl9pZCI6IjY0NzkzMTIxMTYwNjU5MzMzMjgiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 94671d3f81c14610547822c53f9becaa0bf04d456ae4af0b5f87b77c324193c3 |
| hovercard-subject-tag | issue:5064686686 |
| 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/6703/issue_layout |
| twitter:image | https://opengraph.githubassets.com/26e6733da5c6b1a2d343b5a99ff57549d137bfaa96a7ebed419adf9477e2b356/feast-dev/feast/issues/6703 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/26e6733da5c6b1a2d343b5a99ff57549d137bfaa96a7ebed419adf9477e2b356/feast-dev/feast/issues/6703 |
| og:image:alt | Expected Behavior Re-applying an existing FeatureView with ttl=None or ttl=timedelta(0) should clear the ttl in the registry. After feast apply, store.get_feature_view("foo_fv").ttl should reflect ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | erald02 |
| 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