Closes https://github.com/elastic/kibana/issues/155452
# Backport
This will backport the following commits from `main` to `8.7`:
- [[Controls] Use EUI Selectable for Field search
(#151231)](https://github.com/elastic/kibana/pull/151231)
<!--- Backport version: 8.9.7 -->
### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)
<!--BACKPORT [{"author":{"name":"Devon
Thomson","email":"devon.thomson@elastic.co"},"sourceCommit":{"committedDate":"2023-02-24T15:39:15Z","message":"[Controls]
Use EUI Selectable for Field search (#151231)\n\n## Summary\r\nReplaces
Control field selection list with
EUISelectable.","sha":"eb9cc11a7c81073a75fb3e6ec33e61796cc40aff","branchLabelMapping":{"^v8.8.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:enhancement","Feature:Dashboard","Feature:Input
Control","Team:Presentation","loe:days","impact:low","backport:skip","v8.8.0"],"number":151231,"url":"https://github.com/elastic/kibana/pull/151231","mergeCommit":{"message":"[Controls]
Use EUI Selectable for Field search (#151231)\n\n## Summary\r\nReplaces
Control field selection list with
EUISelectable.","sha":"eb9cc11a7c81073a75fb3e6ec33e61796cc40aff"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v8.8.0","labelRegex":"^v8.8.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/151231","number":151231,"mergeCommit":{"message":"[Controls]
Use EUI Selectable for Field search (#151231)\n\n## Summary\r\nReplaces
Control field selection list with
EUISelectable.","sha":"eb9cc11a7c81073a75fb3e6ec33e61796cc40aff"}}]}]
BACKPORT-->
---------
Co-authored-by: Devon Thomson <devon.thomson@elastic.co>
# Backport
This will backport the following commits from `main` to `8.7`:
- [[Guided onboarding] Fix the value of `data-test-subj` for telemetry
(#154462)](https://github.com/elastic/kibana/pull/154462)
<!--- Backport version: 8.9.7 -->
### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)
<!--BACKPORT [{"author":{"name":"Yulia
Čech","email":"6585477+yuliacech@users.noreply.github.com"},"sourceCommit":{"committedDate":"2023-04-06T09:35:12Z","message":"[Guided
onboarding] Fix the value of `data-test-subj` for telemetry
(#154462)\n\n## Summary\r\nThis PR changes the value of `data-test-subj`
on the landing page to fix\r\nthe telemetry for guided onboarding. In
the code, this attribute is only\r\nused for testing.\r\n\r\nMore
details in
https://github.com/elastic/telemetry/issues/2155.","sha":"b2812f3278f06cac001cb5bba0c0280eaafda6bc","branchLabelMapping":{"^v8.8.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:Journey/Onboarding","v8.8.0","v8.7.1"],"number":154462,"url":"https://github.com/elastic/kibana/pull/154462","mergeCommit":{"message":"[Guided
onboarding] Fix the value of `data-test-subj` for telemetry
(#154462)\n\n## Summary\r\nThis PR changes the value of `data-test-subj`
on the landing page to fix\r\nthe telemetry for guided onboarding. In
the code, this attribute is only\r\nused for testing.\r\n\r\nMore
details in
https://github.com/elastic/telemetry/issues/2155.","sha":"b2812f3278f06cac001cb5bba0c0280eaafda6bc"}},"sourceBranch":"main","suggestedTargetBranches":["8.7"],"targetPullRequestStates":[{"branch":"main","label":"v8.8.0","labelRegex":"^v8.8.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/154462","number":154462,"mergeCommit":{"message":"[Guided
onboarding] Fix the value of `data-test-subj` for telemetry
(#154462)\n\n## Summary\r\nThis PR changes the value of `data-test-subj`
on the landing page to fix\r\nthe telemetry for guided onboarding. In
the code, this attribute is only\r\nused for testing.\r\n\r\nMore
details in
https://github.com/elastic/telemetry/issues/2155.","sha":"b2812f3278f06cac001cb5bba0c0280eaafda6bc"}},{"branch":"8.7","label":"v8.7.1","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->
---------
Co-authored-by: Yulia Čech <6585477+yuliacech@users.noreply.github.com>
# Backport
This will backport the following commits from `main` to `8.7`:
- [[Unified search] Fixes the comma delimeter copy paste on multifields
(#153772)](https://github.com/elastic/kibana/pull/153772)
<!--- Backport version: 8.9.7 -->
### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)
<!--BACKPORT [{"author":{"name":"Stratoula
Kalafateli","email":"efstratia.kalafateli@elastic.co"},"sourceCommit":{"committedDate":"2023-03-29T08:00:15Z","message":"[Unified
search] Fixes the comma delimeter copy paste on multifields
(#153772)\n\n## Summary\r\n\r\nIt fixes the problem with copying pasting
comma delimeter values on the\r\nunified search
fiters.\r\n\r\n\r\n","sha":"c48098d8da3e4832b70d84156fafcb8fcf364cb5","branchLabelMapping":{"^v8.8.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","Feature:Unified
search","backport:prev-minor","v8.8.0","v8.7.1"],"number":153772,"url":"https://github.com/elastic/kibana/pull/153772","mergeCommit":{"message":"[Unified
search] Fixes the comma delimeter copy paste on multifields
(#153772)\n\n## Summary\r\n\r\nIt fixes the problem with copying pasting
comma delimeter values on the\r\nunified search
fiters.\r\n\r\n\r\n","sha":"c48098d8da3e4832b70d84156fafcb8fcf364cb5"}},"sourceBranch":"main","suggestedTargetBranches":["8.7"],"targetPullRequestStates":[{"branch":"main","label":"v8.8.0","labelRegex":"^v8.8.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/153772","number":153772,"mergeCommit":{"message":"[Unified
search] Fixes the comma delimeter copy paste on multifields
(#153772)\n\n## Summary\r\n\r\nIt fixes the problem with copying pasting
comma delimeter values on the\r\nunified search
fiters.\r\n\r\n\r\n","sha":"c48098d8da3e4832b70d84156fafcb8fcf364cb5"}},{"branch":"8.7","label":"v8.7.1","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->
Co-authored-by: Stratoula Kalafateli <efstratia.kalafateli@elastic.co>
# Backport
This will backport the following commits from `main` to `8.7`:
- [[Lens][Embeddable] Reset removable error list on search/context
update (#152489)](https://github.com/elastic/kibana/pull/152489)
<!--- Backport version: 8.9.7 -->
### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)
<!--BACKPORT [{"author":{"name":"Marco
Liberati","email":"dej611@users.noreply.github.com"},"sourceCommit":{"committedDate":"2023-03-02T17:39:19Z","message":"[Lens][Embeddable]
Reset removable error list on search/context update (#152489)\n\n##
Summary\r\n\r\nFixes #152405 \r\n\r\nThis PR tracks search/context
updates and resets the \"removable\" error\r\nlist generated on first
evaluation.\r\nWhile fixing the bug I've noticed that Discover (via
unified histogram)\r\nand Dashboard update the search context with two
different approaches.\r\nThe fix acts at two distinct level and I've
added functional tests to\r\nverify it is working in both
scenarios.\r\n\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- [ ] 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#kibana-release-notes-process)","sha":"7c71786ff9537995aa79256c34a7e47c37ea3993","branchLabelMapping":{"^v8.8.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Team:Visualizations","release_note:skip","Feature:Lens","backport:prev-minor","v8.7.0","v8.8.0"],"number":152489,"url":"https://github.com/elastic/kibana/pull/152489","mergeCommit":{"message":"[Lens][Embeddable]
Reset removable error list on search/context update (#152489)\n\n##
Summary\r\n\r\nFixes #152405 \r\n\r\nThis PR tracks search/context
updates and resets the \"removable\" error\r\nlist generated on first
evaluation.\r\nWhile fixing the bug I've noticed that Discover (via
unified histogram)\r\nand Dashboard update the search context with two
different approaches.\r\nThe fix acts at two distinct level and I've
added functional tests to\r\nverify it is working in both
scenarios.\r\n\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- [ ] 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#kibana-release-notes-process)","sha":"7c71786ff9537995aa79256c34a7e47c37ea3993"}},"sourceBranch":"main","suggestedTargetBranches":["8.7"],"targetPullRequestStates":[{"branch":"8.7","label":"v8.7.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.8.0","labelRegex":"^v8.8.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/152489","number":152489,"mergeCommit":{"message":"[Lens][Embeddable]
Reset removable error list on search/context update (#152489)\n\n##
Summary\r\n\r\nFixes #152405 \r\n\r\nThis PR tracks search/context
updates and resets the \"removable\" error\r\nlist generated on first
evaluation.\r\nWhile fixing the bug I've noticed that Discover (via
unified histogram)\r\nand Dashboard update the search context with two
different approaches.\r\nThe fix acts at two distinct level and I've
added functional tests to\r\nverify it is working in both
scenarios.\r\n\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- [ ] 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#kibana-release-notes-process)","sha":"7c71786ff9537995aa79256c34a7e47c37ea3993"}}]}]
BACKPORT-->
# Backport
This will backport the following commits from `main` to `8.7`:
- [Add test to ensure security related eslint rules are applied
(#151434)](https://github.com/elastic/kibana/pull/151434)
<!--- Backport version: 8.9.7 -->
### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)
<!--BACKPORT [{"author":{"name":"Thomas
Watson","email":"watson@elastic.co"},"sourceCommit":{"committedDate":"2023-02-24T15:48:11Z","message":"Add
test to ensure security related eslint rules are applied
(#151434)","sha":"e3dd7227e1cd48d420de849397f6ebed5e05bb6d","branchLabelMapping":{"^v8.8.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","backport:all-open","v8.8.0"],"number":151434,"url":"https://github.com/elastic/kibana/pull/151434","mergeCommit":{"message":"Add
test to ensure security related eslint rules are applied
(#151434)","sha":"e3dd7227e1cd48d420de849397f6ebed5e05bb6d"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v8.8.0","labelRegex":"^v8.8.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/151434","number":151434,"mergeCommit":{"message":"Add
test to ensure security related eslint rules are applied
(#151434)","sha":"e3dd7227e1cd48d420de849397f6ebed5e05bb6d"}}]}]
BACKPORT-->
# Backport
This will backport the following commits from `main` to `8.7`:
- [[drift] Determine if trial is active (plus buffer) before showing
chat. (#151548)](https://github.com/elastic/kibana/pull/151548)
<!--- Backport version: 8.9.7 -->
### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)
<!--BACKPORT [{"author":{"name":"Clint Andrew
Hall","email":"clint.hall@elastic.co"},"sourceCommit":{"committedDate":"2023-02-22T21:34:44Z","message":"[drift]
Determine if trial is active (plus buffer) before showing chat.
(#151548)\n\n## Summary\r\n\r\nIn-app chat should only be enabled in
Cloud if a trial is still
active.\r\nhttps://github.com/elastic/kibana/pull/143002 added metadata
including\r\n`trial_end_date`. This PR:\r\n\r\n- adds a config key to
`cloud_integrations` for a `trialBuffer`, in\r\ndays, which defaults to
~~`30`~~ `60`.\r\n- adds logic to not display chat if the trial end date
+ buffer exceeds\r\nthe current date.\r\n- adds logic to not add a
server route if the trial end date + buffer\r\nexceeds the current
date.\r\n\r\n## Testing Locally\r\n\r\nAdd the following config to
`kibana.dev.yml`:\r\n\r\n```\r\nxpack.cloud.id:
\"some-id\"\r\nxpack.cloud.trial_end_date:
\"2023-02-21T00:00:00.000Z\"\r\n\r\nxpack.cloud_integrations.chat.enabled:
true\r\nxpack.cloud_integrations.chat.chatURL:
\"https://elasticcloud-production-chat-us-east-1.s3.amazonaws.com/drift-iframe.html\"\r\nxpack.cloud_integrations.chat.chatIdentitySecret:
\"some-secret\"\r\n```\r\n\r\nAnd start Kibana. You can optionally
change the default of `30` days by\r\nadding
`xpack.cloud_integrations.chat.trialBuffer`.\r\n\r\n##
Storybook\r\n\r\nRun `yarn storybook cloud_chat`.\r\n\r\n## Testing in
Cloud\r\n\r\nSet the same config keys as above on a Cloud
deployment.","sha":"00ab82ecd7e6c0e33977d7d37b26c6d88e367fd6","branchLabelMapping":{"^v8.8.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["review","loe:hours","release_note:skip","impact:high","ci:cloud-deploy","v8.7.0","v8.8.0","Feature:Chat"],"number":151548,"url":"https://github.com/elastic/kibana/pull/151548","mergeCommit":{"message":"[drift]
Determine if trial is active (plus buffer) before showing chat.
(#151548)\n\n## Summary\r\n\r\nIn-app chat should only be enabled in
Cloud if a trial is still
active.\r\nhttps://github.com/elastic/kibana/pull/143002 added metadata
including\r\n`trial_end_date`. This PR:\r\n\r\n- adds a config key to
`cloud_integrations` for a `trialBuffer`, in\r\ndays, which defaults to
~~`30`~~ `60`.\r\n- adds logic to not display chat if the trial end date
+ buffer exceeds\r\nthe current date.\r\n- adds logic to not add a
server route if the trial end date + buffer\r\nexceeds the current
date.\r\n\r\n## Testing Locally\r\n\r\nAdd the following config to
`kibana.dev.yml`:\r\n\r\n```\r\nxpack.cloud.id:
\"some-id\"\r\nxpack.cloud.trial_end_date:
\"2023-02-21T00:00:00.000Z\"\r\n\r\nxpack.cloud_integrations.chat.enabled:
true\r\nxpack.cloud_integrations.chat.chatURL:
\"https://elasticcloud-production-chat-us-east-1.s3.amazonaws.com/drift-iframe.html\"\r\nxpack.cloud_integrations.chat.chatIdentitySecret:
\"some-secret\"\r\n```\r\n\r\nAnd start Kibana. You can optionally
change the default of `30` days by\r\nadding
`xpack.cloud_integrations.chat.trialBuffer`.\r\n\r\n##
Storybook\r\n\r\nRun `yarn storybook cloud_chat`.\r\n\r\n## Testing in
Cloud\r\n\r\nSet the same config keys as above on a Cloud
deployment.","sha":"00ab82ecd7e6c0e33977d7d37b26c6d88e367fd6"}},"sourceBranch":"main","suggestedTargetBranches":["8.7"],"targetPullRequestStates":[{"branch":"8.7","label":"v8.7.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.8.0","labelRegex":"^v8.8.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/151548","number":151548,"mergeCommit":{"message":"[drift]
Determine if trial is active (plus buffer) before showing chat.
(#151548)\n\n## Summary\r\n\r\nIn-app chat should only be enabled in
Cloud if a trial is still
active.\r\nhttps://github.com/elastic/kibana/pull/143002 added metadata
including\r\n`trial_end_date`. This PR:\r\n\r\n- adds a config key to
`cloud_integrations` for a `trialBuffer`, in\r\ndays, which defaults to
~~`30`~~ `60`.\r\n- adds logic to not display chat if the trial end date
+ buffer exceeds\r\nthe current date.\r\n- adds logic to not add a
server route if the trial end date + buffer\r\nexceeds the current
date.\r\n\r\n## Testing Locally\r\n\r\nAdd the following config to
`kibana.dev.yml`:\r\n\r\n```\r\nxpack.cloud.id:
\"some-id\"\r\nxpack.cloud.trial_end_date:
\"2023-02-21T00:00:00.000Z\"\r\n\r\nxpack.cloud_integrations.chat.enabled:
true\r\nxpack.cloud_integrations.chat.chatURL:
\"https://elasticcloud-production-chat-us-east-1.s3.amazonaws.com/drift-iframe.html\"\r\nxpack.cloud_integrations.chat.chatIdentitySecret:
\"some-secret\"\r\n```\r\n\r\nAnd start Kibana. You can optionally
change the default of `30` days by\r\nadding
`xpack.cloud_integrations.chat.trialBuffer`.\r\n\r\n##
Storybook\r\n\r\nRun `yarn storybook cloud_chat`.\r\n\r\n## Testing in
Cloud\r\n\r\nSet the same config keys as above on a Cloud
deployment.","sha":"00ab82ecd7e6c0e33977d7d37b26c6d88e367fd6"}}]}]
BACKPORT-->
Co-authored-by: Clint Andrew Hall <clint.hall@elastic.co>
# Backport
This will backport the following commits from `main` to `8.7`:
- [[Discover] Remove table column after that field was deleted
(#150980)](https://github.com/elastic/kibana/pull/150980)
<!--- Backport version: 8.9.7 -->
### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)
<!--BACKPORT [{"author":{"name":"Julia
Rechkunova","email":"julia.rechkunova@elastic.co"},"sourceCommit":{"committedDate":"2023-02-21T10:50:27Z","message":"[Discover]
Remove table column after that field was deleted (#150980)\n\nCloses
https://github.com/elastic/kibana/issues/150958\r\nCloseshttps://github.com/elastic/kibana/issues/151531\r\n\r\n##
Summary\r\n\r\nThis PR removes the field from table and sidebar after it
was added as a\r\ncolumn but deleted in the end.\r\n\r\nSteps for
testing:\r\n- Create a runtime field\r\n- Add to the table\r\n- Delete
the field and observe that it is removed from the table
and\r\nsidebar.","sha":"406e6c06d187a07b4c2377644e693e43c40d05f2","branchLabelMapping":{"^v8.8.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Feature:Discover","release_note:fix","Team:DataDiscovery","backport:prev-minor","v8.8.0"],"number":150980,"url":"https://github.com/elastic/kibana/pull/150980","mergeCommit":{"message":"[Discover]
Remove table column after that field was deleted (#150980)\n\nCloses
https://github.com/elastic/kibana/issues/150958\r\nCloseshttps://github.com/elastic/kibana/issues/151531\r\n\r\n##
Summary\r\n\r\nThis PR removes the field from table and sidebar after it
was added as a\r\ncolumn but deleted in the end.\r\n\r\nSteps for
testing:\r\n- Create a runtime field\r\n- Add to the table\r\n- Delete
the field and observe that it is removed from the table
and\r\nsidebar.","sha":"406e6c06d187a07b4c2377644e693e43c40d05f2"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v8.8.0","labelRegex":"^v8.8.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/150980","number":150980,"mergeCommit":{"message":"[Discover]
Remove table column after that field was deleted (#150980)\n\nCloses
https://github.com/elastic/kibana/issues/150958\r\nCloseshttps://github.com/elastic/kibana/issues/151531\r\n\r\n##
Summary\r\n\r\nThis PR removes the field from table and sidebar after it
was added as a\r\ncolumn but deleted in the end.\r\n\r\nSteps for
testing:\r\n- Create a runtime field\r\n- Add to the table\r\n- Delete
the field and observe that it is removed from the table
and\r\nsidebar.","sha":"406e6c06d187a07b4c2377644e693e43c40d05f2"}}]}]
BACKPORT-->
Co-authored-by: Julia Rechkunova <julia.rechkunova@elastic.co>
# Backport
This will backport the following commits from `main` to `8.7`:
- [[Fleet] Bugfix: prevent status runtime query going over character
limit (#150910)](https://github.com/elastic/kibana/pull/150910)
<!--- Backport version: 8.9.7 -->
### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)
<!--BACKPORT [{"author":{"name":"Mark
Hopkin","email":"mark.hopkin@elastic.co"},"sourceCommit":{"committedDate":"2023-02-14T14:05:34Z","message":"[Fleet]
Bugfix: prevent status runtime query going over character limit
(#150910)\n\n## Summary\r\n\r\nCloses #150577 \r\n\r\nif there are too
many agent policies in a system, we were creating too\r\nbig a runtime
query for elastic and the query would be rejected.\r\n\r\nThis PR adds a
limit, if the user has more than 750 agent policies then\r\nagents will
not be marked as inactive anymore. If the user reaches the\r\nlimit then
a warning badge is displayed (the text underlined has also\r\nbeen
added):\r\n\r\n<img width=\"968\" alt=\"Screenshot 2023-02-13 at 20 14
31\"\r\nsrc=\"https://user-images.githubusercontent.com/3315046/218565456-f5758e4b-74f6-4e7c-9b49-22f0fd6f9102.png\">\r\n\r\n\r\nIntegration
test
added.","sha":"687294d4d30e936aa95b4a4c566b29c4462ab362","branchLabelMapping":{"^v8.8.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["bug","release_note:skip","Team:Fleet","v8.7.0","v8.8.0"],"number":150910,"url":"https://github.com/elastic/kibana/pull/150910","mergeCommit":{"message":"[Fleet]
Bugfix: prevent status runtime query going over character limit
(#150910)\n\n## Summary\r\n\r\nCloses #150577 \r\n\r\nif there are too
many agent policies in a system, we were creating too\r\nbig a runtime
query for elastic and the query would be rejected.\r\n\r\nThis PR adds a
limit, if the user has more than 750 agent policies then\r\nagents will
not be marked as inactive anymore. If the user reaches the\r\nlimit then
a warning badge is displayed (the text underlined has also\r\nbeen
added):\r\n\r\n<img width=\"968\" alt=\"Screenshot 2023-02-13 at 20 14
31\"\r\nsrc=\"https://user-images.githubusercontent.com/3315046/218565456-f5758e4b-74f6-4e7c-9b49-22f0fd6f9102.png\">\r\n\r\n\r\nIntegration
test
added.","sha":"687294d4d30e936aa95b4a4c566b29c4462ab362"}},"sourceBranch":"main","suggestedTargetBranches":["8.7"],"targetPullRequestStates":[{"branch":"8.7","label":"v8.7.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.8.0","labelRegex":"^v8.8.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/150910","number":150910,"mergeCommit":{"message":"[Fleet]
Bugfix: prevent status runtime query going over character limit
(#150910)\n\n## Summary\r\n\r\nCloses #150577 \r\n\r\nif there are too
many agent policies in a system, we were creating too\r\nbig a runtime
query for elastic and the query would be rejected.\r\n\r\nThis PR adds a
limit, if the user has more than 750 agent policies then\r\nagents will
not be marked as inactive anymore. If the user reaches the\r\nlimit then
a warning badge is displayed (the text underlined has also\r\nbeen
added):\r\n\r\n<img width=\"968\" alt=\"Screenshot 2023-02-13 at 20 14
31\"\r\nsrc=\"https://user-images.githubusercontent.com/3315046/218565456-f5758e4b-74f6-4e7c-9b49-22f0fd6f9102.png\">\r\n\r\n\r\nIntegration
test added.","sha":"687294d4d30e936aa95b4a4c566b29c4462ab362"}}]}]
BACKPORT-->
Co-authored-by: Mark Hopkin <mark.hopkin@elastic.co>
# Backport
This will backport the following commits from `main` to `8.7`:
- [unskip flaky test
test/functional/apps/dashboard/group1/embeddable_rendering·ts
(#150596)](https://github.com/elastic/kibana/pull/150596)
<!--- Backport version: 8.9.7 -->
### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)
<!--BACKPORT [{"author":{"name":"Nathan
Reese","email":"reese.nathan@elastic.co"},"sourceCommit":{"committedDate":"2023-02-08T21:44:43Z","message":"unskip
flaky test test/functional/apps/dashboard/group1/embeddable_rendering·ts
(#150596)\n\nFixes
https://github.com/elastic/kibana/issues/132865\r\n\r\nflaky test
runner\r\nhttps://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/1891\r\n\r\nPR
fixes flaky test by ensuring window._echDebugStateFlag flag is
set\r\nbefore any panel renders.\r\n\r\n---------\r\n\r\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"4446adb2ee866e08b97b5eb36133b4c701fa726d","branchLabelMapping":{"^v8.8.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Team:Presentation","release_note:skip","auto-backport","v8.7.0","v8.8.0"],"number":150596,"url":"https://github.com/elastic/kibana/pull/150596","mergeCommit":{"message":"unskip
flaky test test/functional/apps/dashboard/group1/embeddable_rendering·ts
(#150596)\n\nFixes
https://github.com/elastic/kibana/issues/132865\r\n\r\nflaky test
runner\r\nhttps://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/1891\r\n\r\nPR
fixes flaky test by ensuring window._echDebugStateFlag flag is
set\r\nbefore any panel renders.\r\n\r\n---------\r\n\r\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"4446adb2ee866e08b97b5eb36133b4c701fa726d"}},"sourceBranch":"main","suggestedTargetBranches":["8.7"],"targetPullRequestStates":[{"branch":"8.7","label":"v8.7.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.8.0","labelRegex":"^v8.8.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/150596","number":150596,"mergeCommit":{"message":"unskip
flaky test test/functional/apps/dashboard/group1/embeddable_rendering·ts
(#150596)\n\nFixes
https://github.com/elastic/kibana/issues/132865\r\n\r\nflaky test
runner\r\nhttps://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/1891\r\n\r\nPR
fixes flaky test by ensuring window._echDebugStateFlag flag is
set\r\nbefore any panel renders.\r\n\r\n---------\r\n\r\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"4446adb2ee866e08b97b5eb36133b4c701fa726d"}}]}]
BACKPORT-->
Co-authored-by: Nathan Reese <reese.nathan@elastic.co>
This change ensures that the `unsafe-eval` source expression isn't included in
the Kibana Content Security Policy (CSP) by default.
Users can set `csp.disableUnsafeEval: false` to reintroduce `unsafe-eval`.
However, since this config option is deprecated as of this commit, it's
recommended to instead set `csp.script_src: ['unsafe-eval']`.
Closes#150156
## Summary
Closes https://github.com/elastic/kibana/issues/150208
The problem is that it adds the filter badge twice. I think that it
doesn't remove the previous one so a new is added. I think that waiting
the chart to be rendered after the clearing of the filters will
stabilize it.
Runner 100 times
### 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
Closes https://github.com/elastic/kibana/issues/140175
Closes https://github.com/elastic/kibana/issues/143580
## Summary
Oh, boy! Get ready for a doozy of a PR, folks! Let's talk about the
three major things that were accomplished here:
### 1) Pagination
Originally, this PR was meant to add traditional pagination to the
options list control. However, after implementing a version of this, it
became apparent that, not only was UI becoming uncomfortably messy, it
also had some UX concerns because we were deviating from the usual
pagination pattern by showing the cardinality rather than the number of
pages:
<p align="center"><img
src="https://user-images.githubusercontent.com/8698078/214687041-f8950d3a-2b29-41d5-b656-c79d9575d744.gif"/></p>
So, instead of traditional pagination, we decided to take a different
approach (which was made possible by
https://github.com/elastic/kibana/pull/148420) - **load more options
when the user scrolls to the bottom!** Here it is in action:
<p align="center"><img
src="https://user-images.githubusercontent.com/8698078/214688854-06c7e8a9-7b8c-4dc0-9846-00ccf5e5f771.gif"/></p>
It is important that the first query remains **fast** - that is why we
still only request the top 10 options when the control first loads. So,
having a "load more" is the best approach that allows users to see more
suggestions while also ensuring that the performance of options lists
(especially with respect to chaining) is not impacted.
Note that it is **not possible** to grab every single value of a field -
the limit is `10,000`. However, since it is impractical that a user
would want to scroll through `10,000` suggestions (and potentially very
slow to fetch), we have instead made the limit of this "show more"
functionality `1,000`. To make this clear, if the field has more than
`1,000` values and the user scrolls all the way to the bottom, they will
get the following message:
<p align="center"><img
src="https://user-images.githubusercontent.com/8698078/214920302-1e3574dc-f2b6-4845-be69-f9ba04177e7f.png"/></p>
### 2) Cardinality
Previously, the cardinality of the options list control was **only**
shown as part of the control placeholder text - this meant that, once
the user entered their search term, they could no longer see the
cardinality of the returned options. This PR changes this functionality
by placing the cardinality in a badge **beside** the search bar - this
value now changes as the user types, so they can very clearly see how
many options match their search:
<p align="center"><img
src="https://user-images.githubusercontent.com/8698078/214689739-9670719c-5878-4e8b-806c-0b5a6f6f907f.gif"/></p>
> **Note**
> After some initial feedback, we have removed both the cardinality and
invalid selections badges in favour of displaying the cardinality below
the search bar, like so:
>
> <p align="center"><img
src="https://user-images.githubusercontent.com/8698078/216473930-e99366a3-86df-4777-a3d8-cf2d41e550fb.gif"/></p>
>
> So, please be aware that the screenshots above are outdated.
### 3) Changes to Queries
This is where things get.... messy! Essentially, our previous queries
were all built with the expectation that the Elasticsearch setting
`search.allow_expensive_queries` was **off** - this meant that they
worked regardless of the value of this setting. However, when trying to
get the cardinality to update based on a search term, it became apparent
that this was not possible if we kept the same assumptions -
specifically, if `search.allow_expensive_queries` is off, there is
absolutely no way for the cardinality of **keyword only fields** to
respond to a search term.
After a whole lot of discussion, we decided that the updating
cardinality was a feature important enough to justify having **two
separate versions** of the queries:
1. **Queries for when `search.allow_expensive_queries` is off**:
These are essentially the same as our old queries - however, since we
can safely assume that this setting is **usually** on (it defaults on,
and there is no UI to easily change it), we opted to simplify them a
bit.
First of all, we used to create a special object for tracking the
parent/child relationship of fields that are mapped as keyword+text -
this was so that, if a user created a control on these fields, we could
support case-insensitive search. We no longer do this - if
`search.allow_expensive_queries` is off and you create a control on a
text+keyword field, the search will be case sensitive. This helps clean
up our code quite a bit.
Second, we are no longer returning **any** cardinality. Since the
cardinality is now displayed as a badge beside the search bar, users
would expect that this value would change as they type - however, since
it's impossible to make this happen for keyword-only fields and to keep
behaviour consistent, we have opted to simply remove this badge when
`search.allow_expensive_queries` is off **regardless** of the field
type. So, there is no longer a need to include the `cardinality` query
when grabbing the suggestions.
Finally, we do not support "load more" when
`search.allow_expensive_queries` is off. While this would theoretically
be possible, because we are no longer grabbing the cardinality, we would
have to always fetch `1,000` results when the user loads more, even if
the true cardinality is much smaller. Again, we are pretty confident
that **more often than not**, the `search.allow_expensive_queries` is
on; therefore, we are choosing to favour developer experience in this
instance because the impact should be quite small.
2. **Queries for when `search.allow_expensive_queries` is on**:
When this setting is on, we now have access to the prefix query, which
greatly simplifies how our queries are handled - now, rather than having
separate queries for keyword-only, keyword+text, and nested fields,
these have all been combined into a single query! And even better -
⭐ now **all** string-based fields support case-insensitive search!
⭐ Yup, that's right - even keyword-only fields 💃
There has been [discussion on the Elasticsearch side
](https://github.com/elastic/elasticsearch/issues/90898) about whether
or not this setting is even **practical**, and so it is possible that,
in the near future, this distinction will no longer be necessary. With
this in mind, I have made these two versions of our queries **completely
separate** from each other - while this introduces some code
duplication, it makes the cleanup that may follow much, much easier.
Well, that was sure fun, hey?
<p align="center"><img
src="https://user-images.githubusercontent.com/8698078/214921985-49058ff0-42f2-4b01-8ae3-0a4d259d1075.gif"/></p>
## How to Test
I've created a quick little Python program to ingest some good testing
data for this PR:
```python
import random
import time
import pandas as pd
from faker import Faker
from elasticsearch import Elasticsearch
SIZE = 10000
ELASTIC_PASSWORD = "changeme"
INDEX_NAME = 'test_large_index'
Faker.seed(time.time())
faker = Faker()
hundredRandomSentences = [faker.sentence(random.randint(5, 35)) for _ in range(100)]
thousandRandomIps = [faker.ipv4() if random.randint(0, 99) < 50 else faker.ipv6() for _ in range(1000)]
client = Elasticsearch(
"http://localhost:9200",
basic_auth=("elastic", ELASTIC_PASSWORD),
)
if(client.indices.exists(index=INDEX_NAME)):
client.indices.delete(index=INDEX_NAME)
client.indices.create(index=INDEX_NAME, mappings={"properties":{"keyword_field":{"type":"keyword"},"id":{"type":"long"},"ip_field":{"type":"ip"},"boolean_field":{"type":"boolean"},"keyword_text_field":{"type":"text","fields":{"keyword":{"type":"keyword"}}},"nested_field":{"type":"nested","properties":{"first":{"type":"text","fields":{"keyword":{"type":"keyword"}}},"last":{"type":"text","fields":{"keyword":{"type":"keyword"}}}}},"long_keyword_text_field":{"type":"text","fields":{"keyword":{"type":"keyword"}}}}})
print('Generating data', end='')
for i in range(SIZE):
name1 = faker.name();
[first_name1, last_name1] = name1.split(' ', 1)
name2 = faker.name();
[first_name2, last_name2] = name2.split(' ', 1)
response = client.create(index=INDEX_NAME, id=i, document={
'keyword_field': faker.country(),
'id': i,
'boolean_field': faker.boolean(),
'ip_field': thousandRandomIps[random.randint(0, 999)],
'keyword_text_field': faker.name(),
'nested_field': [
{ 'first': first_name1, 'last': last_name1},
{ 'first': first_name2, 'last': last_name2}
],
'long_keyword_text_field': hundredRandomSentences[random.randint(0, 99)]
})
print('.', end='')
print(' Done!')
```
However, if you don't have Python up and running, here's a CSV with a
smaller version of this data:
[testNewQueriesData.csv](10538537/testNewQueriesData.csv)
> **Warning**
> When uploading, make sure to update the mappings of the CSV data to
the mappings included as part of the Python script above (which you can
find as part of the `client.indices.create` call). You'll notice,
however, that **none of the CSV documents have a nested field**.
Unfortunately, there doesn't seem to be a way to able to ingest nested
data through uploading a CSV, so the above data does not include one -
in order to test the nested data type, you'd have to add some of your
own documents
>
> Here's a sample nested field document, for your convenience:
> ```json
> {
> "keyword_field": "Russian Federation",
> "id": 0,
> "boolean_field": true,
> "ip_field": "121.149.70.251",
> "keyword_text_field": "Michael Foster",
> "nested_field": [
> {
> "first": "Rachel",
> "last": "Wright"
> },
> {
> "first": "Gary",
> "last": "Reyes"
> }
> ],
> "long_keyword_text_field": "Color hotel indicate appear since well
sure right yet individual easy often test enough left a usually
attention."
> }
> ```
>
### Testing Notes
Because there are now two versions of the queries, thorough testing
should be done for both when `search.allow_expensive_queries` is `true`
and when it is `false` for every single field type that is currently
supported. Use the following call to the cluster settings API to toggle
this value back and forth:
```php
PUT _cluster/settings
{
"transient": {
"search.allow_expensive_queries": <value> // true or false
}
}
```
You should pay super special attention to the behaviour that happens
when toggling this value from `true` to `false` - for example, consider
the following:
1. Ensure `search.allow_expensive_queries` is either `true` or
`undefined`
2. Create and save a dashboard with at least one options list control
3. Navigate to the console and set `search.allow_expensive_queries` to
`false` - **DO NOT REFRESH**
4. Go back to the dashboard
5. Open up the options list control you created in step 2
6. Fetch a new, uncached request, either by scrolling to the bottom and
fetching more (assuming these values aren't already in the cache) or by
performing a search with a string you haven't tried before
7. ⚠️ **The options list control _should_ have a fatal error** ⚠️<br>The
Elasticsearch server knows that `search.allow_expensive_queries` is now
`false` but, because we only fetch this value on the first load on the
client side, it has not yet been updated - this means the options list
service still tries to fetch the suggestions using the expensive version
of the queries despite the fact that Elasticsearch will now reject this
request. The most graceful way to handle this is to simply throw a fatal
error.
8. Refreshing the browser will make things sync up again and you should
now get the expected results when opening the options list control.
### Flaky Test Runner
<a
href="https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/1845"><img
src="https://user-images.githubusercontent.com/8698078/215894267-97f07e59-6660-4117-bda7-18f63cb19af6.png"/></a>
### Checklist
- [x] 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)
- [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
- [x] Any UI touched in this PR is usable by keyboard only (learn more
about [keyboard accessibility](https://webaim.org/techniques/keyboard/))
- [x] 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))
> **Note**
> Technically, it actually does - however, it is due to an [EUI
bug](https://github.com/elastic/eui/issues/6565) from adding the group
label to the bottom of the list.
- [x] 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))
- [x] This was checked for [cross-browser
compatibility](https://www.elastic.co/support/matrix#matrix_browsers)
### For maintainers
- [ ] This was checked for breaking API changes and was [labeled
appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
---------
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
## Summary
### Notes for reviewers
- Currently, autocomplete suggestions for fields don't work with
wildcards and data streams due to the
[bug](https://github.com/elastic/kibana/issues/149496) in the `main`. It
should be addressed separately.
### How to test
In order to spot the loading behaviour, ideally you should create an
index with a heavy mappings definition.
Afterwards, write a query that requires a field from this index, e.g.:
```
GET <my-index>/_search
{
"aggs": {
"my_agg": {
"terms": {
"field": "",
"size": 10
}
}
}
}
```
Place a cursor next to the `field` property, it should trigger mappings
fetch. After that, the mappings definition for this index will be cached
and accessed synchronously.
You can also open the browser's dev tools and enable Network throttling.
It allows noticing loading behaviour for any index.
--------------------
Resolves https://github.com/elastic/kibana/issues/146855
Instead of fetching all mappings upfront, requests mapping definition on
demand per index according to the cursor position.
Considering there is a maximum response size limit of 10MB in the
`/autocomplete_entities` endpoint, field autocompletion wasn't working
at all if the overall mappings definition exceeded this size. Retrieving
mappings per index tackles this and improves the init time.

### Checklist
- [ ]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [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
- [x] This was checked for [cross-browser
compatibility](https://www.elastic.co/support/matrix#matrix_browsers)
---------
Co-authored-by: Jean-Louis Leysens <jloleysens@gmail.com>
## Summary
Fixes https://github.com/elastic/kibana/issues/149691
Follow up to https://github.com/elastic/kibana/pull/149528
This PR adds 3 separate guide ID values `appSearch`, `websiteSearch` and
`databaseSearch` instead of previously used `search`. With that change,
each card for Search on the landing page has its own independent guide
that can be completed.
Example plugin for guided onboarding is also updated so that all 3
search guides can be managed there. Otherwise there should not be any
UI/UX changes.
Currently, all 3 ids are registered with the same config and that can be
easily updated by the team in the future.
#### Screenshot
<img width="485" alt="Screenshot 2023-01-31 at 18 24 12"
src="https://user-images.githubusercontent.com/6585477/215840343-f9a65be3-0568-40ca-b458-5de92bfe8aaf.png">
### 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 <42973632+kibanamachine@users.noreply.github.com>
## Summary
Currently, changes to a data view require a round trip to management
when you're in discover. This PR allows editing of data views via flyout
from within discover.
Closes https://github.com/elastic/kibana/issues/144801
### Checklist
Delete any items that are not applicable to this PR.
- [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 <ankertal@gmail.com>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Fixes https://github.com/elastic/kibana/issues/89073 and
https://github.com/elastic/kibana/issues/106547
Flaky test runner
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/1785
Issue with flaky maps_integration.ts is that there was not await when
filtering maps list by tags. This resulted in list page refreshing after
`const links = await
this.find.allByCssSelector('.euiTableRow-isSelectable .euiLink');` and
then getting an elemented unmounted on future `await
links[i].getVisibleText()` calls.
A [similar fix](https://github.com/elastic/kibana/pull/82930) was
implemented for visualize and dashboard listing pages.
https://github.com/elastic/kibana/pull/82930 introduced
`listingTable.waitUntilTableIsLoaded` but did not introduce the method
in a consistent way. Other methods that search table were not updated to
use `listingTable.waitUntilTableIsLoaded`, but instead used
`this.header.waitUntilLoadingHasFinished()`. This PR resolved this issue
by updating all listingTable methods that search to use
`listingTable.waitUntilTableIsLoaded` and then updated
`listingTable.waitUntilTableIsLoaded` with a call to
`this.header.waitUntilLoadingHasFinished()`
https://github.com/elastic/kibana/pull/82930 did not update
maps_integration tests, only resolving the issue for visualize and
dashboard. To avoid future situations where fixes only resolve a few
usages, this PR moves selectFilterTags into listing_table and replaces
all implementations of selectFilterTags with
listingTable.selectFilterTags.
While investigating dashboard_integrations test, I found
`x-pack/test/functional/apps/dashboard/group2/dashboard_tagging.ts`,
which duplicated most of dashboard_integrations test. This PR removes
x-pack/test/functional/apps/dashboard/group2/dashboard_tagging.ts adds
the unique test case to dashboard_integrations
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>