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

[TSVB] use new Search API for rollup search #83275

Merged
merged 14 commits into from
Nov 18, 2020
Merged

Conversation

alexwizp
Copy link
Contributor

@alexwizp alexwizp commented Nov 12, 2020

Closes: #82710

Summary

Historically, the code related to the rollup search in TSVB was added to the x-pack/rollup plugin. And now the rollup plugin has a folder specific only to TSVB (see x-pack/plugins/rollup/server/lib/search_strategies)
IMO, this is a design issue because usually a TSVB plugin should depend on a Rollup plugin, but not vice versa.

On the other hand, in #76274, we started using a new Search API that natively supports search by rollup data.

I think we should:

  • check which logic we still need from x-pack/plugins/rollup/server/lib/search_strategies and which can be reused from the data plugin
  • create a new vis_type_timeseries_enhanced plugin and move into it related code
  • use new Search API for searching by Rollup data
  • related code was migrated js -> ts

During testing the following issues was found on master branch: #83414. It's not related to that changes

Checklist

Delete any items that are not applicable to this PR.

For maintainers

@alexwizp alexwizp changed the title [TSVB] use new Search API for rollup search [WIP][TSVB] use new Search API for rollup search Nov 12, 2020
@alexwizp
Copy link
Contributor Author

@elasticmachine merge upstream

@alexwizp alexwizp force-pushed the 82710 branch 3 times, most recently from 41ea328 to 1eff1c8 Compare November 12, 2020 16:46
@elastic elastic deleted a comment from kibanamachine Nov 12, 2020
@alexwizp
Copy link
Contributor Author

@elasticmachine merge upstream

@alexwizp
Copy link
Contributor Author

@elasticmachine merge upstream

@alexwizp alexwizp changed the title [WIP][TSVB] use new Search API for rollup search [TSVB] use new Search API for rollup search Nov 16, 2020
@alexwizp alexwizp requested a review from stratoula November 16, 2020 12:11
@alexwizp alexwizp self-assigned this Nov 16, 2020
@alexwizp alexwizp added v7.11.0 v8.0.0 Team:Visualizations Visualization editors, elastic-charts and infrastructure Feature:TSVB TSVB (Time Series Visual Builder) labels Nov 16, 2020
@alexwizp alexwizp requested a review from cjcenizal November 16, 2020 12:14
@alexwizp alexwizp marked this pull request as ready for review November 16, 2020 12:14
@alexwizp alexwizp requested a review from a team as a code owner November 16, 2020 12:14
@alexwizp alexwizp requested a review from a team November 16, 2020 12:14
@elasticmachine
Copy link
Contributor

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

@alexwizp alexwizp added release_note:enhancement technical debt Improvement of the software architecture and operational architecture labels Nov 16, 2020
@flash1293
Copy link
Contributor

Didn't dig into it, but it seems like something doesn't work right in the table vis:
Screenshot 2020-11-16 at 15 06 09

@alexwizp
Copy link
Contributor Author

alexwizp commented Nov 16, 2020

@flash1293 no sure that this issues somehow related to my changes. I see that for some cases ES return object instead of numeric values and I'm 99.9% sure that on master branch we have the same behavior.
The main difference with master I removed rest_total_hits_as_int param. I think it should be added in data plugin. But this flag is not related to that problem. I've checked that.

some proofs:
image

@flash1293
Copy link
Contributor

Tested and it works on master:
Screenshot 2020-11-16 at 15 38 10

If this is caused by something within the data plugin, let's open a separate issue and fix it first there, then come back to this change.

@alexwizp
Copy link
Contributor Author

Previous issue was discussed offline with @flash1293. In master we have the same issue which is not related to that changes.
New issues was created to address that problem: #83436

Copy link
Contributor

@cjcenizal cjcenizal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👏 👏 So happy to see this tech debt being addressed! I remember being very confused earlier this year about where the rollup search strategy was being consumed. The indirection made it a challenge to track down. This makes things much clearer.

