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

Add enable_fields_emulation flag to search requests #123267

Merged
merged 18 commits into from
Feb 4, 2022

Conversation

lukasolson
Copy link
Member

Summary

Related: elastic/elasticsearch#82539, elastic/elasticsearch#82485

Replaces #123010.

Adds the enable_fields_emulation flag to search requests so that fields show up in scenarios where CCS is in use with a cluster that doesn't support the new fields option in ES.

Checklist

Delete any items that are not applicable to this PR.

Risk Matrix

Delete this section if it is not applicable to this PR.

Before closing this PR, invite QA, stakeholders, and other developers to identify risks that should be tested prior to the change/feature release.

When forming the risk matrix, consider some of the following examples and how they may potentially impact the change:

Risk Probability Severity Mitigation/Notes
Multiple Spaces—unexpected behavior in non-default Kibana Space. Low High Integration tests will verify that all features are still supported in non-default Kibana Space and when user switches between spaces.
Multiple nodes—Elasticsearch polling might have race conditions when multiple Kibana nodes are polling for the same tasks. High Low Tasks are idempotent, so executing them multiple times will not result in logical error, but will degrade performance. To test for this case we add plenty of unit tests around this logic and document manual testing procedure.
Code should gracefully handle cases when feature X or plugin Y are disabled. Medium High Unit tests will verify that any feature flag or plugin combination still results in our service operational.
See more potential risk examples

For maintainers

Release note

Fixes cross-cluster-search when using the fields search request parameter for versions of Elasticsearch prior to 7.0.

@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-app-services (Team:AppServicesSv)

@lukasolson
Copy link
Member Author

@elasticmachine merge upstream

@Dosant
Copy link
Contributor

Dosant commented Jan 19, 2022

@elasticmachine merge upstream

@lukasolson
Copy link
Member Author

@elasticmachine merge upstream

@lukasolson lukasolson requested review from a team January 25, 2022 00:34
@@ -32,6 +32,7 @@ export async function getIgnoreThrottled(
export async function getDefaultAsyncSubmitParams(
uiSettingsClient: Pick<IUiSettingsClient, 'get'>,
searchSessionsConfig: SearchSessionsConfigSchema | null,
params: any,
Copy link
Member

Choose a reason for hiding this comment

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

no any please :)

@@ -44,7 +45,9 @@ export async function getDefaultAsyncSubmitParams(
| 'ignore_unavailable'
| 'track_total_hits'
| 'keep_on_completion'
>
> & {
enable_fields_emulation: boolean;
Copy link
Member

Choose a reason for hiding this comment

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

shouldn't we do the same for es search strategy ?
what about rollups ?

Copy link
Member Author

Choose a reason for hiding this comment

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

I've updated the PR to support our default search strategy which is used by other strategies

Copy link
Contributor

@nreese nreese left a comment

Choose a reason for hiding this comment

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

maps changes LGTM
code review

@lukasolson lukasolson added v7.17.1 and removed v7.17.0 labels Feb 1, 2022
@lukasolson lukasolson requested a review from ppisljar February 2, 2022 15:44
Copy link
Member

@ppisljar ppisljar left a comment

Choose a reason for hiding this comment

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

LGTM

@lukasolson
Copy link
Member Author

@elasticmachine merge upstream

@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
data 455.1KB 455.1KB +47.0B
Unknown metric groups

References to deprecated APIs

id before after diff
data 463 465 +2

History

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

cc @lukasolson

@lukasolson lukasolson merged commit 1099790 into elastic:7.17 Feb 4, 2022
banderror added a commit that referenced this pull request Feb 10, 2022
**Fixes:** #125059

## Summary

Fixes a bug in the EQL search strategy presumably introduced in #123267.

## Screenshots

**Before** (request to EQL search strategy is failing, and the rule creation form can't perform validation)

![](https://puu.sh/II2fT/0ffde0f0d6.png)

**After** (request to EQL search strategy is returning results, and the rule creation form can properly validate the query)

![](https://puu.sh/II2gJ/060ff92e77.png)

![](https://puu.sh/II2ex/d7fbb31517.png)

![](https://puu.sh/II2f2/09cc4483a3.png)

## Notes on testing

Create a test index and write a few documents to it:

```
PUT /test-eql
{
  "mappings": {
    "properties": {
      "@timestamp": {
        "type": "date"
      },
      "process": {
        "type": "object",
        "properties": {
          "name": {
            "type": "keyword"
          }
        }
      }
    }
  }  
}

POST /test-eql/_doc
{
  "@timestamp": "2022-02-05T10:00:08Z",
  "process": {
    "name": "mdworker"
  }
}
```
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:fix v7.17.1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants