Title: fix: Feast apply silently ignoring ttl updates to None or timedelta(0) by saket3395 · Pull Request #6709 · feast-dev/feast · GitHub
Open Graph Title: fix: Feast apply silently ignoring ttl updates to None or timedelta(0) by saket3395 · Pull Request #6709 · feast-dev/feast
X Title: fix: Feast apply silently ignoring ttl updates to None or timedelta(0) by saket3395 · Pull Request #6709 · feast-dev/feast
Description: Summary Fixes #6703 — re-applying an existing FeatureView/LabelView with ttl=None or ttl=timedelta(0) (both the documented way to express "no ttl") silently keeps the old finite ttl in the registry. feast apply reports the change on every run, but nothing actually updates. Root cause (as diagnosed in the issue): Registry._update_metadata_fields() routes ttl changes through a truthiness check: if ( hasattr(existing_proto.spec, "ttl") and hasattr(updated_fv, "ttl") and updated_fv.ttl # falsy for both None and timedelta(0) ): Since None and timedelta(0) are both falsy, the whole ttl-update block is skipped exactly when it should clear the ttl. There's a second bug in the same block that the outer-gate fix alone doesn't cover: for the FeatureView branch, get_ttl_duration() returns Python None when self.ttl is None: def get_ttl_duration(self): ttl_duration = None if self.ttl is not None: ttl_duration = Duration() ttl_duration.FromTimedelta(self.ttl) return ttl_duration and the existing inner check in _update_metadata_fields: ttl_duration = updated_fv.get_ttl_duration() if ttl_duration: existing_proto.spec.ttl.CopyFrom(ttl_duration) would still skip CopyFrom when ttl_duration is None — so removing only the outer gate fixes the timedelta(0) case but not ttl=None for FeatureView. Fix Removed the outer truthy gate; kept only the hasattr checks. For FeatureView: always CopyFrom — using an explicit empty Duration() when get_ttl_duration() returns None, instead of skipping the write. An empty Duration decodes back to timedelta(0) via FeatureView.from_proto's existing ToNanoseconds() == 0 check, so this correctly round-trips as "no ttl". For LabelView: guarded FromTimedelta() against ttl is None (previously unreachable because the outer gate prevented ttl=None from reaching this branch at all; now that the gate is gone, it needs its own guard) — falls through to the default zero Duration() in that case. Verification Traced all three cases (None, timedelta(0), a finite value) through the new branch logic in isolation (a minimal stand-in mirroring the real Duration/get_ttl_duration control flow, since protobuf isn't installed in this environment and I didn't want to add it just to verify branch logic): ttl input FeatureView branch LabelView branch None zero Duration zero Duration timedelta(0) zero Duration zero Duration timedelta(days=10) 864000s Duration 864000s Duration Both branches now resolve identically for all three cases, and confirmed via feature_view.py's from_proto that a zero-value Duration round-trips to timedelta(0), matching the codebase's existing "no ttl" convention. Test plan Traced all three ttl cases through the new logic in isolation, for both FeatureView and LabelView. Didn't run this against feast's actual test suite / a live feast apply round-trip in this environment (protobuf not installed here, didn't want to pull in the dependency just to verify this). Flagging for CI/maintainer verification — happy to iterate if anything surfaces.
Open Graph Description: Summary Fixes #6703 — re-applying an existing FeatureView/LabelView with ttl=None or ttl=timedelta(0) (both the documented way to express "no ttl") silently keeps the old finite ttl in th...
X Description: Summary Fixes #6703 — re-applying an existing FeatureView/LabelView with ttl=None or ttl=timedelta(0) (both the documented way to express "no ttl") silently keeps the old finite t...
Opengraph URL: https://github.com/feast-dev/feast/pull/6709
X: @github
Domain: github.com
| 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 | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:92299107-4613-6bc0-5b03-e3f55bc24f47 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | 99C0:6B7A6:F16EF7:13DF4F4:6AFE9894 |
| html-safe-nonce | cf33cd9c076db6e645dcdbab66da4aecf412b6ff380dc8986672bc0c88b017bb |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5OUMwOjZCN0E2OkYxNkVGNzoxM0RGNEY0OjZBRkU5ODk0IiwidmlzaXRvcl9pZCI6IjMxODczOTA1NTM2MzY1OTkyNCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 7e40ba90c71916957ce42ab74185ab99658ab2da73f73caef396272b8cb5cdf4 |
| hovercard-subject-tag | pull_request:4218504572 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,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/feast-dev/feast/pull/6709/files |
| twitter:image | https://avatars.githubusercontent.com/u/55333527?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/55333527?s=400&v=4 |
| og:image:alt | Summary Fixes #6703 — re-applying an existing FeatureView/LabelView with ttl=None or ttl=timedelta(0) (both the documented way to express "no ttl") silently keeps the old finite ttl in th... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | b3c0f155eafc27e60db6e254d1ffff0e072e9ab3b4018a5ee518797c19d89f86 |
| turbo-cache-control | no-preview |
| diff-view | unified |
| 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 full-width |
| disable-turbo | true |
| 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 |
Links:
Viewport: width=device-width