Skip to content

fix: Allow serving features while a feature view is MATERIALIZING - #6789

Open
alan-gauthier-jt wants to merge 1 commit into
feast-dev:masterfrom
alan-gauthier-jt:fix/serve-features-while-materializing
Open

fix: Allow serving features while a feature view is MATERIALIZING#6789
alan-gauthier-jt wants to merge 1 commit into
feast-dev:masterfrom
alan-gauthier-jt:fix/serve-features-while-materializing

Conversation

@alan-gauthier-jt

Copy link
Copy Markdown
Contributor

What this does

Adds an opt-in registry config flag, serve_features_while_materializing (default false), that lets online serving continue for a feature view while it is in the MATERIALIZING state.

Problem

The lifecycle serving gate introduced in v0.64.0 (#6401) rejects any feature view whose state is not AVAILABLE_ONLINE or STATE_UNSPECIFIED:

Feature view '<name>' is in state 'MATERIALIZING' and cannot serve features.
Only AVAILABLE_ONLINE feature views can serve.

FeatureStore.materialize() transitions a feature view to MATERIALIZING and commits that state to the registry. In the standard pattern — one shared registry, periodic incremental materialization, and a separate feast serve process — this means routine materialization interrupts online serving until it completes.

Fixes #6780.

Change

When serve_features_while_materializing: true is set under registry:, MATERIALIZING is added to the set of servable states, so servers keep returning the last-materialized values during materialization. States that never had online data (CREATED, GENERATED) remain gated, and the default (false) preserves current behavior.

The flag follows the existing plumbing pattern of enable_online_feature_view_versioning: a RegistryConfig field, copied onto the registry object in __init__ (proto Registry and SqlRegistry), and read via getattr(registry, ...) in the gate.

registry:
  path: ...
  serve_features_while_materializing: true

Testing

  • New unit tests in test_feature_view_state.py covering: MATERIALIZING blocked by default, served when the flag is on, AVAILABLE_ONLINE served regardless, and CREATED still blocked even with the flag on.
  • ruff check / ruff format clean; mypy clean; full test_feature_view_state.py suite passes (33/33).

Notes

  • Python-only: the Go feature server has no equivalent lifecycle gate, so no Go changes are needed.
  • No proto changes.

The lifecycle serving gate added in v0.64.0 rejects any feature view not
in AVAILABLE_ONLINE / STATE_UNSPECIFIED state. Because materialization
transitions a feature view to MATERIALIZING in the shared registry,
routine incremental materialization interrupts concurrent feature
servers with "cannot serve features. Only AVAILABLE_ONLINE feature views
can serve."

Add an opt-in registry config flag, serve_features_while_materializing
(default False), that also permits serving while a feature view is
MATERIALIZING, letting servers keep returning last-materialized values
during materialization. States that never had online data (CREATED,
GENERATED) remain gated.

Fixes feast-dev#6780

Signed-off-by: Alan Gauthier <alan.gauthier@jobteaser.com>
@alan-gauthier-jt
alan-gauthier-jt marked this pull request as ready for review August 27, 2026 14:09
@alan-gauthier-jt
alan-gauthier-jt requested a review from a team as a code owner August 27, 2026 14:09
@codecov-commenter

codecov-commenter commented Aug 27, 2026

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 47.10%. Comparing base (1f2584d) to head (a008155).
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #6789      +/-   ##
==========================================
+ Coverage   47.08%   47.10%   +0.01%     
==========================================
  Files         419      419              
  Lines       51878    51885       +7     
  Branches     7525     7526       +1     
==========================================
+ Hits        24429    24441      +12     
+ Misses      25700    25697       -3     
+ Partials     1749     1747       -2     
Flag Coverage Δ
go-feature-server 30.58% <ø> (ø)
python-unit 48.41% <100.00%> (+0.01%) ⬆️
Files with missing lines Coverage Δ
sdk/python/feast/infra/registry/registry.py 62.79% <100.00%> (+0.04%) ⬆️
sdk/python/feast/infra/registry/sql.py 58.27% <100.00%> (+0.05%) ⬆️
sdk/python/feast/repo_config.py 79.13% <100.00%> (+0.10%) ⬆️
sdk/python/feast/utils.py 78.65% <100.00%> (+0.77%) ⬆️

Continue to review full report in Codecov by Harness.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1f2584d...a008155. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow serving online features while a FeatureView is MATERIALIZING (config to relax the lifecycle serving gate)

2 participants