-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[ILM] Migrate Cold phase to Form Lib #81754
[ILM] Migrate Cold phase to Form Lib #81754
Conversation
Pinging @elastic/es-ui (Team:Elasticsearch UI) |
Hi @jloleysens , great work on converting edit policy to form lib! Tested locally and all seems to work, just a couple of questions to confirm/discuss:
|
Hey @yuliacech ! Thanks for the review!
interface MyInterface {
a: {
b: {
c: {
d: string;
}
}
}
}
class PathBuilder<T> {
constructor(protected parent?: PathBuilder<any>) {}
property: keyof T;
next(property: keyof T) {
this.property = property;
return new PathBuilder<T[typeof property]>(this);
}
private getPath() {
const path: string[] = [];
let parent: PathBuilder<any> = this.parent;
while (parent !== undefined && parent.property) {
path.push(String(parent.property))
parent = parent.parent;
}
return path.reverse();
}
toString() {
return this.getPath().join('.')
}
}
const p = new PathBuilder<MyInterface>();
console.log(p.next('a').next('b').next('c').next('d').toString());
// a.b.c.d Is this what you had in mind?
|
@elasticmachine merge upstream |
@yuliacech I addressed the default setting for index priority. Would you mind taking another look? |
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.
Hi @jloleysens , thanks a lot for addressing my questions! Really interesting suggestion for PathBuilder
, maybe we could add something like this to a shared lib. As discussed, index priority was not consistent before, having 2 different default values depending on the policy being saved or not. Agree, that this PR would fix the consistency of default values in phases.
💚 Build SucceededMetrics [docs]@kbn/optimizer bundle module count
async chunks size
distributable file count
page load bundle size
History
To update your PR or re-run it, just comment with: |
Not blocking on review from elastic/kibana-design@ because this PR removes an SCSS file that was duplicated from a pre-existing file which was previously reviewed #76126 |
* use form lib fields and start updating deserializer * delete legacy data tier allocation field * finished deserialization * delete legacy serialization, validation and deserialization * fix type issue and remove propertyOf for now * fix legacy tests and create another number validator * added serialization test coverage * fix elastic#81697 * clean up remaining legacy tests and slight update to existing test * remove legacy unused components * fix copy to be clearer for more scenarios * remove remaining coldphase interface use and clean up unused i18n * update default index priority for cold phase * updated cold phase index priority to 0 Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* use form lib fields and start updating deserializer * delete legacy data tier allocation field * finished deserialization * delete legacy serialization, validation and deserialization * fix type issue and remove propertyOf for now * fix legacy tests and create another number validator * added serialization test coverage * fix #81697 * clean up remaining legacy tests and slight update to existing test * remove legacy unused components * fix copy to be clearer for more scenarios * remove remaining coldphase interface use and clean up unused i18n * update default index priority for cold phase * updated cold phase index priority to 0 Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Summary
Migrated the warm phase to use the form lib. Continuation of #80012
DataTierAllocation
,SetInputPriority
,Forcemerge
services/policies
dirHow to review
UseField
__jest__/client_integration
)__jest__/components
)How to test
Same as #80012
Checklist