typescript indexPatterns service#39247
Conversation
|
Pinging @elastic/kibana-app-arch |
💔 Build Failed |
6056a39 to
6a003f3
Compare
💔 Build Failed |
6a003f3 to
a64988c
Compare
💔 Build Failed |
a64988c to
4db7f3d
Compare
💔 Build Failed |
4db7f3d to
9cab8f2
Compare
💔 Build Failed |
lukeelmers
left a comment
There was a problem hiding this comment.
Still reviewing, but I pushed a couple updates to fix some of the issues, including that one with formatHits. Still seeing weirdness in the jest tests, related to mocking the TS files. Didn't have time to do a thorough investigation on that yet.
There was a problem hiding this comment.
hit can be made slightly more restrictive here with Record<string, any>, so I'll update this too.
There was a problem hiding this comment.
It's because these should really be in the IndexedArray interface. I'll update this.
💔 Build Failed |
💔 Build Failed |
💔 Build Failed |
💔 Build Failed |
💔 Build Failed |
💔 Build Failed |
💔 Build Failed |
💔 Build Failed |
💔 Build Failed |
💔 Build Failed |
💔 Build Failed |
💔 Build Failed |
7b18cc2 to
d7d39e3
Compare
💚 Build Succeeded |
lizozom
left a comment
There was a problem hiding this comment.
Still lots of work ahead of us, but looks good.
I would put a list of open, unaddressed issues \ questions in the issue's description.
Otherwise, LGTM.
jasonrhodes
left a comment
There was a problem hiding this comment.
LG(E)TM will revert my change in a follow up PR but this isn't broken so we're all good from my perspective for now
# Conflicts: # x-pack/legacy/plugins/ml/public/data_frame/pages/data_frame_new_pivot/components/source_index_preview/use_source_index_data.ts
💚 Build Succeeded |
💔 Build Failed |
peteharverson
left a comment
There was a problem hiding this comment.
ML edits LGTM.
One quick question - does the type field in the StaticIndexPattern indicate if the index patten is a rollup type? We need this for the new ML job wizards.
|
retest |
💚 Build Succeeded |
💚 Build Succeeded |
@peteharverson Exactly, for rollups you should be able to check |
|
@peteharverson This also may be useful for reference: |
Summary
closes #39087 be removing
configfrom this.Typescript for index patterns service
Some minor changes to API were done:
cacheis no longer exposed onindexPatterns, rather there isclearCache()methoddeletemethod no longer exists onindexPatterns, rather there you should callindexPattern.destroy()Follow-up items to investigate:
src/legacy/ui/public/index_patterns/_field.tscreate_index_pattern_wizard/components/step_time_field/__jest__/__snapshots__/step_time_field.test.js.snapwere changed toisLoading=false. this feels like the correct behavior but need to confirm it isn't a problem.src/legacy/ui/public/index_patterns/index_patterns.ts, specifically if savedObject.find encounters an errorChecklist
Use
strikethroughsto remove checklist items you don't feel are applicable to this PR.[ ] Documentation was added for features that require explanation or tutorials[ ] This was checked for keyboard-only and screenreader accessibilityFor maintainers
[ ] This includes a feature addition or change that requires a release note and was labeled appropriatelyDev Docs
Minor changes to Index Patterns API
During our efforts to rewrite the index patterns service in TypeScript, we made a few minor changes to the API:
IndexPatterns.cachehas been deprecated in favor of the newIndexPatterns.clearCachemethod.IndexPatterns.deletehas been deprecated. Instead, use theIndexPattern.destroymethod on the specific index pattern you which to remove.