Skip to content

fix: Update the LabelView source when it is re-applied - #7211

Open
ShivamSharma43 wants to merge 1 commit into
feast-dev:masterfrom
ShivamSharma43:fix/label-view-source-update
Open

ShivamSharma43 wants to merge 1 commit into
feast-dev:masterfrom
ShivamSharma43:fix/label-view-source-update

Conversation

@ShivamSharma43

@ShivamSharma43 ShivamSharma43 commented Nov 22, 2026 •

Copy link
Copy Markdown
Contributor

What this PR does / why we need it:

Re-applying a LabelView with a new data source and the same schema keeps the old source in the file-based registries. No error is raised.

When the schema is unchanged, Registry.apply_feature_view updates the stored proto in place through _update_metadata_fields. That method treats data sources as configuration, but it only copies batch_source and stream_source. LabelViewSpec has neither; it keeps its source in source, so the change is dropped. The SQL registry stores the whole new proto, so it isn't affected.

_update_metadata_fields now also copies source for a LabelView, and clears it when the new view has no source (source is optional there). It serializes the source with serialize_data_source, as LabelView.to_proto does.

Which issue(s) this PR fixes:

No issue filed; found while reading the registry code.

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 tests in sdk/python/tests/unit/infra/registry/test_update_metadata_fields.py cover a changed FileSource, a changed PushSource and a removed source. All three cases fail on master and pass with the fix.

  • Applying a LabelView twice to a file registry, with file://old/* and then file://new/*, returns the old path on master and the new one with the fix.

  • test_update_metadata_fields.py, test_registry.py, test_file_registry.py and test_label_view.py: 52 passed. The two tests in test_file_registry.py also report a teardown error on Windows (temp directory still in use), the same on master. The rest of the registry unit tests and the integration tests were not run locally.

  • ruff check and ruff format are clean. mypy feast/infra/registry/registry.py reports one error, the same as on master.

Misc

This change was prepared with AI assistance (Claude Code), which also ran the tests listed above.

🤖 Generated with Claude Code


Devin Review

Registry._update_metadata_fields copies batch_source and stream_source, but
LabelViewSpec keeps its data source in source. Re-applying a LabelView with
a new source and the same schema left the old source in the registry.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Shivam Sharma <192242476+ShivamSharma43@users.noreply.github.com>
@ShivamSharma43
ShivamSharma43 requested a review from a team as a code owner November 22, 2026 11:52
Copilot AI balanced review requested due to automatic review settings November 22, 2026 11:52

Copilot AI 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.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

@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: 3 flags

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

Devin Review

@codecov-commenter

codecov-commenter commented Nov 22, 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 53.71%. Comparing base (5693421) to head (4d095af).
❗ 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    #7211      +/-   ##
==========================================
+ Coverage   53.67%   53.71%   +0.03%     
==========================================
  Files         462      462              
  Lines       58549    58555       +6     
  Branches     8634     8636       +2     
==========================================
+ Hits        31424    31450      +26     
+ Misses      24988    24978      -10     
+ Partials     2137     2127      -10     
Flag Coverage Δ
go-feature-server 30.96% <ø> (ø)
python-unit 55.29% <100.00%> (+0.04%) ⬆️
Files with missing lines Coverage Δ
sdk/python/feast/infra/registry/registry.py 67.73% <100.00%> (+2.46%) ⬆️

... and 1 file 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 5693421...4d095af. 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.

This branch has not been deployed

No deployments
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.

3 participants