Skip to content

fix: Serve aliased on demand feature views in feature services - #6901

Merged
ntkathole merged 1 commit into
feast-dev:masterfrom
breken-ai:fix/odfv-alias-online-features
Oct 1, 2026
Merged

ntkathole merged 1 commit into
feast-dev:masterfrom
breken-ai:fix/odfv-alias-online-features

Conversation

@breken-ai

Copy link
Copy Markdown
Contributor

What this PR does / why we need it:

If an on demand feature view is added to a FeatureService under an alias, its features are silently missing from online responses.

service = FeatureService(
    name="driver_service",
    features=[driver_stats_fv, scaled.with_name("scaled_alias")],
)
store.get_online_features(entity_rows=[{"driver_id": 1001}], features=service)
# -> {"driver_id": [...], "conv_rate": [...]}
#    conv_rate_x10 from the aliased ODFV is missing, no error raised

The feature service's refs use the projection name, so they read scaled_alias:conv_rate_x10. _group_feature_refs and _get_feature_views_to_use resolve that ref through projection.name_to_use(). _augment_response_with_on_demand_transforms is different: it keys requested_odfv_map by odfv.name, which is scaled. The aliased ref never matches, the transform is skipped, and the requested feature is dropped from the response. Pandas and python modes are both affected.

with_name is the public aliasing API for ODFVs (#1872), and the same function already builds full names from projection.name_to_use(), so aliases are meant to work here. The fix keys the map by projection.name_alias when one is set and falls back to odfv.name. Versioned refs are unchanged, because _parse_feature_ref strips @vN before the lookup.

Which issue(s) this PR fixes:

No existing issue. I searched open issues and PRs for ODFV aliases and with_name in feature services and didn't find a match.

Checks

  • I've made sure the tests are passing.
  • My commits are signed off (git commit -s)
  • My PR title follows conventional commits format

Testing Strategy

  • Unit tests
  • Integration tests
  • Manual tests
  • Testing is not required for this change

New test_feature_service_serves_aliased_odfv_features[pandas|python] in tests/unit/test_on_demand_pandas_transformation.py. It serves a feature service that holds odfv.with_name(...) and checks the default names in both modes and the full names (scaled_alias__conv_rate_x10) in pandas mode.

Misc

This PR only fixes online serving. get_historical_features with the same aliased feature service fails loudly with Could not find feature view from reference scaled_alias:conv_rate_x10, because offline stores re-fetch ODFVs from the registry by name. That is part of the ODFV handling cleanup in #5890.

The python mode full-name case is fixed separately in #6900.

This change was prepared with an AI coding assistant, and the tests and checks above were run locally.

@breken-ai
breken-ai requested a review from a team as a code owner September 30, 2026 02:41
@codecov-commenter

codecov-commenter commented Sep 30, 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 48.05%. Comparing base (dd9f099) to head (3829d87).
❗ 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    #6901   +/-   ##
=======================================
  Coverage   48.04%   48.05%           
=======================================
  Files         427      427           
  Lines       53591    53591           
  Branches     7800     7800           
=======================================
+ Hits        25749    25753    +4     
+ Misses      25986    25984    -2     
+ Partials     1856     1854    -2     
Flag Coverage Δ
go-feature-server 30.58% <ø> (ø)
python-unit 49.39% <100.00%> (+<0.01%) ⬆️
Files with missing lines Coverage Δ
sdk/python/feast/utils.py 79.53% <100.00%> (+0.12%) ⬆️

... and 2 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 dd9f099...3829d87. 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.

@ntkathole

Copy link
Copy Markdown
Member

Thanks @breken-ai for fixes, may be once both pr merged or in one of the pr you can add test coverage for alias + python mode + full_feature_names to make sure no regressions

@ntkathole
ntkathole force-pushed the fix/odfv-alias-online-features branch from 933b68c to 3829d87 Compare September 30, 2026 16:43
An ODFV added to a FeatureService with with_name() produces feature
refs under the alias, but the online transform lookup was keyed by the
ODFV's registered name. The transform was skipped and its features were
silently missing from get_online_features responses.

Key the lookup by the projection alias when one is set.

Signed-off-by: breken-ai <312387581+breken-ai@users.noreply.github.com>
@ntkathole
ntkathole force-pushed the fix/odfv-alias-online-features branch from 3829d87 to 95a4ef6 Compare October 1, 2026 12:37
@ntkathole
ntkathole merged commit 823b92e into feast-dev:master Oct 1, 2026
2 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.

3 participants