-
Notifications
You must be signed in to change notification settings - Fork 1.5k
feat: Add enabled/disabled toggle for feature views #6401
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
Changes from 1 commit
85a18dc
5e98c7f
f735cd2
426ae09
365ecb4
5b94d4d
b5297b8
04d500c
c9e368b
de050ab
78fcd72
2014acd
5e69e5f
53e4a92
e9791b0
f7fd0f8
a4f7ab8
3aa8778
e626433
8130b63
2b54bd0
cb33b6d
f3b94eb
a4c85dc
abb6a41
f4dd0a4
a3f65b0
efd41a6
436a712
7110346
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
Signed-off-by: RutujaPathade <73137503+RutujaPathade@users.noreply.github.com>
- Loading branch information
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -584,10 +584,14 @@ def _update_metadata_fields( | |
| if hasattr(existing_proto.spec, "disabled") and hasattr(updated_fv, "enabled"): | ||
| existing_proto.spec.disabled = not getattr(updated_fv, "enabled") | ||
|
|
||
| # Lifecycle state | ||
| # Lifecycle state — skip STATE_UNSPECIFIED so that ``feast apply`` | ||
| # does not accidentally reset an AVAILABLE_ONLINE view. | ||
| if hasattr(existing_proto.meta, "state") and hasattr(updated_fv, "state"): | ||
| state_val = getattr(updated_fv, "state") | ||
| if isinstance(state_val, FeatureViewState): | ||
| if ( | ||
| isinstance(state_val, FeatureViewState) | ||
| and state_val != FeatureViewState.STATE_UNSPECIFIED | ||
| ): | ||
| existing_proto.meta.state = state_val.to_proto() | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Every feast apply resets all feature views back to CREATED, even if they were already AVAILABLE_ONLINE
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. both feast apply paths now preserve the existing state from the registry instead of overwriting it with the default STATE_UNSPECIFIED. Works across all registry backends. |
||
|
|
||
| # OnDemandFeatureView configuration | ||
|
|
||
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.
Similar to cli, can_transition_to() check can be enforced here as well
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.
Added can_transition_to() check in both materialization paths, guarded with state != STATE_UNSPECIFIED for backward compatibility.