I only reviewed the removed code in rollup, which all LGTM. Didn't test locally.

@stratoula
Copy link
Contributor

@alexwizp can you also add the kibana-app team as codeowners of the new plugin?

@alexwizp
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.

LGTM, thank you @alexwizp I really like this PR 😄

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Distributable file count

id before after diff
default 42849 42850 +1

History

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

@alexwizp alexwizp merged commit 7114db3 into elastic:master Nov 18, 2020
alexwizp added a commit to alexwizp/kibana that referenced this pull request Nov 18, 2020
* [TSVB] use new Search API for rollup search

Closes: elastic#82710

* remove unused code

* rollup_search_strategy.test.js -> rollup_search_strategy.test.ts

* default_search_capabilities.test.js -> default_search_capabilities.test.ts

* remove getRollupService

* fix CI

* fix some types

* update types

* update codeowners

* fix PR comments

Co-authored-by: Kibana Machine <[email protected]>
# Conflicts:
#	.github/CODEOWNERS
#	x-pack/plugins/vis_type_timeseries_enhanced/server/search_strategies/rollup_search_capabilities.test.ts
phillipb added a commit to phillipb/kibana that referenced this pull request Nov 18, 2020
…o-node-details

* 'master' of github.com:elastic/kibana: (65 commits)
  update chromedriver dependency to 87 (elastic#83624)
  [TSVB] use new Search API for rollup search (elastic#83275)
  [TSVB] Y-axis has number formatting not considering all series formatters in the group (elastic#83438)
  [Logs UI] Update <LogStream /> internal state when its props change (elastic#83302)
  Add tag bulk action context menu (elastic#82816)
  [code coverage] adding plugin to flush coverage data (elastic#83447)
  [UsageCollection] Expose `KibanaRequest` to explicitly opted-in collectors (elastic#83413)
  Added eventBus to trigger and listen plotHandler event (elastic#83435)
  [Runtime fields] Editor phase 1 (elastic#81472)
  [Maps] Fix threshold alert issue resolving nested fields (elastic#83577)
  chore(NA): remove usage of unverified es snapshots (elastic#83589)
  [DOCS] Adds Elastic Contributor Program link (elastic#83561)
  Upgrade EUI to v30.2.0 (elastic#82730)
  Don't show loading screen during auto-reload (elastic#83376)
  Functional tests - fix esArchive mappings with runtime fields (elastic#83530)
  [deb/rpm] Create keystore after installation (elastic#76465)
  [rpm] Create default environment file at "/etc/sysconfig/kibana" (elastic#82144)
  [docker] removes workaround for missing crypto-policies-scripts subpackage (elastic#83455)
  [ML] Persisted URL state for the Data frame analytics jobs and models pages (elastic#83439)
  adds xpack.security.authc.selector.enabled setting (elastic#83551)
  ...
alexwizp added a commit that referenced this pull request Nov 18, 2020
* [TSVB] use new Search API for rollup search

Closes: #82710

* remove unused code

* rollup_search_strategy.test.js -> rollup_search_strategy.test.ts

* default_search_capabilities.test.js -> default_search_capabilities.test.ts

* remove getRollupService

* fix CI

* fix some types

* update types

* update codeowners

* fix PR comments

Co-authored-by: Kibana Machine <[email protected]>
# Conflicts:
#	.github/CODEOWNERS
#	x-pack/plugins/vis_type_timeseries_enhanced/server/search_strategies/rollup_search_capabilities.test.ts
@alexwizp alexwizp deleted the 82710 branch January 16, 2021 15:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Rollups Feature:TSVB TSVB (Time Series Visual Builder) release_note:enhancement Team:Visualizations Visualization editors, elastic-charts and infrastructure technical debt Improvement of the software architecture and operational architecture v7.11.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[TSVB] use new Search API for rollup search
6 participants