Skip to content

docs: Add end-to-end registry deletion lifecycle example and unit test (#5360) - #6504

Merged
ntkathole merged 2 commits into
feast-dev:masterfrom
obielin:docs/registry-deletion-lifecycle-5360
Aug 19, 2026
Merged

docs: Add end-to-end registry deletion lifecycle example and unit test (#5360)#6504
ntkathole merged 2 commits into
feast-dev:masterfrom
obielin:docs/registry-deletion-lifecycle-5360

Conversation

@obielin

@obielin obielin commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

What this PR does

Closes #5360.

The existing registry docs already cover the feast apply deletion warning, the CLI command, the individual Python SDK delete_* methods, and the partial=False note. The one remaining gap, as agreed in the issue discussion, is that there is no single, self-contained example showing the complete deletion lifecycle in one place.

This PR addresses that gap with a minimal, copy-pasteable addition.

Changes

  • docs/getting-started/components/registry.md: Adds an "End-to-end example" section demonstrating the full feature view deletion lifecycle — list/verify the object exists, delete it, then list again to confirm removal — and notes that the same pattern applies to other registry objects via their corresponding delete_* methods.
  • sdk/python/tests/unit/local_feast_tests/test_local_feature_store.py: Adds test_apply_delete_feature_view, which registers an entity and feature view, deletes it using apply(objects_to_delete=[...], partial=False), and asserts the feature view is gone and that get_feature_view raises FeatureViewNotFoundException.

Notes

This keeps the change intentionally small and documentation-focused, per the consensus reached in the issue thread between the maintainer and contributors. Thanks to @Henildiyora for the original snippet draft and review, and to @jyejare for the guidance.

@obielin
obielin requested a review from a team as a code owner June 11, 2026 19:51
@obielin
obielin force-pushed the docs/registry-deletion-lifecycle-5360 branch from b939040 to 5723ed6 Compare June 11, 2026 20:47
@obielin
obielin force-pushed the docs/registry-deletion-lifecycle-5360 branch from 5723ed6 to 25d077d Compare June 11, 2026 21:07
assert fvs[0].name == driver_fv.name

# Delete the feature view using objects_to_delete
test_feature_store.apply(

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.

test is using feast apply to delete while docs and docstrings says objects_to_delete or delete_feature_view.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Good catch, you're right — thanks. Fixed in 92523ec38.

The docs snippet demonstrates store.delete_feature_view(name), but the only test I added went through apply(objects_to_delete=[...], partial=False), so the API the example actually teaches had no coverage at all.

Rather than swap one for the other, I split them, since registry.md legitimately documents both routes:

  • test_delete_feature_view — mirrors the end-to-end snippet step for step: list, delete by name, list again, then assert get_feature_view raises FeatureViewNotFoundException.
  • test_delete_feature_view_raises_when_missing — covers the FeatureViewNotFoundException that delete_feature_view's own docstring promises for a name that was never registered.
  • test_apply_delete_feature_view — keeps the objects_to_delete / partial=False path from the hint block above the example, with a docstring noting it is deliberately the feast apply route and distinct from the one above.

I also lifted the shared source frame and registration into two small helpers, so the two lifecycle tests don't duplicate ~30 lines of setup.

Verified locally: the 3 deletion tests pass, and the file is at 24 passed. The 2 failures in test_apply_stream_feature_view / test_apply_stream_feature_view_udf are pre-existing on master — identical with my changes stashed. ruff check and ruff format --check are both clean.

The branch was 151 commits behind, so I rebased onto current master in the same push; that clears the previous out-of-date state.

)

The existing registry deletion docs cover the CLI and individual Python
SDK delete methods, but lack a single copy-pasteable example showing the
full create -> verify -> delete -> confirm flow.

- Add an 'End-to-end example' snippet to registry.md that lists a feature
  view, deletes it with delete_feature_view(), and lists again to confirm.
- Add a unit test for FeatureView deletion via apply(objects_to_delete=...,
  partial=False) to guard the programmatic deletion path.

Signed-off-by: Linda Oraegbunam <obielinda@gmail.com>
Addresses review feedback on feast-dev#6504: the new docs snippet demonstrates
store.delete_feature_view(name), but the only test added went through
apply(objects_to_delete=..., partial=False), so the documented API was
still untested.

- Add test_delete_feature_view, mirroring the registry.md snippet
  step for step: list, delete by name, list again, then assert
  get_feature_view raises FeatureViewNotFoundException.
- Add test_delete_feature_view_raises_when_missing, covering the
  FeatureViewNotFoundException that delete_feature_view's own docstring
  promises for an unregistered name.
- Keep the apply(objects_to_delete=...) test for the `feast apply` path
  documented in the hint block, and note in its docstring that it is
  deliberately distinct from delete_feature_view.
- Lift the shared source frame and registration into two helpers so the
  two lifecycle tests do not duplicate ~30 lines of setup.

Signed-off-by: Linda Oraegbunam <obielinda@gmail.com>
@obielin
obielin force-pushed the docs/registry-deletion-lifecycle-5360 branch from 25d077d to 92523ec Compare August 18, 2026 18:45
@codecov-commenter

codecov-commenter commented Aug 19, 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 46.98%. Comparing base (6a4690a) to head (92523ec).
❗ 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    #6504      +/-   ##
==========================================
+ Coverage   46.96%   46.98%   +0.02%     
==========================================
  Files         418      418              
  Lines       51675    51675              
  Branches     7485     7485              
==========================================
+ Hits        24268    24281      +13     
+ Misses      25673    25666       -7     
+ Partials     1734     1728       -6     
Flag Coverage Δ
go-feature-server 30.58% <ø> (ø)
python-unit 48.29% <ø> (+0.02%) ⬆️
see 4 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 6a4690a...92523ec. 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
ntkathole merged commit aade119 into feast-dev:master Aug 19, 2026
33 of 34 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.

Doc: Document feature store objects deletion from feast

3 participants