-
Notifications
You must be signed in to change notification settings - Fork 1.4k
docs: Add end-to-end registry deletion lifecycle example and unit test (#5360) #6504
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
obielin
wants to merge
2
commits into
feast-dev:master
Choose a base branch
from
obielin:docs/registry-deletion-lifecycle-5360
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+140
−1
Open
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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 throughapply(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.mdlegitimately documents both routes:test_delete_feature_view— mirrors the end-to-end snippet step for step: list, delete by name, list again, then assertget_feature_viewraisesFeatureViewNotFoundException.test_delete_feature_view_raises_when_missing— covers theFeatureViewNotFoundExceptionthatdelete_feature_view's own docstring promises for a name that was never registered.test_apply_delete_feature_view— keeps theobjects_to_delete/partial=Falsepath from the hint block above the example, with a docstring noting it is deliberately thefeast applyroute 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_udfare pre-existing onmaster— identical with my changes stashed.ruff checkandruff format --checkare both clean.The branch was 151 commits behind, so I rebased onto current
masterin the same push; that clears the previous out-of-date state.