Skip to content

feat: Add online sequence configuration foundation - #6848

Merged
ntkathole merged 3 commits into
feast-dev:masterfrom
patelchaitany:feat/rhoaieng-80117-online-config-foundation
Nov 23, 2026
Merged

ntkathole merged 3 commits into
feast-dev:masterfrom
patelchaitany:feat/rhoaieng-80117-online-config-foundation

Conversation

@patelchaitany

@patelchaitany patelchaitany commented Sep 18, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Add the OnlineConfig dataclass with latest and sequence modes, retention limits, write semantics, and validation.
  • Persist online configuration through FeatureView protobuf serialization and registry apply/update flows.
  • Display online configuration in feature-views describe and document the experimental contract.
  • Add focused coverage for validation, protobuf round trips, backward compatibility, registry apply/update/clear behavior, and CLI output.

Scope

This PR establishes the backward-compatible SDK and registry foundation for future sequence features. Online-store append, sequence retrieval, and backend-specific eviction are intentionally deferred to follow-up PRs.

Acceptance criteria

  • OnlineConfig dataclass with mode, max_length, max_age, and write_mode
  • FeatureView accepts online_config
  • Proto serialization and deserialization
  • Sequence validation requires append writes; max_length and max_age are optional, and leaving them unset means no limit
  • Existing behavior remains unchanged when online_config is omitted
  • feast apply stores, updates, retrieves, and clears OnlineConfig
  • feature-views describe displays configuration details

Validation

  • 26 focused tests passed
  • Ruff checks passed
  • Scoped mypy checks passed for all changed Python modules
  • Python protobuf generation and local Go protobuf generation validated
  • Pre-commit format, lint, template, and secret checks passed

Full repository mypy currently requires the optional types-PyMySQL stub, which is not installed in the local environment.

Parent epic: RHOAIENG-80117

@codecov-commenter

codecov-commenter commented Sep 18, 2026 •

Copy link
Copy Markdown

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

Codecov Report

❌ Patch coverage is 80.28169% with 14 lines in your changes missing coverage. Please review.
✅ Project coverage is 54.10%. Comparing base (3ece12f) to head (95d2cc2).
⚠️ Report is 2 commits behind head on master.

Files with missing lines Patch % Lines
sdk/python/feast/online_config.py 76.00% 8 Missing and 4 partials ⚠️
sdk/python/feast/cli/feature_views.py 66.66% 0 Missing and 1 partial ⚠️
sdk/python/feast/infra/registry/registry.py 75.00% 0 Missing and 1 partial ⚠️
❗ 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    #6848      +/-   ##
==========================================
+ Coverage   53.94%   54.10%   +0.16%     
==========================================
  Files         466      467       +1     
  Lines       58822    58940     +118     
  Branches     8665     8688      +23     
==========================================
+ Hits        31729    31889     +160     
+ Misses      24954    24892      -62     
- Partials     2139     2159      +20     
Flag Coverage Δ
go-feature-server 30.96% <ø> (ø)
python-unit 55.70% <80.28%> (+0.17%) ⬆️
Files with missing lines Coverage Δ
sdk/python/feast/__init__.py 97.22% <100.00%> (+0.07%) ⬆️
sdk/python/feast/batch_feature_view.py 84.11% <100.00%> (-7.25%) ⬇️
sdk/python/feast/diff/registry_diff.py 50.86% <100.00%> (+1.46%) ⬆️
sdk/python/feast/feature_view.py 88.21% <100.00%> (+0.22%) ⬆️
sdk/python/feast/cli/feature_views.py 33.08% <66.66%> (+6.02%) ⬆️
sdk/python/feast/infra/registry/registry.py 66.05% <75.00%> (+0.78%) ⬆️
sdk/python/feast/online_config.py 76.00% <76.00%> (ø)

... and 5 files with indirect coverage changes


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 5773d49...95d2cc2. 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.

@patelchaitany
patelchaitany force-pushed the feat/rhoaieng-80117-online-config-foundation branch 2 times, most recently from 8c9a901 to 899c4ce Compare September 21, 2026 11:29
@patelchaitany
patelchaitany marked this pull request as ready for review September 21, 2026 11:44
@patelchaitany
patelchaitany requested a review from a team as a code owner September 21, 2026 11:44
@patelchaitany
patelchaitany force-pushed the feat/rhoaieng-80117-online-config-foundation branch 4 times, most recently from fdeee98 to 0ef34fd Compare September 28, 2026 08:27
@patelchaitany
patelchaitany force-pushed the feat/rhoaieng-80117-online-config-foundation branch 3 times, most recently from a6bc9b0 to 61e8c8f Compare October 6, 2026 10:07
@patelchaitany
patelchaitany force-pushed the feat/rhoaieng-80117-online-config-foundation branch from 61e8c8f to 9326e8e Compare October 13, 2026 06:34
@patelchaitany
patelchaitany force-pushed the feat/rhoaieng-80117-online-config-foundation branch 2 times, most recently from 4946f7d to 295eab8 Compare November 3, 2026 06:46
@patelchaitany
patelchaitany force-pushed the feat/rhoaieng-80117-online-config-foundation branch 5 times, most recently from 3680246 to 2c83023 Compare November 12, 2026 04:15
@patelchaitany
patelchaitany force-pushed the feat/rhoaieng-80117-online-config-foundation branch from 2c83023 to 50794aa Compare November 17, 2026 07:19

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 2 potential issues.

