Skip to content
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

Merged
merged 22 commits into from
Sep 17, 2020
Merged

Use Search API in TSVB #76274

merged 22 commits into from
Sep 17, 2020

Conversation

VladLasitsa
Copy link
Contributor

@VladLasitsa VladLasitsa commented Aug 31, 2020

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

@VladLasitsa VladLasitsa requested a review from alexwizp August 31, 2020 12:12
const { addSearchStrategy } = visTypeTimeseries;
registerRollupSearchStrategy(callWithRequestFactoryShim, addSearchStrategy);
Copy link
Contributor

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?

Copy link
Contributor

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

@alexwizp alexwizp requested a review from sulemanof September 1, 2020 08:57
@VladLasitsa
Copy link
Contributor Author

@elasticmachine merge upstream

src/plugins/vis_type_timeseries/server/index.ts Outdated Show resolved Hide resolved
Comment on lines -19 to -23
this.callWithRequest(SEARCH_METHOD, {
body,
index,
rest_total_hits_as_int: true,
})
Copy link
Contributor

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.

@VladLasitsa VladLasitsa marked this pull request as ready for review September 10, 2020 09:57
@VladLasitsa VladLasitsa requested a review from a team as a code owner September 10, 2020 09:57
@VladLasitsa VladLasitsa requested a review from a team September 10, 2020 09:57
@VladLasitsa VladLasitsa requested a review from a team as a code owner September 10, 2020 09:57
@VladLasitsa VladLasitsa self-assigned this Sep 10, 2020
@VladLasitsa VladLasitsa added release_note:skip Skip the PR/issue when compiling release notes Team:Visualizations Visualization editors, elastic-charts and infrastructure v7.10.0 labels Sep 10, 2020
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-app (Team:KibanaApp)

@VladLasitsa
Copy link
Contributor Author

@elasticmachine merge upstream

Copy link
Contributor

@sulemanof sulemanof left a 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.

@VladLasitsa
Copy link
Contributor Author

@elasticmachine merge upstream

Copy link
Contributor

@stratoula stratoula left a 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 👍

@VladLasitsa
Copy link
Contributor Author

@elasticmachine merge upstream

@VladLasitsa
Copy link
Contributor Author

@elasticmachine merge upstream

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Build metrics

distributable file count

id value diff baseline
default 45903 -5 45908
oss 27724 -4 27728
total -9

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

Copy link
Member

@lukeelmers lukeelmers left a 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

@jloleysens jloleysens self-requested a review September 17, 2020 14:08
Copy link
Contributor

@jloleysens jloleysens left a 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

@stratoula stratoula merged commit 75a1459 into elastic:master Sep 17, 2020
stratoula pushed a commit to stratoula/kibana that referenced this pull request Sep 17, 2020
* 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]>
stratoula added a commit that referenced this pull request Sep 18, 2020
* 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]>
jloleysens added a commit to jloleysens/kibana that referenced this pull request Sep 18, 2020
…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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release_note:skip Skip the PR/issue when compiling release notes Team:Visualizations Visualization editors, elastic-charts and infrastructure v7.10.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use Search API in TSVB
8 participants