-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[ES|QL] Hide field statistics tab and Dashboard when ES|QL is in use, disable Index data visualizer for MATCH and QSRT functions #197538
Conversation
element: messageUnsupportedReason, | ||
}) | ||
: messageUnsupportedReason; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
QQ: should we also skip the request to ES in this case?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes! Definitely. Thanks for catching that. I'll make the change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
if (isOfAggregateQueryType(query)) { | ||
const { root } = parse(query.esql); | ||
|
||
if (Walker.hasFunction(root, 'match') || Walker.hasFunction(root, 'qstr')) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Quynh lets add this check to the esql-utils, these fucntions have a lot of limitations so it will get in handy for other consumers too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added a util here 38d47b9
(#197538). Open to suggestion what kind of utlity/API you would like us to expose.
@ryankeairns @MichaelMarcialis can you take a look here? How do we feel about this? I think the dashboard panel warning could use some love to make it more consistent with the rest of the panels maybe? |
/ci |
/** | ||
* If the ES|QL query is unsupported, we can exit early | ||
*/ | ||
const unsupportedReasonForQuery = isTextBased | ||
? getReasonIfFieldStatsUnavailableForQuery(query, FIELD_DATA_LABEL) | ||
: undefined; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file is quite large already. Let's move this logic to fetchAndCalculateFieldStats
handler in
Line 56 in b628770
export async function fetchAndCalculateFieldStats(params: FetchAndCalculateFieldStatsParams) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I ended up refactoring it to loadFieldStatsTextBased
instead here 4215c9c
(#197538)
const FIELD_STATISTICS_LABEL = i18n.translate('unifiedFieldList.fieldStats.fieldStatisticsLabel', { | ||
defaultMessage: `Field statistics are`, | ||
}); | ||
|
||
export const FIELD_DATA_LABEL = i18n.translate('unifiedFieldList.fieldStats.fieldDataLabel', { | ||
defaultMessage: `Field data is`, | ||
}); | ||
|
||
export const getReasonIfFieldStatsUnavailableForQuery = ( | ||
query?: AggregateQuery | Query | { [key: string]: any }, | ||
label: string = FIELD_STATISTICS_LABEL | ||
): string | undefined => { | ||
if (queryCannotBeSampled(query)) { | ||
return i18n.translate('unifiedFieldList.fieldStats.notAvailableForMatchESQLQueryDescription', { | ||
defaultMessage: `{label} not supported for ES|QL queries with 'MATCH' or 'QSTR' functions.`, | ||
values: { label }, | ||
}); | ||
} | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This would not work for all translations. I think we better define 2 full messages (without concatenation).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated here b2b7222
(#197538)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the only thing I find a bit odd is the dashbopard panel. It seems as it needs a space or something? @MichaelMarcialis wdyt?
I see there is an open discussion on the field stats on ES|QL.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we add some unit tests?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated here b2b7222
(#197538)
@stratoula @MichaelMarcialis what do you think of these options? Note: In this scenario, that space below the editor is otherwise unused. At first glance of this issue, I presumed it the callout may be filling space where content would otherwise render. That is not the case which makes this current placement rather unexpected, imo. Two alternatives
|
@ryankeairns if we keep the yellow callout visible all the time? If someone types match / qstr then we disable the button, and display the warning. So actually do both. |
@ryankeairns: I like option 2, to avoid the stacking callouts. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is hidden, tested again 👍 Thanx Quyhn for your patience with this :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agree with Stratoula. Almost there!
src/plugins/discover/public/components/view_mode_toggle/view_mode_toggle.test.tsx
Show resolved
Hide resolved
if (isEsql) { | ||
return ( | ||
<EuiEmptyPrompt | ||
icon={<EuiIcon size="l" type="warning" color="warning" />} | ||
color="plain" | ||
paddingSize="m" | ||
css={css` | ||
margin: ${euiTheme.size.xl} auto; | ||
`} | ||
title={ | ||
<h2 data-test-subj="fieldStatsUnavailableCalloutTitle"> | ||
<FormattedMessage | ||
id="discover.fieldStatsNotAvailableForESQLCalloutTitle" | ||
defaultMessage="Field statistics are not available for ES|QL queries" | ||
/> | ||
</h2> | ||
} | ||
titleSize="xs" | ||
hasBorder | ||
/> | ||
); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if (isEsql) { | |
return ( | |
<EuiEmptyPrompt | |
icon={<EuiIcon size="l" type="warning" color="warning" />} | |
color="plain" | |
paddingSize="m" | |
css={css` | |
margin: ${euiTheme.size.xl} auto; | |
`} | |
title={ | |
<h2 data-test-subj="fieldStatsUnavailableCalloutTitle"> | |
<FormattedMessage | |
id="discover.fieldStatsNotAvailableForESQLCalloutTitle" | |
defaultMessage="Field statistics are not available for ES|QL queries" | |
/> | |
</h2> | |
} | |
titleSize="xs" | |
hasBorder | |
/> | |
); | |
} |
Can we move this message from FieldStatisticsTab
and SearchEmbeddablFieldStatsTableComponent
to FieldStatisticsTable
to avoid duplications?
Also, would be great to have the same styles and copy for a search embeddable panel and a field stats panel. Currently it looks like this:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated here dc99c68
(#197538)
@@ -163,6 +163,7 @@ export function createDiscoverServicesMock(): DiscoverServices { | |||
data: dataPlugin, | |||
dataVisualizer: { | |||
FieldStatisticsTable: jest.fn(() => createElement('div')), | |||
getReasonIfFieldStatsUnavailableForQuery: jest.fn().mockReturnValue(undefined), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
getReasonIfFieldStatsUnavailableForQuery: jest.fn().mockReturnValue(undefined), |
Can be reverted now, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reverted here eabc053
(#197538)
1fd7119
to
34379b7
Compare
34379b7
to
5ccbdf7
Compare
() => | ||
// If user opens saved search with field stats in ES|QL, | ||
// we show the toggle with the mode disabled so user can switch to document view | ||
// instead of auto-directing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
instead of auto-directing
Is not what we do on L109-L113?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For the most part yes if user opening a bookmarked link from the browser with Field stats previously set, it will redirect automatically. But when opening a saved search that a user previously saved, it doesn't redirect automatically. I think it makes sense because if a user is expecting field statistics from a saved search and the page is auto directing without any messaging that would be confusing.
Screen.Recording.2024-11-11.at.09.28.04.mov
Screen.Recording.2024-11-11.at.09.27.48.mov
- Related to #197538 ## Summary This PR removes the support of showing stats in the field popover in ES|QL mode as this UX will be revisited in the future to provide better results. ### 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: kibanamachine <[email protected]>
- Related to elastic#197538 ## Summary This PR removes the support of showing stats in the field popover in ES|QL mode as this UX will be revisited in the future to provide better results. ### 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: kibanamachine <[email protected]>
- Related to elastic#197538 ## Summary This PR removes the support of showing stats in the field popover in ES|QL mode as this UX will be revisited in the future to provide better results. ### 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: kibanamachine <[email protected]> (cherry picked from commit e883ac5) # Conflicts: # test/functional/apps/discover/group6/_sidebar_field_stats.ts
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
Thanks, Quynh!
@elasticmachine merge upstream |
💚 Build Succeeded
Metrics [docs]Module Count
Public APIs missing comments
Async chunks
Page load bundle
Unknown metric groupsAPI count
async chunk count
ESLint disabled line counts
Total ESLint disabled count
History
cc @qn895 |
Starting backport for target branches: 8.x https://github.com/elastic/kibana/actions/runs/11803608063 |
… disable Index data visualizer for MATCH and QSRT functions (elastic#197538) ## Summary Part of elastic#196995. This PR disables field statistics tab and Dashboard embeddable when ES|QL is in used. In Index data visualizer, it is disabled when MATCH & QSRT is in used. **1. Hide Discover's Field statistics tab:** https://github.com/user-attachments/assets/07cbf6ab-4e8f-4430-852a-2fe14269f26a **2. ML's Index data visualizer:** Message will popup and user will not be allowed to run query if it contains `MATCH` or `QRST` ![image](https://github.com/user-attachments/assets/42251d13-8b49-4eee-a65c-e275a4a7312f) **3. Dashboard:** Hide the option to add panel and show unavailable for existing ES|QL panel <img width="1728" alt="Screenshot 2024-11-05 at 09 44 21" src="https://github.com/user-attachments/assets/ef763c8d-cdd6-4ece-ae13-f45726e3ef16"> For existing dashboards and saved searches with ES|QL field statistics: <img width="1209" alt="Screenshot 2024-11-06 at 12 00 10" src="https://github.com/user-attachments/assets/3c423d01-42b1-48bc-994c-3340dee94bdc"> ### Checklist Delete any items that are not applicable to this PR. - [ ] Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md) - [ ] [Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html) was added for features that require explanation or tutorials - [ ] [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 - [ ] [Flaky Test Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was used on any tests changed - [ ] Any UI touched in this PR is usable by keyboard only (learn more about [keyboard accessibility](https://webaim.org/techniques/keyboard/)) - [ ] Any UI touched in this PR does not create any new axe failures (run axe in browser: [FF](https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/), [Chrome](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US)) - [ ] If a plugin configuration key changed, check if it needs to be allowlisted in the cloud and added to the [docker list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker) - [ ] This renders correctly on smaller devices using a responsive layout. (You can test this [in your browser](https://www.browserstack.com/guide/responsive-testing-on-local-server)) - [ ] This was checked for [cross-browser compatibility](https://www.elastic.co/support/matrix#matrix_browsers) ### 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](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx) | ### For maintainers - [ ] This was checked for breaking API changes and was [labeled appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#_add_your_labels) - [ ] This will appear in the **Release Notes** and follow the [guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process) --------- Co-authored-by: Stratoula Kalafateli <[email protected]> Co-authored-by: kibanamachine <[email protected]> Co-authored-by: Elastic Machine <[email protected]> (cherry picked from commit 61cc412)
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
…n use, disable Index data visualizer for MATCH and QSRT functions (#197538) (#199861) # Backport This will backport the following commits from `main` to `8.x`: - [[ES|QL] Hide field statistics tab and Dashboard when ES|QL is in use, disable Index data visualizer for MATCH and QSRT functions (#197538)](#197538) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Quynh Nguyen (Quinn)","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-11-12T18:38:04Z","message":"[ES|QL] Hide field statistics tab and Dashboard when ES|QL is in use, disable Index data visualizer for MATCH and QSRT functions (#197538)\n\n## Summary\r\n\r\nPart of #196995. This PR\r\ndisables field statistics tab and Dashboard embeddable when ES|QL is in\r\nused. In Index data visualizer, it is disabled when MATCH & QSRT is in\r\nused.\r\n\r\n**1. Hide Discover's Field statistics tab:** \r\n\r\n\r\nhttps://github.com/user-attachments/assets/07cbf6ab-4e8f-4430-852a-2fe14269f26a\r\n\r\n\r\n**2. ML's Index data visualizer:**\r\n\r\nMessage will popup and user will not be allowed to run query if it\r\ncontains `MATCH` or `QRST`\r\n\r\n\r\n\r\n![image](https://github.com/user-attachments/assets/42251d13-8b49-4eee-a65c-e275a4a7312f)\r\n\r\n\r\n\r\n**3. Dashboard:**\r\n\r\nHide the option to add panel and show unavailable for existing ES|QL\r\npanel\r\n\r\n\r\n<img width=\"1728\" alt=\"Screenshot 2024-11-05 at 09 44 21\"\r\nsrc=\"https://github.com/user-attachments/assets/ef763c8d-cdd6-4ece-ae13-f45726e3ef16\">\r\n\r\nFor existing dashboards and saved searches with ES|QL field statistics:\r\n\r\n<img width=\"1209\" alt=\"Screenshot 2024-11-06 at 12 00 10\"\r\nsrc=\"https://github.com/user-attachments/assets/3c423d01-42b1-48bc-994c-3340dee94bdc\">\r\n\r\n\r\n\r\n\r\n### Checklist\r\n\r\nDelete any items that are not applicable to this PR.\r\n\r\n- [ ] Any text added follows [EUI's writing\r\nguidelines](https://elastic.github.io/eui/#/guidelines/writing), uses\r\nsentence case text and includes [i18n\r\nsupport](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)\r\n- [ ]\r\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\r\nwas added for features that require explanation or tutorials\r\n- [ ] [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- [ ] [Flaky Test\r\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was\r\nused on any tests changed\r\n- [ ] Any UI touched in this PR is usable by keyboard only (learn more\r\nabout [keyboard accessibility](https://webaim.org/techniques/keyboard/))\r\n- [ ] Any UI touched in this PR does not create any new axe failures\r\n(run axe in browser:\r\n[FF](https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/),\r\n[Chrome](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US))\r\n- [ ] If a plugin configuration key changed, check if it needs to be\r\nallowlisted in the cloud and added to the [docker\r\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\r\n- [ ] This renders correctly on smaller devices using a responsive\r\nlayout. (You can test this [in your\r\nbrowser](https://www.browserstack.com/guide/responsive-testing-on-local-server))\r\n- [ ] This was checked for [cross-browser\r\ncompatibility](https://www.elastic.co/support/matrix#matrix_browsers)\r\n\r\n\r\n### Risk Matrix\r\n\r\nDelete this section if it is not applicable to this PR.\r\n\r\nBefore closing this PR, invite QA, stakeholders, and other developers to\r\nidentify risks that should be tested prior to the change/feature\r\nrelease.\r\n\r\nWhen forming the risk matrix, consider some of the following examples\r\nand how they may potentially impact the change:\r\n\r\n| Risk | Probability | Severity | Mitigation/Notes |\r\n\r\n|---------------------------|-------------|----------|-------------------------|\r\n| Multiple Spaces—unexpected behavior in non-default Kibana Space.\r\n| Low | High | Integration tests will verify that all features are still\r\nsupported in non-default Kibana Space and when user switches between\r\nspaces. |\r\n| Multiple nodes—Elasticsearch polling might have race conditions\r\nwhen multiple Kibana nodes are polling for the same tasks. | High | Low\r\n| Tasks are idempotent, so executing them multiple times will not result\r\nin logical error, but will degrade performance. To test for this case we\r\nadd plenty of unit tests around this logic and document manual testing\r\nprocedure. |\r\n| Code should gracefully handle cases when feature X or plugin Y are\r\ndisabled. | Medium | High | Unit tests will verify that any feature flag\r\nor plugin combination still results in our service operational. |\r\n| [See more potential risk\r\nexamples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx) |\r\n\r\n\r\n### For maintainers\r\n\r\n- [ ] This was checked for breaking API changes and was [labeled\r\nappropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#_add_your_labels)\r\n- [ ] This will appear in the **Release Notes** and follow the\r\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\r\n\r\n---------\r\n\r\nCo-authored-by: Stratoula Kalafateli <[email protected]>\r\nCo-authored-by: kibanamachine <[email protected]>\r\nCo-authored-by: Elastic Machine <[email protected]>","sha":"61cc4129a3419312f05b2168987aee146d6372ec","branchLabelMapping":{"^v9.0.0$":"main","^v8.17.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","Feature:ES|QL","Team:ESQL","backport:version","v8.17.0"],"title":"[ES|QL] Hide field statistics tab and Dashboard when ES|QL is in use, disable Index data visualizer for MATCH and QSRT functions","number":197538,"url":"https://github.com/elastic/kibana/pull/197538","mergeCommit":{"message":"[ES|QL] Hide field statistics tab and Dashboard when ES|QL is in use, disable Index data visualizer for MATCH and QSRT functions (#197538)\n\n## Summary\r\n\r\nPart of #196995. This PR\r\ndisables field statistics tab and Dashboard embeddable when ES|QL is in\r\nused. In Index data visualizer, it is disabled when MATCH & QSRT is in\r\nused.\r\n\r\n**1. Hide Discover's Field statistics tab:** \r\n\r\n\r\nhttps://github.com/user-attachments/assets/07cbf6ab-4e8f-4430-852a-2fe14269f26a\r\n\r\n\r\n**2. ML's Index data visualizer:**\r\n\r\nMessage will popup and user will not be allowed to run query if it\r\ncontains `MATCH` or `QRST`\r\n\r\n\r\n\r\n![image](https://github.com/user-attachments/assets/42251d13-8b49-4eee-a65c-e275a4a7312f)\r\n\r\n\r\n\r\n**3. Dashboard:**\r\n\r\nHide the option to add panel and show unavailable for existing ES|QL\r\npanel\r\n\r\n\r\n<img width=\"1728\" alt=\"Screenshot 2024-11-05 at 09 44 21\"\r\nsrc=\"https://github.com/user-attachments/assets/ef763c8d-cdd6-4ece-ae13-f45726e3ef16\">\r\n\r\nFor existing dashboards and saved searches with ES|QL field statistics:\r\n\r\n<img width=\"1209\" alt=\"Screenshot 2024-11-06 at 12 00 10\"\r\nsrc=\"https://github.com/user-attachments/assets/3c423d01-42b1-48bc-994c-3340dee94bdc\">\r\n\r\n\r\n\r\n\r\n### Checklist\r\n\r\nDelete any items that are not applicable to this PR.\r\n\r\n- [ ] Any text added follows [EUI's writing\r\nguidelines](https://elastic.github.io/eui/#/guidelines/writing), uses\r\nsentence case text and includes [i18n\r\nsupport](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)\r\n- [ ]\r\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\r\nwas added for features that require explanation or tutorials\r\n- [ ] [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- [ ] [Flaky Test\r\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was\r\nused on any tests changed\r\n- [ ] Any UI touched in this PR is usable by keyboard only (learn more\r\nabout [keyboard accessibility](https://webaim.org/techniques/keyboard/))\r\n- [ ] Any UI touched in this PR does not create any new axe failures\r\n(run axe in browser:\r\n[FF](https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/),\r\n[Chrome](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US))\r\n- [ ] If a plugin configuration key changed, check if it needs to be\r\nallowlisted in the cloud and added to the [docker\r\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\r\n- [ ] This renders correctly on smaller devices using a responsive\r\nlayout. (You can test this [in your\r\nbrowser](https://www.browserstack.com/guide/responsive-testing-on-local-server))\r\n- [ ] This was checked for [cross-browser\r\ncompatibility](https://www.elastic.co/support/matrix#matrix_browsers)\r\n\r\n\r\n### Risk Matrix\r\n\r\nDelete this section if it is not applicable to this PR.\r\n\r\nBefore closing this PR, invite QA, stakeholders, and other developers to\r\nidentify risks that should be tested prior to the change/feature\r\nrelease.\r\n\r\nWhen forming the risk matrix, consider some of the following examples\r\nand how they may potentially impact the change:\r\n\r\n| Risk | Probability | Severity | Mitigation/Notes |\r\n\r\n|---------------------------|-------------|----------|-------------------------|\r\n| Multiple Spaces—unexpected behavior in non-default Kibana Space.\r\n| Low | High | Integration tests will verify that all features are still\r\nsupported in non-default Kibana Space and when user switches between\r\nspaces. |\r\n| Multiple nodes—Elasticsearch polling might have race conditions\r\nwhen multiple Kibana nodes are polling for the same tasks. | High | Low\r\n| Tasks are idempotent, so executing them multiple times will not result\r\nin logical error, but will degrade performance. To test for this case we\r\nadd plenty of unit tests around this logic and document manual testing\r\nprocedure. |\r\n| Code should gracefully handle cases when feature X or plugin Y are\r\ndisabled. | Medium | High | Unit tests will verify that any feature flag\r\nor plugin combination still results in our service operational. |\r\n| [See more potential risk\r\nexamples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx) |\r\n\r\n\r\n### For maintainers\r\n\r\n- [ ] This was checked for breaking API changes and was [labeled\r\nappropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#_add_your_labels)\r\n- [ ] This will appear in the **Release Notes** and follow the\r\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\r\n\r\n---------\r\n\r\nCo-authored-by: Stratoula Kalafateli <[email protected]>\r\nCo-authored-by: kibanamachine <[email protected]>\r\nCo-authored-by: Elastic Machine <[email protected]>","sha":"61cc4129a3419312f05b2168987aee146d6372ec"}},"sourceBranch":"main","suggestedTargetBranches":["8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/197538","number":197538,"mergeCommit":{"message":"[ES|QL] Hide field statistics tab and Dashboard when ES|QL is in use, disable Index data visualizer for MATCH and QSRT functions (#197538)\n\n## Summary\r\n\r\nPart of #196995. This PR\r\ndisables field statistics tab and Dashboard embeddable when ES|QL is in\r\nused. In Index data visualizer, it is disabled when MATCH & QSRT is in\r\nused.\r\n\r\n**1. Hide Discover's Field statistics tab:** \r\n\r\n\r\nhttps://github.com/user-attachments/assets/07cbf6ab-4e8f-4430-852a-2fe14269f26a\r\n\r\n\r\n**2. ML's Index data visualizer:**\r\n\r\nMessage will popup and user will not be allowed to run query if it\r\ncontains `MATCH` or `QRST`\r\n\r\n\r\n\r\n![image](https://github.com/user-attachments/assets/42251d13-8b49-4eee-a65c-e275a4a7312f)\r\n\r\n\r\n\r\n**3. Dashboard:**\r\n\r\nHide the option to add panel and show unavailable for existing ES|QL\r\npanel\r\n\r\n\r\n<img width=\"1728\" alt=\"Screenshot 2024-11-05 at 09 44 21\"\r\nsrc=\"https://github.com/user-attachments/assets/ef763c8d-cdd6-4ece-ae13-f45726e3ef16\">\r\n\r\nFor existing dashboards and saved searches with ES|QL field statistics:\r\n\r\n<img width=\"1209\" alt=\"Screenshot 2024-11-06 at 12 00 10\"\r\nsrc=\"https://github.com/user-attachments/assets/3c423d01-42b1-48bc-994c-3340dee94bdc\">\r\n\r\n\r\n\r\n\r\n### Checklist\r\n\r\nDelete any items that are not applicable to this PR.\r\n\r\n- [ ] Any text added follows [EUI's writing\r\nguidelines](https://elastic.github.io/eui/#/guidelines/writing), uses\r\nsentence case text and includes [i18n\r\nsupport](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)\r\n- [ ]\r\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\r\nwas added for features that require explanation or tutorials\r\n- [ ] [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- [ ] [Flaky Test\r\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was\r\nused on any tests changed\r\n- [ ] Any UI touched in this PR is usable by keyboard only (learn more\r\nabout [keyboard accessibility](https://webaim.org/techniques/keyboard/))\r\n- [ ] Any UI touched in this PR does not create any new axe failures\r\n(run axe in browser:\r\n[FF](https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/),\r\n[Chrome](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US))\r\n- [ ] If a plugin configuration key changed, check if it needs to be\r\nallowlisted in the cloud and added to the [docker\r\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\r\n- [ ] This renders correctly on smaller devices using a responsive\r\nlayout. (You can test this [in your\r\nbrowser](https://www.browserstack.com/guide/responsive-testing-on-local-server))\r\n- [ ] This was checked for [cross-browser\r\ncompatibility](https://www.elastic.co/support/matrix#matrix_browsers)\r\n\r\n\r\n### Risk Matrix\r\n\r\nDelete this section if it is not applicable to this PR.\r\n\r\nBefore closing this PR, invite QA, stakeholders, and other developers to\r\nidentify risks that should be tested prior to the change/feature\r\nrelease.\r\n\r\nWhen forming the risk matrix, consider some of the following examples\r\nand how they may potentially impact the change:\r\n\r\n| Risk | Probability | Severity | Mitigation/Notes |\r\n\r\n|---------------------------|-------------|----------|-------------------------|\r\n| Multiple Spaces—unexpected behavior in non-default Kibana Space.\r\n| Low | High | Integration tests will verify that all features are still\r\nsupported in non-default Kibana Space and when user switches between\r\nspaces. |\r\n| Multiple nodes—Elasticsearch polling might have race conditions\r\nwhen multiple Kibana nodes are polling for the same tasks. | High | Low\r\n| Tasks are idempotent, so executing them multiple times will not result\r\nin logical error, but will degrade performance. To test for this case we\r\nadd plenty of unit tests around this logic and document manual testing\r\nprocedure. |\r\n| Code should gracefully handle cases when feature X or plugin Y are\r\ndisabled. | Medium | High | Unit tests will verify that any feature flag\r\nor plugin combination still results in our service operational. |\r\n| [See more potential risk\r\nexamples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx) |\r\n\r\n\r\n### For maintainers\r\n\r\n- [ ] This was checked for breaking API changes and was [labeled\r\nappropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#_add_your_labels)\r\n- [ ] This will appear in the **Release Notes** and follow the\r\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\r\n\r\n---------\r\n\r\nCo-authored-by: Stratoula Kalafateli <[email protected]>\r\nCo-authored-by: kibanamachine <[email protected]>\r\nCo-authored-by: Elastic Machine <[email protected]>","sha":"61cc4129a3419312f05b2168987aee146d6372ec"}},{"branch":"8.x","label":"v8.17.0","branchLabelMappingKey":"^v8.17.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Quynh Nguyen (Quinn) <[email protected]>
… disable Index data visualizer for MATCH and QSRT functions (elastic#197538) ## Summary Part of elastic#196995. This PR disables field statistics tab and Dashboard embeddable when ES|QL is in used. In Index data visualizer, it is disabled when MATCH & QSRT is in used. **1. Hide Discover's Field statistics tab:** https://github.com/user-attachments/assets/07cbf6ab-4e8f-4430-852a-2fe14269f26a **2. ML's Index data visualizer:** Message will popup and user will not be allowed to run query if it contains `MATCH` or `QRST` ![image](https://github.com/user-attachments/assets/42251d13-8b49-4eee-a65c-e275a4a7312f) **3. Dashboard:** Hide the option to add panel and show unavailable for existing ES|QL panel <img width="1728" alt="Screenshot 2024-11-05 at 09 44 21" src="https://github.com/user-attachments/assets/ef763c8d-cdd6-4ece-ae13-f45726e3ef16"> For existing dashboards and saved searches with ES|QL field statistics: <img width="1209" alt="Screenshot 2024-11-06 at 12 00 10" src="https://github.com/user-attachments/assets/3c423d01-42b1-48bc-994c-3340dee94bdc"> ### Checklist Delete any items that are not applicable to this PR. - [ ] Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md) - [ ] [Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html) was added for features that require explanation or tutorials - [ ] [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 - [ ] [Flaky Test Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was used on any tests changed - [ ] Any UI touched in this PR is usable by keyboard only (learn more about [keyboard accessibility](https://webaim.org/techniques/keyboard/)) - [ ] Any UI touched in this PR does not create any new axe failures (run axe in browser: [FF](https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/), [Chrome](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US)) - [ ] If a plugin configuration key changed, check if it needs to be allowlisted in the cloud and added to the [docker list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker) - [ ] This renders correctly on smaller devices using a responsive layout. (You can test this [in your browser](https://www.browserstack.com/guide/responsive-testing-on-local-server)) - [ ] This was checked for [cross-browser compatibility](https://www.elastic.co/support/matrix#matrix_browsers) ### 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](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx) | ### For maintainers - [ ] This was checked for breaking API changes and was [labeled appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#_add_your_labels) - [ ] This will appear in the **Release Notes** and follow the [guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process) --------- Co-authored-by: Stratoula Kalafateli <[email protected]> Co-authored-by: kibanamachine <[email protected]> Co-authored-by: Elastic Machine <[email protected]>
… disable Index data visualizer for MATCH and QSRT functions (elastic#197538) ## Summary Part of elastic#196995. This PR disables field statistics tab and Dashboard embeddable when ES|QL is in used. In Index data visualizer, it is disabled when MATCH & QSRT is in used. **1. Hide Discover's Field statistics tab:** https://github.com/user-attachments/assets/07cbf6ab-4e8f-4430-852a-2fe14269f26a **2. ML's Index data visualizer:** Message will popup and user will not be allowed to run query if it contains `MATCH` or `QRST` ![image](https://github.com/user-attachments/assets/42251d13-8b49-4eee-a65c-e275a4a7312f) **3. Dashboard:** Hide the option to add panel and show unavailable for existing ES|QL panel <img width="1728" alt="Screenshot 2024-11-05 at 09 44 21" src="https://github.com/user-attachments/assets/ef763c8d-cdd6-4ece-ae13-f45726e3ef16"> For existing dashboards and saved searches with ES|QL field statistics: <img width="1209" alt="Screenshot 2024-11-06 at 12 00 10" src="https://github.com/user-attachments/assets/3c423d01-42b1-48bc-994c-3340dee94bdc"> ### Checklist Delete any items that are not applicable to this PR. - [ ] Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md) - [ ] [Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html) was added for features that require explanation or tutorials - [ ] [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 - [ ] [Flaky Test Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was used on any tests changed - [ ] Any UI touched in this PR is usable by keyboard only (learn more about [keyboard accessibility](https://webaim.org/techniques/keyboard/)) - [ ] Any UI touched in this PR does not create any new axe failures (run axe in browser: [FF](https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/), [Chrome](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US)) - [ ] If a plugin configuration key changed, check if it needs to be allowlisted in the cloud and added to the [docker list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker) - [ ] This renders correctly on smaller devices using a responsive layout. (You can test this [in your browser](https://www.browserstack.com/guide/responsive-testing-on-local-server)) - [ ] This was checked for [cross-browser compatibility](https://www.elastic.co/support/matrix#matrix_browsers) ### 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](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx) | ### For maintainers - [ ] This was checked for breaking API changes and was [labeled appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#_add_your_labels) - [ ] This will appear in the **Release Notes** and follow the [guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process) --------- Co-authored-by: Stratoula Kalafateli <[email protected]> Co-authored-by: kibanamachine <[email protected]> Co-authored-by: Elastic Machine <[email protected]>
Summary
Part of #196995. This PR disables field statistics tab and Dashboard embeddable when ES|QL is in used. In Index data visualizer, it is disabled when MATCH & QSRT is in used.
1. Hide Discover's Field statistics tab:
Screen.Recording.2024-11-05.at.09.44.03.mov
2. ML's Index data visualizer:
Message will popup and user will not be allowed to run query if it contains
MATCH
orQRST
3. Dashboard:
Hide the option to add panel and show unavailable for existing ES|QL panel
For existing dashboards and saved searches with ES|QL field statistics:
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:
For maintainers