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

Clear out old rollup strategy #59423

Merged

Conversation

lizozom
Copy link
Contributor

@lizozom lizozom commented Mar 5, 2020

Summary

Depends on #59224

  • Don't reguster Rollup strategy into the data strategy registry
  • Always use defaultSearchStrategy in callClient
  • Pass down the indexType to the server side
  • Return an error if an OSS setup tries to search a rollup index pattern
  • Clear out some types

Checklist

Delete any items that are not applicable to this PR.

For maintainers

@lizozom lizozom self-assigned this Mar 5, 2020
@lizozom
Copy link
Contributor Author

lizozom commented Mar 5, 2020

@elasticmachine merge upstream

@elasticmachine
Copy link
Contributor

merge conflict between base and head

@lizozom lizozom force-pushed the newplatform/search/clear-out-old-rollup-strategy branch from 19b0f52 to 820a256 Compare March 6, 2020 18:09
@lizozom lizozom marked this pull request as ready for review March 8, 2020 13:16
@lizozom lizozom requested a review from a team March 8, 2020 13:16
@lizozom lizozom requested a review from a team as a code owner March 8, 2020 13:16
@lizozom lizozom requested review from lukasolson and kertal March 8, 2020 13:16
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-app-arch (Team:AppArch)

@lizozom lizozom requested a review from a team as a code owner March 9, 2020 12:28
Copy link
Contributor

@alvarezmelissa87 alvarezmelissa87 left a comment

Choose a reason for hiding this comment

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

ML bit LGTM 👍

Copy link
Member

@lukasolson lukasolson left a comment

Choose a reason for hiding this comment

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

Tested and things seem to be functioning well.

A couple of things we should probably note: The original rollup search strategy only sent the aggs/query/index/size from searchRequest, not everything else (like stored_fields, script_fields, docvalue_fields). We should probably do something similar:

Other than that, left a couple of comments below.

src/plugins/data/public/search/fetch/call_client.test.ts Outdated Show resolved Hide resolved
@@ -348,9 +344,7 @@ export {
SavedQuery,
SavedQueryService,
SavedQueryTimeFilter,
SavedQueryAttributes,
Copy link
Member

Choose a reason for hiding this comment

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

I'm not sure why changes to SavedQueryAttributes and TimefilterSetup are included in this PR... Could you explain?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Cleaning up while working.
Not related, but didn't feel like dropping those either.

Copy link
Member

@kertal kertal left a comment

Choose a reason for hiding this comment

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

Nice that rollups are supported now, but there's one thing to discuss, concerning Discover. the rollup @timestamp works in a different way, it's not a single value. Therefore it would need adaptions, because currently the "Time" column is empty when a rollup pattern is used. also sorting and time filter don't work

Bildschirmfoto 2020-03-11 um 09 20 36

So I think it's better to keep the warning that the index pattern is not supported, and to open an issue "Support rollup index patterns" in discover

@lizozom
Copy link
Contributor Author

lizozom commented Mar 11, 2020

@lukasolson I addressed most of your feedback.
However, as FE is now unaware of whether a rollup \ regular strategy is about to be used, why not let the server pick the arguments it wants?

Copy link
Member

@kertal kertal 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, wasn't aware that the handling of rollup data in Discover is no regression, but a thing that should be improved in the future.

@lizozom
Copy link
Contributor Author

lizozom commented Mar 11, 2020

@elasticmachine merge upstream

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

History

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

Copy link
Member

@lukasolson lukasolson left a comment

Choose a reason for hiding this comment

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

LGTM!

@lizozom lizozom merged commit 6645531 into elastic:master Mar 11, 2020
lizozom pushed a commit to lizozom/kibana that referenced this pull request Mar 11, 2020
* Old search strategy cleanup

* restore rollup strategy

* Remove hasSearchStategyForIndexPattern

* ts

* fix jest tests

* cleanup exports

* pass index pattern type to server for rollups

* merge fix

* Fix types

* ts fixes

* oss strategy error handling

* update translations

* jest test fix

* Use indexType instead of index

* code review 1

* updated docs

* jest test

* jest snapshot

Co-authored-by: Elastic Machine <[email protected]>
lizozom pushed a commit that referenced this pull request Mar 12, 2020
* Old search strategy cleanup

* restore rollup strategy

* Remove hasSearchStategyForIndexPattern

* ts

* fix jest tests

* cleanup exports

* pass index pattern type to server for rollups

* merge fix

* Fix types

* ts fixes

* oss strategy error handling

* update translations

* jest test fix

* Use indexType instead of index

* code review 1

* updated docs

* jest test

* jest snapshot

Co-authored-by: Elastic Machine <[email protected]>

Co-authored-by: Elastic Machine <[email protected]>
@lukasolson lukasolson added the Feature:Search Querying infrastructure in Kibana label Mar 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:New Platform Feature:Search Querying infrastructure in Kibana release_note:skip Skip the PR/issue when compiling release notes v7.7.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants