-
Notifications
You must be signed in to change notification settings - Fork 1.3k
feat: File persistence definition and implementation #4742
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
d64da1a
08b1011
9b07506
db3c5c5
74c518c
da6a84f
bce16ca
15c595b
251538d
ca09666
f1134ac
8677162
3b76db9
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
Signed-off-by: Daniele Martinoli <dmartino@redhat.com>
- Loading branch information
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -10,7 +10,7 @@ func IsLocalRegistry(featureStore *feastdevv1alpha1.FeatureStore) bool { | |
| return appliedServices != nil && appliedServices.Registry != nil && appliedServices.Registry.Local != nil | ||
| } | ||
|
|
||
| func ApplyDefaultsToStatus(cr *feastdevv1alpha1.FeatureStore) { | ||
| func ApplyDefaultsToStatus(cr *feastdevv1alpha1.FeatureStore) error { | ||
| cr.Status.FeastVersion = feastversion.FeastVersion | ||
| applied := cr.Spec.DeepCopy() | ||
| if applied.Services == nil { | ||
|
|
@@ -48,6 +48,11 @@ func ApplyDefaultsToStatus(cr *feastdevv1alpha1.FeatureStore) { | |
| } | ||
| if len(applied.Services.OfflineStore.Persistence.FilePersistence.Type) == 0 { | ||
| applied.Services.OfflineStore.Persistence.FilePersistence.Type = string(OfflineDaskConfigType) | ||
| } else { | ||
| _, err := feastdevv1alpha1.IsValidOfflineStoreFilePersistenceType(applied.Services.OfflineStore.Persistence.FilePersistence.Type) | ||
| if err != nil { | ||
| return err | ||
| } | ||
| } | ||
| } | ||
|
dmartinol marked this conversation as resolved.
|
||
| if applied.Services.OnlineStore != nil { | ||
|
|
@@ -64,6 +69,7 @@ func ApplyDefaultsToStatus(cr *feastdevv1alpha1.FeatureStore) { | |
| } | ||
|
Contributor
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. same
Contributor
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. would be good to have unit tests ensuring that proper defaults are being set in status when varying pointers around service persistence are set in the spec.
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.
This was the idea of
Contributor
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. that's a great addition, and necessary, but its different from ensuring the status defaults are properly being reconciled in the CR.
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. I see what you mean, I'll add it in the next PR for PVC so there will be more cases to cover |
||
| // overwrite status.applied with every reconcile | ||
| applied.DeepCopyInto(&cr.Status.Applied) | ||
| return nil | ||
| } | ||
|
|
||
| func setServiceDefaultConfigs(defaultConfigs *feastdevv1alpha1.DefaultConfigs) { | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.