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

Don't overwrite sync strategy in xpack #75556

Merged
merged 7 commits into from
Aug 25, 2020

Conversation

lizozom
Copy link
Contributor

@lizozom lizozom commented Aug 20, 2020

Summary

Previously, in x-pack, we had overriden the synchronous search strategy with an async one.
This PR keeps both strategies, changing the default only, to allow solutions to use the synchronous strategy in OSS, if needed.

Needed for #75115

Checklist

Delete any items that are not applicable to this PR.

For maintainers

@lizozom lizozom added Feature:Search Querying infrastructure in Kibana v8.0.0 Team:AppArch release_note:skip Skip the PR/issue when compiling release notes v7.10.0 labels Aug 20, 2020
@lizozom lizozom requested a review from a team as a code owner August 20, 2020 13:31
@lizozom lizozom self-assigned this Aug 20, 2020
@elasticmachine
Copy link
Contributor

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

@lizozom lizozom changed the title Don't override sync strategy in xpack Don't overwrite sync strategy in xpack Aug 20, 2020
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.

I understand the impetus behind this PR but I worry that in the current implementation, setDefaultSearchStrategy will seem like something plugins will want to use, when in fact I think it would make more sense to have it under the enhancements pattern because it really is internal to the data plugin. (Imagine if another plugin set the default search strategy to a custom strategy... then it would break all of our dashboards, etc.). Thoughts?

@@ -6,6 +6,8 @@

import { IEsSearchRequest, ISearchRequestParams } from '../../../../../src/plugins/data/common';

export const ENHANCED_ES_SEARCH_STRATEGY = 'ese';
Copy link
Member

Choose a reason for hiding this comment

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

Can we give this a more meaningful name like enhanced_es or something?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I wanted to keep it shorter, as this is what gets sent in the URL.
I think keeping it short is clearer, and we use the constant name elsewhere anyway.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

And I did change it to use the enhance pattern. I agree it makes more sense this way.

@lizozom
Copy link
Contributor Author

lizozom commented Aug 23, 2020

@elasticmachine merge upstream

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Build metrics

@kbn/optimizer bundle module count

id value diff baseline
dataEnhanced 21 +3 18

page load bundle size

id value diff baseline
data 1.4MB -239.0B 1.4MB
dataEnhanced 178.1KB +43.0B 178.1KB
total -196.0B

History

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

@lizozom lizozom merged commit 6718f54 into elastic:master Aug 25, 2020
lizozom added a commit to lizozom/kibana that referenced this pull request Aug 25, 2020
* Don't override sync strategy in XPACK

* search name

* docs

* mock

* Use enhancement pattern

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
lizozom added a commit that referenced this pull request Aug 25, 2020
* Don't override sync strategy in XPACK

* search name

* docs

* mock

* Use enhancement pattern

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
parkiino pushed a commit to parkiino/kibana that referenced this pull request Sep 1, 2020
* Don't override sync strategy in XPACK

* search name

* docs

* mock

* Use enhancement pattern

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Search Querying infrastructure in Kibana release_note:skip Skip the PR/issue when compiling release notes v7.10.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants