[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.dIs this what you had in mind?
|
|
@elasticmachine merge upstream |
|
@yuliacech I addressed the default setting for index priority. Would you mind taking another look? |
yuliacech
left a comment
There was a problem hiding this comment.
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,Forcemergeservices/policiesdirHow to review
UseField__jest__/client_integration)__jest__/components)How to test
Same as #80012
Checklist