Closes https://github.com/elastic/kibana/issues/167906
PR breaks monolith component `<SearchResponseWarnings/>` into 3 separate
components: `<SearchResponseWarningsBadge/>`,
`<SearchResponseWarningsCallout/>`, and
`<SearchResponseWarningsEmptyPrompt/>`. These components are designed to
display a single messages when provided warnings from multiple requests
and display better messaging around partial results. PR also removes
`message` from `SearchResponseWarning` type.
Collaborated with @gchaps on copy.
### Test setup
1. install sample web logs data set
2. install sample flights data set
3. Create data view.
1. Set **Index pattern** to `kibana_sample_data*`
2. Set **Time field** to `timestamp`
4. Open discover
5. Select **kibana_sample_data*** data view
6. set time range to last 24 hours
7. Add filter
```
{
"error_query": {
"indices": [
{
"error_type": "exception",
"message": "shard failure message 123",
"name": "kibana_sample_data_logs",
"shard_ids": [
0
]
}
]
}
}
```
8) save search as **kibana_sample_data***
#### Search response warnings callout
1. Open saved search created in test setup
<img width="500" alt="Screenshot 2023-10-24 at 8 49 19 AM"
src="867cff58-c201-4a6b-b049-7136b43d053f">
2. Click "expand" icon on left of first row in documents table
3. Click "Surrounding documents"
4. Re-enable "kibana_sample_data_logs failure" filter
<img width="500" alt="Screenshot 2023-10-24 at 8 51 22 AM"
src="a50cf033-64de-4909-a47d-6ee07bb915ea">
#### Search response warnings empty prompt
1. Open saved search created in test setup
2. Add filter `DistanceKilometers is -1`
<img width="500" alt="Screenshot 2023-10-24 at 8 44 13 AM"
src="e3ae0fac-8bda-4cad-b079-8ace4e01b786">
#### Search response warnings badge
1. create new dashboard
2. add saved search created during test setup
<img width="500" alt="Screenshot 2023-10-26 at 9 15 21 AM"
src="0066e3e2-953b-4631-a7aa-f389f7e6dbfc">
#### Search response warnings toast
1. create new table aggregation visualization
2. Use saved search created during test setup as source
<img width="500" alt="Screenshot 2023-10-24 at 2 59 41 PM"
src="58aab97e-71d9-49d9-bd67-73484ec54751">
---------
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
## Summary
Creates an anchor `/#ingestData` to Ingest Data section in Get started
page.
### Screen Recording
58e52abb-4c66-4a41-a827-d34810d84c3d
---------
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
## Summary
Related to #161882
The goal is to prevent FTR tests from new esArchives that overrides SO
indexes.
This PR adds the existing archives that re-create Saved Objects indexes
into temporary exception list, located in
`packages/kbn-es-archiver/src/fixtures/override_saved_objects_index/exception_list.json`.
Whenever tests/archives are updated to not modify SO indexes, archive is
expected to be removed from the list (progress can be tracked in
#169075, #168973, #168969, #168926 )
Load action has a check if index is SO index and if the archive is in
the exception list. This will throw error for the new archives, but
still work as usual for the existing ones while teams updating the
tests.
Whenever test is loading archive listed in the exception list, the
following warning message is logged:
```
warn x-pack/test/functional/es_archives/data/search_sessions overrides Saved Objects index(es) and placed temporary in the exception list.
Please fix the archive and remove it from /Users/dmle/github/kibana/packages/kbn-es-archiver/src/fixtures/override_saved_objects_index/exception_list.json.
For more details see: https://github.com/elastic/kibana/issues/161882
```
If the test loads a newly added archive that modifies a Saved Object
index (e.g. `.kibana`), esArchiver will throw the error:
```
Error: esArchiver doesn't support modifying the existing Saved Objects index: '.kibana_1',
please update its definition in mappings.json
```
## Summary
Adds to the appropriate mappings to ensure elastic-agent can write logs
for the Universal Profiling service.
Signed-off-by: Florian Lehner <florian.lehner@elastic.co>
**Parent meta ticket:
https://github.com/elastic/security-team/issues/7491**
Resolves: https://github.com/elastic/security-team/issues/7582
Resolves: https://github.com/elastic/security-team/issues/7580
Resolves: https://github.com/elastic/security-team/issues/7581
## Summary
This PR migrates the rules schema to OpenAPI, Zod, and code generation.
The following APIs now have complete OpenAPI specifications and are
enabled for code generation:
| Method | Endpoint | OpenAPI spec | Fully migrated |
| ------ |
---------------------------------------------------------------- |
------------ | -------------- |
| POST | /api/detection_engine/rules | ✅ | ✅ |
| GET | /api/detection_engine/rules | ✅ | ✅ |
| PUT | /api/detection_engine/rules | ✅ | ✅ |
| PATCH | /api/detection_engine/rules | ✅ | ✅ |
| DELETE | /api/detection_engine/rules | ✅ | ✅ |
| POST | /api/detection_engine/rules/\_bulk_create | ✅ | ✅ |
| PUT | /api/detection_engine/rules/\_bulk_update | ✅ | ✅ |
| PATCH | /api/detection_engine/rules/\_bulk_update | ✅ | ✅ |
| DELETE | /api/detection_engine/rules/\_bulk_delete | ✅ | ✅ |
| POST | /api/detection_engine/rules/\_bulk_delete | ✅ | ✅ |
### Rule schemas are now forward-compatible
We now allow extra fields in schemas for forward compatibility, but we
remove them from the payload during parsing. So from now on, extra
fields are simply ignored and won't lead to validation errors.
## Summary
👋 Hey y'all - EUI will shortly be deprecating the `ghost` color in all
button components (see
https://eui.elastic.co/v89.0.0/#/navigation/button#ghost-vs-dark-mode).
In this PR, components using `color="ghost"` within an `EuiBottomBar`
already automatically inherit dark mode coloring and should be changed
to `color="text"` instead.
For the legacy uptime change that adds a theme wrapper, I'm unsure what
context it's being used in (does not appear to be a bottom bar) and
would appreciate help QAing it.
I'm opening this PR ahead of time for your team so you can test this
migration and ensure no UI regressions have occurred as a result.
### Checklist
- [ ] Tested in light and dark mode
---------
Co-authored-by: shahzad31 <shahzad31comp@gmail.com>
## Summary
Fixes#169733
#### Reporting fix
Change point detection embeddable was incorrectly reporting render
completion. It was relying on the `onLoad` callback from the Lens
embeddable responsible for chart rendering, which only indicates that
data fetching is complete, but not the actual rendering. Current
implementation relies on the `renderComplete` event from each child
embeddable. Both PNG and PDF exports tested and work as expected.

#### Additional fixes
- Fixes the metric and split field controls states when editing existing
Change point embeddable from a dashboard
- Fixes `filter` query if partitions input is initialized as an empty
array.
### 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
- Use Kibana internal user to fetch Profiling status.
- Check if current user has superadmin role to set up Profiling.
- Viewer users: disable set up button when Profiling is not yet
initialised.
- Remove Profiling role creation and check.
<img width="1187" alt="Screenshot 2023-10-06 at 10 50 44"
src="468dd22e-e9db-4691-86b3-acb2428d4ad8">
<img width="1079" alt="Screenshot 2023-10-06 at 10 51 15"
src="939ac662-5ccb-4210-a582-7ace77b6cf29">
---------
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
## Summary
Fixes https://github.com/elastic/kibana/issues/22173
This PR adds a formatting to the index size column of the indices list.
The number formatting is done according to the default locale in the
browser. I decided against aligning the column right because this would
looked misaligned to other columns. And aligning all of the columns
right doesn't look good either (see screenshots).
### Screenshot
#### Formatted index size
<img width="438" alt="Screenshot 2023-10-27 at 13 32 42"
src="87ff1b31-36b0-4951-b6aa-3cdc0c9b545e">
<details>
#### Aligning the size column right (not implemented)
<img width="413" alt="Screenshot 2023-10-27 at 13 34 18"
src="df76a308-a927-45bd-8987-7da86a94c46f">
#### Aligning all columns right (not implemented)
<img width="1296" alt="Screenshot 2023-10-27 at 13 34 42"
src="2604ac48-015c-49eb-9e8c-003a5c989fb1">
</details>
### Checklist
- [ ] 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
- [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
- [ ] 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#kibana-release-notes-process)
Attempt at understanding #166190
I first thought the flakiness could be a regression in Elasticsearch,
but it turns out because I can only reproduce 90% of the time I got
"lucky" and found a previous ES commit where tests passed 3 times in a
row. On further investigation I was able to reproduce failures on
commits as old as July (before we even saw these failures) so ES is
unlikely to be the root cause 👎
Looking at our flaky test failure logs I found the first occurence
happened on 5 September on the branch for
https://github.com/elastic/kibana/pull/164959 (before it was merged) and
then subsequent failures on other branches and main happened within a
few hours after https://github.com/elastic/kibana/pull/164959 was merged
on 11 September.
However, nothing in https://github.com/elastic/kibana/pull/164959 should
have changed or impacted behaviour. To try to track down the cause this
PR is attempting to restorte `actions.test.ts` until before
https://github.com/elastic/kibana/pull/164959. Serverless tests will
continue to use `actions_test_suite.ts` but for classic we'll run the
old `actions.test.ts`.
## Summary
Fixes https://github.com/elastic/kibana/issues/168699
This PR adds a new function to the extensions service in Index
Management to register additional tabs into the index details page. I
think we will be adding more content using this service and it might
change the interface of the service later on.
To add a new tab, add Index Management as a dependency to your plugin
and use the `addIndexDetailsTab` function in the extensions service. The
interface for the tab is as follows:
```ts
export interface IndexDetailsTab {
// a unique key to identify the tab
id: IndexDetailsTabIds;
// a text that is displayed on the tab label, usually a Formatted message component
name: ReactNode;
// a function that renders the content of the tab
renderTabContent: (indexName: string, index: Index) => ReactNode;
// a number to specify the order of the tabs
order: number;
}
```
### How to test
1. Add a test tab from the ILM plugin using this test commit
74a771db65
2. Start Kibana and ES with `yarn es snapshot` and `yarn start`
3. Navigate to Index Management and click on any index name
4. Verify that the tab is displayed correctly and the tab header is in
the correct order
###
Screenshot
<img width="1042" alt="Screenshot 2023-10-24 at 15 59 10"
src="7929f5db-8d2a-41d9-9e6d-4d1f74a93a35">
### Screen recording
6826f68c-c90d-47b1-ae3e-da6e6981d7ba
### Checklist
- [ ] 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
- [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
- [ ] 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#kibana-release-notes-process)
## Summary
Although we are displaying the Technical preview badge in the dataview
picker we want to make it more prominent in the UI due to some concerns
on the scalability. This PR adds a dismissible callout (state stored in
local storage).
<img width="828" alt="image"
src="9287c9d8-0e67-4498-a544-b17eea9569b4">
---------
Co-authored-by: florent-leborgne <florent.leborgne@elastic.co>
n2-2-spot preemption are frequent enough that this is causing pipeline
instability. This moves the instance size up to n2-4
This also removes the max-old-space-size definition I previously set.
delanni helped me understand that we're spawning a tsc process with a
memory limit already defined.
Currently on CI, the precommit_hook will fix lint warnings against the
most recent commit. When multiple commits are pushed up at once, lint
warnings on earlier commits may go unnoticed until they are squashed and
merged. The on-merge pipeline will fail due to changed files, and pull
requests based on the squashed commit will see unrelated changes
auto-fixed.
This removes the --fix flag from the precommit hook check.
Closes https://github.com/elastic/kibana/issues/169966
Fixes https://github.com/elastic/kibana/issues/153788
## Summary
This PR fixes the a11y issue in the "Create policy" form for the two
"Expiration" fields.
**Before:**
<img width="1674" alt="Screenshot 2023-10-24 at 12 06 03"
src="8ac5d406-8b84-418c-a327-7edf2d8dac3d">
**After:**
<img width="1674" alt="Screenshot 2023-10-24 at 12 06 35"
src="e09689c6-8d0c-43a9-9e97-b63cca2d060d">
The aria-labels can also be tested with a screen reader (e.g. VoiceOver
on Mac).
## Summary
This changes how serverless breadcrumbs are implemented in Discover. It
simplifies the current implementation and also fixes an issue with
"Discover" breadcrumb missing context from it's URL (see
https://github.com/elastic/kibana/pull/163607#pullrequestreview-1574271316)
Instead of using `serverless.setBreadcrums` API for deeper context
serverless breadcrumb, this PR adds `deepLinkId` to base discover
breadcrumb. Based on this id the navigational breadcrumbs are merged
with the regular breadcrumbs set in `chrome.setBreadcrumbs`). (This
feature was implemented here:
https://github.com/elastic/kibana/pull/169513)
This PR also improves "Discover" breadcrumb in oblt project when
navigated from logs explorer to discover by adding "discover" to the
navigation tree and hiding it from side nav.

closes https://github.com/elastic/kibana/issues/169375
## Summary
This PR fixes the problem that can happen while the auto-refresh is
turned on in the Asset Details flyout
59c57e03-7757-4024-86c1-614ae0d98e6f
The solution here was based on how dashboards handle the auto-refresh.
It has to work so that new requests can only be made after ongoing
requests are finished. The refresh rate, therefore, doesn't mean that
every Xs new request will be made, but rather that new requests will be
made after Xs since the requests responded.
To resolve this, a new context named `LoadingStateProvider` has been
introduced. It serves to monitor ongoing loading processes and regulate
when new requests can be initiated. The `useRequestObservable` hook has
been added to allow the `LoadingStateProvider` to observe request
statuses
Both heavily rely on `rxjs` as it was the most logical solution to use
for this. rxjs can be confusing, so I tried to add as many comments as
possible to help comprehension and maintenance.
This change solves the loading problem on the Overview, Metadata,
Processes and Anomalies tabs
### Out of scope
This change does not affect Embeddables, as they do not provide a means
to observe request statuses. Therefore, they may still encounter
potential issues with endless loading loops.
### Additional changes
While working on it I realized we were not properly using Lens. Based on
the
[example](https://github.com/elastic/kibana/blob/main/x-pack/examples/embedded_lens_example/public/app.tsx#L256)
provided by them, we should be passing the `searchSessionId`. The
`searchSessionId` also allows us to force new searches. So I replaced
the `lastReloadTimestamp` with that in both the Asset Details and Hosts
pages.
### How to test
- Setup a local Kibana instance
- Navigate to `Infrastructure`
- Click on a host to open the flyout
- Turn the auto-refresh on. Setting the refresh rate to 1s will already
validate the fix
- Try wider date ranges and shorter refresh rates
---------
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
## Summary
This PR deals with serverless tests that are flaky when running in MKI:
* Search bar tests have been stabilized by adding a wait for global
loading before interacting with the search feature
* Summary actions API tests have been skipped for MKI runs again as the
fix didn't fully work
## Summary
These changes fixes the issue where user is not able to create/edit an
exception after an error has been displayed. That happens due to not
re-setting loading state to `false` on exception being thrown.
Addressing https://github.com/elastic/kibana/issues/168217
Fixes https://github.com/elastic/kibana/issues/154418
## Summary
This PR improves a11y of the tooltips in the Management nav bar by
replacing `EuiToolTip` with `EuiIconTip`:
- The tooltips are now accessible by keyboard navigation only (pressing
TAB) - see video below.
- The tooltip icons are slightly bigger and more visible.
12f85657-074a-41cf-b6e6-73bbbe0393be
<img width="1922" alt="Screenshot 2023-10-24 at 13 57 20"
src="87fb5273-918f-4961-932d-d954ecda4404">
## 📓 Summary
Closes#169394
This PR extends the `flyout` customization extension point to support
updating/replacing the content shown in the document flyout.
A consumer would need to show/hide/highlight details related to the
expanded document, and it might also want to control whether the default
content (currently only the UnifiedDocViewer) is shown/hidden. Finally,
it could be necessary to perform imperative actions such as
adding/removing columns or filter.
To get this flexibility at the moment of customizing the content, the
existing extension point takes now a `Content` component, where some
props are injected.
```
export interface FlyoutContentProps {
actions: {
setFilter?: DocViewFilterFn;
addColumn: (column: string) => void;
removeColumn: (column: string) => void;
};
doc: DataTableRecord;
renderDefaultContent: () => React.ReactNode;
}
```
N.B. `renderDefaultContent` is passed as a function instead of a React
element to avoid its creation in the Discover flyout in case the
consumer doesn't want to display it.
Here is a usage example of the new extension point property.
```
customizations.set({
id: 'flyout',
Content: ({ actions, doc, renderDefaultContent }) => {
return (
<Panel>
<HighlightComponent timestamp={doc.flattened['@timestamp']} />
<Columns onAddColumn={actions.addColumns} onAddColumn={actions.removeColumn} />
<Filters onFilter={actions.setFilter} />
{renderDefaultContent()}
</Panel>
);
},
});
```
---------
Co-authored-by: Marco Antonio Ghiani <marcoantonio.ghiani@elastic.co>
## Summary
Continuation on: #167980
Now that we have the snapshots created for merges, we can compare the
existing snapshots.
This PR creates a CLI for grabbing and comparing these snapshots.
The CLI looks like this:
```
node scripts/snapshot_plugin_types compare --from <rev|filename|url> --to <rev|filename|url> [--outputPath <outputPath>]
Compares two Saved Object snapshot files based on hashes, filenames or urls.
Options:
--from The source snapshot to compare from. Can be a revision, filename or url.
--to The target snapshot to compare to. Can be a revision, filename or url.
--outputPath The path to write the comparison report to. If omitted, raw JSON will be output to stdout.
--verbose, -v Log verbosely
```
## Summary
- addresses https://github.com/elastic/security-docs/issues/4069
- changes text .lists, .items indices to .lists, .items data streams
### Before

### After
<img width="2560" alt="Screenshot 2023-10-26 at 10 58 18"
src="93fff167-c6a7-437e-9618-7724a4249872">
## Summary
Fix https://github.com/elastic/kibana/issues/169737
use `sha-256` instead of `md5` when hashing the translation files.
As discussed in the issue, those hash aren't checked against anywhere,
and just used in telemetry to know if customers are using custom
translation files.
## Summary
Close https://github.com/elastic/kibana/issues/161447
This fixes deeper context breadcrumbs in serverless observability
project for alerts and slos apps.
This builds on top of https://github.com/elastic/kibana/pull/169513
where we added merging of navigational project breadcrumbs with deeper
context breadcrumbs set by `chrome.setBreadcrumbs`. The merging is based
on deepLinkId, so we're adding it to base breadcrumbs. The deepLinkId is
type checked.


## Summary
The documentation for the instrumentation of Kibana listed a lot of
settings to apply. Most of them are not needed since we have good
defaults for the agents. Additional information like
`labels.deploymentId` are automatically appended in case of usage with
ECE.
### Checklist
Delete any items that are not applicable to this PR.
- [x]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
### 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#kibana-release-notes-process)
## Summary
After testing in the latest BC these three tweaks were identified:
- [X] Set k value to 10 so more documents are returned (since ESQL KB
docs are broken up by function and can be small)
- [X] Adds Quick Prompt to aid in ESQL Query Generation that only shows
if KB is enabled