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

[Discover] Fix Field Statistics when discover:searchFieldsFromSource is enabled #187250

Merged
merged 8 commits into from
Jul 11, 2024

Conversation

jughosta
Copy link
Contributor

@jughosta jughosta commented Jul 1, 2024

Summary

This PR excludes _source when processing current columns in UI

  • For Field Statistics table
  • For ES|QL fields callout

Checklist

@jughosta jughosta added release_note:skip Skip the PR/issue when compiling release notes Team:DataDiscovery Discover App Team (Document Explorer, Saved Search, Surrounding documents, Data, DataViews) backport:prev-minor Backport to (8.x) the previous minor version (i.e. one version back from main) labels Jul 1, 2024
@jughosta jughosta self-assigned this Jul 1, 2024
@jughosta
Copy link
Contributor Author

jughosta commented Jul 1, 2024

/ci

@kibana-ci
Copy link
Collaborator

💛 Build succeeded, but was flaky

Failed CI Steps

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
discover 809.1KB 809.2KB +54.0B

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

cc @jughosta

@jughosta jughosta marked this pull request as ready for review July 1, 2024 16:27
@jughosta jughosta requested a review from a team as a code owner July 1, 2024 16:27
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-data-discovery (Team:DataDiscovery)

jughosta added a commit that referenced this pull request Jul 5, 2024
…nt (#187265)

## Summary

Noticed in #187250 that
`availableFields$` is not being used any more by Field Statistics
embeddable. ML refactored their code in
#181502

We can now drop `availableFields$` since is not being read by any other
parts.
@kertal kertal requested a review from lukasolson July 9, 2024 11:04
Copy link
Contributor

@davismcphee davismcphee left a comment

Choose a reason for hiding this comment

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

Changes look good and work well, thanks! 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.

Works great! LGTM

@@ -277,7 +277,7 @@ function DiscoverDocumentsComponent({
<>
<SelectedVSAvailableCallout
esqlQueryColumns={documents?.esqlQueryColumns}
selectedColumns={currentColumns}
selectedColumns={currentColumns.filter((col) => col !== '_source')}
Copy link
Member

Choose a reason for hiding this comment

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

Would you mind adding a comment here explaining why we're filtering out _source (similar to the one above)?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure, thanks for the review!

@jughosta jughosta enabled auto-merge (squash) July 11, 2024 08:50
@jughosta jughosta merged commit 879b7b7 into elastic:main Jul 11, 2024
20 checks passed
@elasticmachine
Copy link
Contributor

💛 Build succeeded, but was flaky

Failed CI Steps

Test Failures

  • [job] [logs] FTR Configs #41 / Rule execution logic API Detection Engine - Execution logic @ess @serverless @skipInServerlessMKI Machine Learning Detection Rule - Alert Suppression with an active ML Job with interval suppression duration performs no suppression if a single alert is generated

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
discover 807.8KB 807.9KB +54.0B

History

cc @jughosta

kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Jul 11, 2024
…is enabled (elastic#187250)

- Closes elastic#187241

## Summary

This PR excludes `_source` when processing current `columns` in UI
- For Field Statistics table
- For ES|QL fields callout

### Checklist

- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios

---------

Co-authored-by: Matthias Wilhelm <[email protected]>
(cherry picked from commit 879b7b7)
@kibanamachine
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
8.15

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

kibanamachine added a commit that referenced this pull request Jul 11, 2024
…Source is enabled (#187250) (#188078)

# Backport

This will backport the following commits from `main` to `8.15`:
- [[Discover] Fix Field Statistics when discover:searchFieldsFromSource
is enabled (#187250)](#187250)

<!--- Backport version: 9.4.3 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Julia
Rechkunova","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-07-11T10:22:15Z","message":"[Discover]
Fix Field Statistics when discover:searchFieldsFromSource is enabled
(#187250)\n\n- Closes
https://github.com/elastic/kibana/issues/187241\r\n\r\n##
Summary\r\n\r\nThis PR excludes `_source` when processing current
`columns` in UI\r\n- For Field Statistics table\r\n- For ES|QL fields
callout\r\n\r\n### Checklist\r\n\r\n- [x] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common
scenarios\r\n\r\n---------\r\n\r\nCo-authored-by: Matthias Wilhelm
<[email protected]>","sha":"879b7b7d9880a99b693685697c435ad9f14159c9","branchLabelMapping":{"^v8.16.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:DataDiscovery","backport:prev-minor","v8.16.0"],"title":"[Discover]
Fix Field Statistics when discover:searchFieldsFromSource is
enabled","number":187250,"url":"https://github.com/elastic/kibana/pull/187250","mergeCommit":{"message":"[Discover]
Fix Field Statistics when discover:searchFieldsFromSource is enabled
(#187250)\n\n- Closes
https://github.com/elastic/kibana/issues/187241\r\n\r\n##
Summary\r\n\r\nThis PR excludes `_source` when processing current
`columns` in UI\r\n- For Field Statistics table\r\n- For ES|QL fields
callout\r\n\r\n### Checklist\r\n\r\n- [x] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common
scenarios\r\n\r\n---------\r\n\r\nCo-authored-by: Matthias Wilhelm
<[email protected]>","sha":"879b7b7d9880a99b693685697c435ad9f14159c9"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v8.16.0","branchLabelMappingKey":"^v8.16.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/187250","number":187250,"mergeCommit":{"message":"[Discover]
Fix Field Statistics when discover:searchFieldsFromSource is enabled
(#187250)\n\n- Closes
https://github.com/elastic/kibana/issues/187241\r\n\r\n##
Summary\r\n\r\nThis PR excludes `_source` when processing current
`columns` in UI\r\n- For Field Statistics table\r\n- For ES|QL fields
callout\r\n\r\n### Checklist\r\n\r\n- [x] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common
scenarios\r\n\r\n---------\r\n\r\nCo-authored-by: Matthias Wilhelm
<[email protected]>","sha":"879b7b7d9880a99b693685697c435ad9f14159c9"}}]}]
BACKPORT-->

Co-authored-by: Julia Rechkunova <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:prev-minor Backport to (8.x) the previous minor version (i.e. one version back from main) release_note:skip Skip the PR/issue when compiling release notes Team:DataDiscovery Discover App Team (Document Explorer, Saved Search, Surrounding documents, Data, DataViews) v8.15.0 v8.16.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Discover] No Field Statistics when discover:searchFieldsFromSource is enabled
7 participants