3 flags not posted on this PR by your GitHub settings — view them in Devin Review. (Configure)

Devin Review

ttl: Optional[timedelta] = None,
tags: Optional[Dict[str, str]] = None,
online: bool = False,
online_config: Optional[OnlineConfig] = None,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Batch view copies lose online configuration

Copying a configured batch view drops online_config because BatchFeatureView.__copy__ omits it. Registry.apply_feature_view uses that copy for version pinning and unpromoted snapshots. Pinning raises a false conflict, while unpromoted versions silently lose their configuration.

Learn more

The new constructor argument is not preserved by BatchFeatureView.copy. That method reconstructs the batch view without online_config, resetting it to None. Registry.apply_feature_view compares the copy against the active view during version pinning, so an otherwise matching configured view fails the comparison. The same method copies unpromoted versions before serializing their snapshots, permanently omitting the configuration. SqlRegistry.apply_feature_view also uses the copy for pin comparisons.

Example: Register a batch view with sequence mode, max_length=50, and append writes. Add a feature and apply with no_promote=True. The new version snapshot contains no online configuration, although the submitted definition does.

Recommended fix: Pass online_config=self.online_config in BatchFeatureView.__copy__. Add regression tests for copied batch views, pinning a configured batch view, and preserving configuration in unpromoted version snapshots.

Devin Review


Was this helpful? React with 👍 or 👎 to provide feedback.

Comment on lines +565 to +569
online_config=(
self.online_config.to_proto()
if self.online_config is not None
else None
),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Default online configuration changes are ignored

With local SQLite, feast apply ignores changes between online_config=None and OnlineConfig() when nothing else changes. diff_registry_objects compares child messages without checking presence, so it reports UNCHANGED. The registry retains the previous configuration instead of storing or clearing it.

Learn more

An omitted message and a present message containing only default-valued fields differ in protobuf presence, but their child messages compare equal. OnlineConfig() serializes entirely to default values, making this distinction reachable for the new field. diff_registry_objects compares field values without HasField, so it produces no property differences for either direction. The CLI's planned apply flow, used for the local provider with SQLite, skips unchanged objects in apply_diff_to_registry. Direct SDK apply does not use this diff filter, so the existing apply test does not cover the failure.

Example: Register a view with online_config=OnlineConfig(), remove that argument, and run feast apply using the local provider and SQLite. With no other changes, the plan reports no update and the registry still contains the explicit configuration.

Recommended fix: Make registry diffing presence-aware for message fields, including online_config. Test both adding and clearing OnlineConfig() through the plan/apply-diffs flow while keeping all other fields unchanged.

Devin Review


Was this helpful? React with 👍 or 👎 to provide feedback.

@ntkathole

Copy link
Copy Markdown
Member

@patelchaitany StreamFeatureView is not wired into these configs ?

"""

mode: str = "latest"
max_length: Optional[int] = None

@ntkathole ntkathole Nov 18, 2026 •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Optional here is for mode="latest" only. In mode="sequence", validation requires a positive max_length.

This is stricter than I thought, where proto 0 meant unlimited. Here None/proto 0 means unset - there is no unlimited sequence.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@patelchaitany please change this to allow mode="sequence" to have unlimited sequence

@patelchaitany

Copy link
Copy Markdown
Contributor Author

@patelchaitany StreamFeatureView is not wired into these configs ?
Not in this PR, on purpose. StreamFeatureView gets online_config in a later PR in the stack:

Signed-off-by: Chaitany Patel <patelchaitany93@gmail.com>
BatchFeatureView.__copy__ now passes online_config, so version pinning
and unpromoted version snapshots keep the configuration.

Registry diffing now checks presence for online_config, so feast apply
detects switching between no config and OnlineConfig() with defaults.

Signed-off-by: Chaitany Patel <patelchaitany93@gmail.com>
Sequence mode no longer requires max_length. Leaving max_length or
max_age unset (proto 0) now means no limit of that kind, so a sequence
with neither set keeps every event.

Signed-off-by: Chaitany Patel <patelchaitany93@gmail.com>
@ntkathole
ntkathole force-pushed the feat/rhoaieng-80117-online-config-foundation branch from 724baf0 to 95d2cc2 Compare November 23, 2026 05:32
@ntkathole
ntkathole merged commit a291a0f into feast-dev:master Nov 23, 2026
17 of 22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants