[Vis Default editor] Fix issue with Rollup#42430
[Vis Default editor] Fix issue with Rollup#42430maryia-lapata merged 10 commits intoelastic:masterfrom
Conversation
💚 Build Succeeded |
💚 Build Succeeded |
|
After some debugging I found out that the root cause is deeper. This undefined field causes throwing an error. A default value for field params as well as for other params were not set, which in turn produces the error during getting agg description via Since Rollup index pattern has composite @jen-huang if you know could you please explain how |
💚 Build Succeeded |
|
@maryia-lapata Rollup documents are special in that they are not "real" documents, the field that you are seeing ( I am seeing an issue when it comes to creating rollup index pattern: The fields here should already be |
|
This is the culprit for the rollup index pattern: @ppisljar Do you recall why this line was changed from @maryia-lapata I tested replacing that line with: indexPattern.fieldsFetcher.fetchForWildcard(pattern, getFetchForWildcardOptions())and the time field is now displaying correctly in visualizations and displaying results: Could you try adding that change to this fix and see if that unblocks you? |
|
@jen-huang thank you so much! I added the fix for @ppisljar @timroes @jen-huang I'd very appreciate it if you review these changes. |
This comment has been minimized.
This comment has been minimized.
|
Pinging @elastic/kibana-app |
src/legacy/ui/public/vis/editors/default/components/agg_params.tsx
Outdated
Show resolved
Hide resolved
|
i think this was changed by mistake from fetchForWildcard to fetch, while updating the method (before it existed on index pattern service and now its on index pattern and index pattern does not need to be passed in) |
💚 Build Succeeded |
timroes
left a comment
There was a problem hiding this comment.
Tested on Chrome Linux. Seems to fix all described issues and Code LGTM
jen-huang
left a comment
There was a problem hiding this comment.
Tested locally with a rollup pattern with a time field, and one without a time field selected. LGTM!
* Fix issue with Rollup * Use useMemo for editorConfig * Wrap makeLabel with try catch * Revert fetch to fetchForWildcard * Update useEffect dependencies
…p-metrics-selectall * 'master' of github.com:elastic/kibana: (27 commits) [ML] Data Frames: Analytics job creation. (elastic#43102) [Vis Default editor] Fix issue with Rollup (elastic#42430) [Vis: Default editor] EUIficate Markdown tab (elastic#42677) [New Platform Migration Phase I]: update dateHisogramInterval & parseEsInterval imports (elastic#42917) [Infra UI] Add AWS metrics to node detail page (elastic#42153) update apm index pattern (elastic#43106) [SIEM] Toggle Column / Code Coverage and Cypress (elastic#42766) skip failing test (elastic#43163) [code] Add option to turn the go dependency download on/off. (elastic#43096) disable visual regression jobs Removed dead code (elastic#42774) fixes csv export of saved searches that have _source field (elastic#43123) Export missing Context types (elastic#43051) Update dependency supports-color to v7 (elastic#43064) switch to icon type string instead of node (elastic#43111) [Maps] Enable borders for icon symbols (elastic#43066) [ftr] enable visualRegression jobs (elastic#42989) [ML] Converting single to multi metric job (elastic#42532) fix(NA): dont clean dll module if it is a package json file (elastic#42904) [Logs UI] Add link from the sample web logs to the Logs UI (elastic#42635) ...



Summary
Date Histogramagg is selected, the code is broken andBucketsgroup disappeared:1m(default value from Editor Config of Rollup), but it's set inauto(due to the hook is launched before editorConfig is changed)What was done:
Reverted
fieldsFetcher.fetchtofieldsFetcher.fetchForWildcardfor displaying correctTime Filter field nameduring Rollup Index Pattern creation (instead oftimestamp.date_histogram.timestamp):Added a condition for the effect which sets default params from editor config (it resolves
2).When
getIntervalis invoked withundefinedvalue (e.g. when a user cleans the interval field), for Rollup Index Pattern esInterval is calculated based on original value (undefined) rather than default value (auto) as for simple Index pattern. It causes an exeption in parseEsInterval. That's why nowmakeLabelis called safety.With the changes:
Checklist
Use
strikethroughsto remove checklist items you don't feel are applicable to this PR.For maintainers