-
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
Use Search API in TSVB #76274
Use Search API in TSVB #76274
Conversation
const { addSearchStrategy } = visTypeTimeseries; | ||
registerRollupSearchStrategy(callWithRequestFactoryShim, addSearchStrategy); |
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.
I think we should remove all code related to TSVB from the x-pack/plugins/rollup
and move all into vis_type_timeseries_enhanced
. @stratoula @timroes Any ideas?
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.
It sounds good to me
@elasticmachine merge upstream |
...gins/vis_type_timeseries/server/lib/search_strategies/strategies/abstract_search_strategy.ts
Outdated
Show resolved
Hide resolved
this.callWithRequest(SEARCH_METHOD, { | ||
body, | ||
index, | ||
rest_total_hits_as_int: true, | ||
}) |
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.
Since this endpoint was replaced with the elasticsearch.client.transport.request
in x-pack/plugins/data_enhanced/server/search/es_search_strategy.ts
, the TSVB Table visualization fails to load. The reason is the next elasticsearch error logged:
[error][data][elasticsearch] [illegal_argument_exception]: Unable to translate aggregation tree into Rollup. Aggregation [pivot] is of type [FilterAggregationBuilder] which is currently unsupported.
It seems, we currently can't use the transport request in tsvb rollup indexes (at least for table aggs).
My suggestion is to implement own search
method for rollup_search_strategy.ts
and use elasticsearch.client.asCurrentUser.rollup.rollupSearch
instead.
Pinging @elastic/kibana-app (Team:KibanaApp) |
@elasticmachine merge upstream |
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.
Overall LGTM.
Checked locally, didn't notice any regressions.
Left few minor comments.
Could you please update the PR description?
There is lack of info about left legacy search api in rollup and the reason of it.
...gins/vis_type_timeseries/server/lib/search_strategies/strategies/abstract_search_strategy.ts
Outdated
Show resolved
Hide resolved
src/plugins/vis_type_timeseries/server/lib/vis_data/get_table_data.js
Outdated
Show resolved
Hide resolved
@elasticmachine merge upstream |
src/plugins/vis_type_timeseries/server/lib/vis_data/get_table_data.js
Outdated
Show resolved
Hide resolved
x-pack/plugins/rollup/server/lib/search_strategies/rollup_search_strategy.ts
Outdated
Show resolved
Hide resolved
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.
Code LGTM, tested it on safari, works fine 👍
@elasticmachine merge upstream |
@elasticmachine merge upstream |
💚 Build SucceededBuild metricsdistributable file count
History
To update your PR or re-run it, just comment with: |
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.
App arch changes LGTM
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.
ES UI changes look good to me, tested rollup plugin locally
* Use Search API for TSVB * Fixed ci * Fixed ci * Use constants * Fixed tests * Fixed ci * Fixed ci * Back old rollup search * Fixed test * Fixed tests * Fixed issue with series data * Fixed comments * Fixed comments * Fixed unit test * Deleted unused import * Fixed comments Co-authored-by: Elastic Machine <[email protected]>
* Use Search API for TSVB * Fixed ci * Fixed ci * Use constants * Fixed tests * Fixed ci * Fixed ci * Back old rollup search * Fixed test * Fixed tests * Fixed issue with series data * Fixed comments * Fixed comments * Fixed unit test * Deleted unused import * Fixed comments Co-authored-by: Elastic Machine <[email protected]> Co-authored-by: Uladzislau Lasitsa <[email protected]> Co-authored-by: Elastic Machine <[email protected]>
…rok/new-patterns-component-use-array * 'master' of github.com:elastic/kibana: (140 commits) Add telemetry as an automatic privilege grant (elastic#77390) [Security Solutions][Cases] Cases Redesign (elastic#73247) Use Search API in TSVB (elastic#76274) [Mappings editor] Add support for constant_keyword field type (elastic#76564) [ML] Adds ML modules for Metrics UI Integration (elastic#76460) [Drilldowns] {{event.points}} in URL drilldown for VALUE_CLICK_TRIGGER (elastic#76771) Migrate status & stats APIs to KP + remove legacy status lib (elastic#76054) use App updater API instead of deprecated chrome.navLinks.update (elastic#77708) [CSM Dashboard] Remove points from line chart (elastic#77617) [APM] Trace timeline: Replace multi-fold function icons with new EuiIcon glyphs (elastic#77470) [Observability] Overview: Alerts section style improvements (elastic#77670) Bump the Node.js version used by Docker in CI (elastic#77714) Upgrade all minimist (sub)dependencies to version ^1.2.5 (elastic#60284) Remove unneeded forced package resolutions (elastic#77467) [ML] Add metrics app to check made for internal custom URLs (elastic#77627) Functional tests - add supertest for test_user (elastic#77584) [ML] Adding option to create AD jobs without starting the datafeed (elastic#77484) Bump node-fetch to 2.6.1 (elastic#77445) Bump sharkdown from v0.1.0 to v0.1.1 (elastic#77607) [APM]fixing y axis on transaction error rate to 100% (elastic#77609) ... # Conflicts: # x-pack/plugins/ingest_pipelines/public/application/components/pipeline_processors_editor/components/manage_processor_form/manage_processor_form.container.tsx # x-pack/plugins/ingest_pipelines/public/application/components/pipeline_processors_editor/components/manage_processor_form/manage_processor_form.tsx # x-pack/plugins/ingest_pipelines/public/application/components/pipeline_processors_editor/components/processor_form/field_components/drag_and_drop_text_list.scss # x-pack/plugins/ingest_pipelines/public/application/components/pipeline_processors_editor/components/processor_form/field_components/drag_and_drop_text_list.tsx # x-pack/plugins/ingest_pipelines/public/application/components/pipeline_processors_editor/components/processor_form/field_components/text_editor.scss # x-pack/plugins/ingest_pipelines/public/application/components/pipeline_processors_editor/components/processor_form/processors/grok.test.tsx
Closes #67587
Summary
Use Search API in TSVB.
Important note!
For rollup indexes was leavt old search API because new Search AP uses the elasticsearch.client.transport.request. Using thi endpont the TSVB Table visualization fails to load. The reason is the next elasticsearch error logged:
[error][data][elasticsearch] [illegal_argument_exception]: Unable to translate aggregation tree into Rollup. Aggregation [pivot] is of type [FilterAggregationBuilder] which is currently unsupported.
It seems, we currently can't use the transport request in tsvb rollup indexes (at least for table aggs).
Checklist
Delete any items that are not applicable to this PR.
For maintainers