## Summary
This PR introduces two changes:
(1) Refactors the handler resolution logic to _not_ depend on the
`--serverless` cli arg by adding a new piece of config
`server.versioned.routeResolution` that accepts `newest | oldest`. This
piece of config is passed down instead of the `serverless` cli arg as
well as updating test cases
(2) Adds a new piece of config to turn off the client version checking.
This will be needed for rolling upgrades to allow old browser traffic to
reach new Kibana servers when there is stack version change.
Close https://github.com/elastic/kibana/issues/158723
## Open questions
* Do we want to make the version check still take _major_ version bumps
into account?
## Summary
Partially address https://github.com/elastic/kibana/issues/158835, add
cloud chat (drift) to more places: all management pages and
home/getting_started page
I hit an issue that both management and home couldn't depend directly on
`cloudChat` plugin. Here is the issue with more details
https://github.com/elastic/kibana/issues/159008. I worked around with
creating an intermediate `cloudChatProvider` plugin.


How do I run drift locally?
Add this to kibana.yml
```
xpack.cloud.id: "some-id"
xpack.cloud.trial_end_date: "2023-06-21T00:00:00.000Z"
xpack.cloud_integrations.chat.enabled: true
xpack.cloud_integrations.chat.chatURL: "https://elasticcloud-production-chat-us-east-1.s3.amazonaws.com/drift-iframe.html"
xpack.cloud_integrations.chat.chatIdentitySecret: "some-secret" (get it from drift console)
```
You need to have access to our drift account. But I tested with a custom
account. To change account id I had to point
`xpack.cloud_integrations.chat.chatURL` to a script with custom drift
id.
## Summary
Fixes#157900
Goal of this PR:
* simplify Metric formatting logic (only duration formats are now
"enhanced")
* add a new `Compact` option for the existing Lens formatters (Bytes and
Bits excluded as they compact already)
<img width="323" alt="Screenshot 2023-05-25 at 15 54 05"
src="3da299fe-e770-4a84-a0b4-6f935f06fe16">
* provide a full custom formatter based on numeral.js
<img width="1223" alt="Screenshot 2023-05-25 at 17 06 23"
src="5ce578c3-ef84-4176-9700-fecf6b55738e">
<img width="1215" alt="Screenshot 2023-05-25 at 17 06 15"
src="b93385ec-28b3-46cd-b9fd-2090abd6f233">
<img width="1224" alt="Screenshot 2023-05-25 at 17 06 08"
src="8c731a11-dc74-4b96-91f2-b2db7ca2fa2b">
<img width="1221" alt="Screenshot 2023-05-25 at 16 05 49"
src="a8786bd7-a2ab-4e04-8952-dc3d31e4afc2">
<img width="1223" alt="Screenshot 2023-05-25 at 16 05 40"
src="b6b5af8e-4109-48b6-b5a3-c8526ad628df">
<img width="1219" alt="Screenshot 2023-05-25 at 16 05 30"
src="405bbb01-359c-4981-84b0-8c68c0b59e8e">
<img width="1220" alt="Screenshot 2023-05-25 at 16 05 16"
src="d8350036-30c4-41db-8421-55874f0278b7">
<details>
<summary>Previous migration changes - removed now</summary>
## Migration changes
The tricky part here comes with the format migration for the new metric,
as there's no easy way to detect what `"Default"` means, not having
access to field formatters during migrations.
There are two possibilities, as far as I can see, on the topic:
1. when `default` format is detected, assume it's a `number` format with
the `compact` feature turned on
2. when `default` format is detected, assume nothing and let the Kibana
default format go on (no compact)
In this PR I've implemented the 2nd migration strategy.
Here's a visual example of the problem.
#### Original dashboard
<img width="964" alt="Screenshot 2023-05-26 at 15 51 01"
src="703936b7-6232-46fc-a8cc-88a483ec1d01">
#### Option 1
<img width="1113" alt="Screenshot 2023-05-26 at 15 52 08"
src="d7ffe317-7d9c-49e3-ba86-849e2128df97">
#### Option 2 (implemented)
<img width="1113" alt="Screenshot 2023-05-26 at 15 53 48"
src="0c248b0a-3a4d-4fce-9d09-3ddffc1b5527">
</details>
### Release notes
Default format in Lens will apply dataView field format as usual now in
new Metric visualization.
### Checklist
Delete any items that are not applicable to this PR.
- [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]
[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] Any UI touched in this PR is usable by keyboard only (learn more
about [keyboard accessibility](https://webaim.org/techniques/keyboard/))
- [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
- [x] 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: Stratoula Kalafateli <efstratia.kalafateli@elastic.co>
## Summary
Close https://github.com/elastic/kibana/issues/155506
<img width="971" alt="Screenshot 2023-06-12 at 17 11 18"
src="7522bcba-e3aa-4229-93b2-27d12a335426">
I didn't introduce any custom colors here but just used built-in token
types for highlighting (`string` for red and `variable` for blue)
## Summary
Version alllll the data view routes.
Best viewed with whitespace hidden -
https://github.com/elastic/kibana/pull/158608/files?diff=unified&w=1
In this PR:
- All REST (public and internal) routes are versioned
- Internal routes are called with version specified
- Internal and public routes are now stored in directories labeled as
such
- All routes have a response schema
- All responses are typed with `response` types, separate from internal
api types. This is to help prevent unacknowledged changes to the api.
- Moves some functional tests from js => ts
For follow up PRs:
- Move to `internal` path for internal routes
- Proper typing and schema for `fields_for_wildcard` filter
Closes https://github.com/elastic/kibana/issues/157099
Closes https://github.com/elastic/kibana/issues/157100
---------
Co-authored-by: Julia Rechkunova <julia.rechkunova@gmail.com>
Part of https://github.com/elastic/kibana/issues/154307
Add convert to lens logic for tag cloud visualization
---------
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Stratoula Kalafateli <efstratia.kalafateli@elastic.co>
Fixes#159116
## Summary
- Add the new `category` field to cases.
- Update the types to take `category` into account.
- Update `transforms` to return a default value for `category`.
---------
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
## Summary
Closes https://github.com/elastic/kibana/issues/158232
Fixes the wrap problem in filter selection modal when the text
field/value is very long
<img width="956" alt="image"
src="beda8e16-6302-4d7e-aa84-0b6884891ccc">
## Summary
Consider taking the following steps:
1. Create a new dashboard and save it
2. Add a control and, without saving,
3. Reset the changes to the dashboard
### Before
Before this PR, we were not updating the control group input if the
`lastSavedControlGroupInput` was `undefined` (which only happens when a
dashboard has **never** been saved with any controls and/or edits to the
control group settings) - this caused a problem when trying to reset a
dashboard from having controls back to the state where
`lastSavedControlGroupInput` was `undefined` because the **dashboard's**
input would get updated as expected (i.e. the dashboard would think it
no longer has any controls), but the control group's input wouldn't get
updated (i.e. the control group would think it **still has** controls).
Because of this discrepancy, the control would stick around until you
refreshed the dashboard:
c9da58dc-3373-493d-9bba-5d2540c19560
### After
Now, after this PR, I fixed this by resetting back to the default
control group input if `lastSavedControlGroupInput` is `undefined` on
reset:
e41838e6-6dbe-47a1-bea7-28f20eddcf80
### Checklist
- [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)
## Summary
### NOTE: This is a draft PR to MVP the new rule combination
(Threshold). More PRs to follow up
It fixes https://github.com/elastic/kibana/issues/158260 by providing
the _new_ **Threshold rule**
It fixes https://github.com/elastic/kibana/issues/159326
<img width="586" alt="Screenshot 2023-05-30 at 17 55 32"
src="0e485266-d93f-442e-81f4-77aa673ed497">
## ✅ Done
- [x] Clone the Metric threshold and update the imports
- [x] The rule is listed in the rule creation flyout with its params and
preview charts
- [x] Working Rule registry
- [x] Working Rule executor
- [x] Working feature id in the rule registry
- [x] Working alerts table and alert summary
- [x] Use DataView instead of the Metrics indices under settings
- [x] Update the i18n keys
- [x] Fix/Update failing checks/tests. Green CI ✅
- [x] Hide it behind a feature flag
`xpack.observability.unsafe.thresholdRule.enabled`
## 🏗️ To be done (could be irrelevant, or create a separate issue for
it):
- [ ] <del> Remove the `metrics` word </del>
- [ ] <del> Update file and variable names to match the new rule
context.</del>
- [ ] <del> Rearrange files, constants, and exports </del>
## 🎯 DoD
Having the rule working like the Metric threshold one and seeing its
related alerts.
---------
## Summary
Fixes#143493
* Add the switch control in Layer Settings
* [x] Make sure it does not duplicate on Annotation Layer Settings
* [x] Data Layers
* [x] Reference line layers
* [x] Extended dataView picker to support multiple icons
* [x] Added unit tests
* [x] Functional tests
<img width="351" alt="Screenshot 2023-06-07 at 15 28 19"
src="00dc5523-0bec-4e9c-b1d0-4d36804b29f9">
<img width="340" alt="Screenshot 2023-06-07 at 15 31 31"
src="d36ca147-5d8c-4123-9be3-2932844cbd15">
<img width="331" alt="Screenshot 2023-06-07 at 15 28 25"
src="c7d4f166-b8ab-4439-a83c-debf82b913ad">
<img width="324" alt="Screenshot 2023-06-07 at 15 27 59"
src="3738a7e0-6e49-4e22-b857-965a953b4b84">
<img width="323" alt="Screenshot 2023-06-07 at 15 27 53"
src="5965bf1c-0e25-4c0e-b54f-fa315157fd44">
* Create `IgnoreGlobalFilter` shared component folder
* [x] Layer setting control component
* [x] Info badge component
* Extends `esaggs_fn` to support the flag
* [x] Avoid to pass the filter to the handler if set
* [x] Add unit tests
* Notification badges
* [x] Extends the badge component in Embeddable to support grouped
messages
* [x] Added unit tests
<img width="750" alt="Screenshot 2023-06-07 at 15 31 39"
src="01bf8203-9133-4429-9b79-17ec67613c7e">
<img width="828" alt="Screenshot 2023-06-07 at 15 30 57"
src="9acb78f2-d061-4225-a4af-b3a66e7454fc">
<img width="756" alt="Screenshot 2023-06-07 at 15 27 43"
src="b9f79aed-7c02-4060-9c0f-61f438dc031d">
* Add support for Open in Lens
* [x] Add unit tests for each converter
* [x] Functional tests
### Checklist
Delete any items that are not applicable to this PR.
- [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]
[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] Any UI touched in this PR is usable by keyboard only (learn more
about [keyboard accessibility](https://webaim.org/techniques/keyboard/))
- [x] This was checked for [cross-browser
compatibility](https://www.elastic.co/support/matrix#matrix_browsers)
---------
Co-authored-by: Stratoula Kalafateli <efstratia.kalafateli@elastic.co>
## Summary
Adds a save to dashboard functionality in the Lens charts created in
Discover by text based languages.
<img width="1738" alt="image"
src="c4b5f459-1124-4800-954f-298332601eaf">
<img width="832" alt="image"
src="ae742d0a-5911-4622-8387-60db87daffcc">
We allow only saving by value panels and not by reference because we are
going to remove this functionality in the next minor (create Lens text
based languages SOs).
### 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)
- [ ] [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/))
Closes#155137, with some extra reorganisation, modularisation and unit
tests.
### Refactors to `maybeAddConfig`
### Refactoring serve.js <-> bootstrap.ts
### Unit tests for `compileConfigStack`
---------
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Related to https://github.com/elastic/kibana/issues/155728
This PR updates the guide panel so that the "Continue to Elastic" button
is visible as described in related issue.
### Screenshots
<img width="1149" alt="Screenshot 2023-06-07 at 12 42 17"
src="eb7dbdba-00e3-4ef1-9033-b09c1fb8bb44">
### Mobile
<img width="381" alt="Screenshot 2023-06-07 at 12 44 28"
src="3b883dc9-a0ce-4fc9-95d2-f359d7fdf718">
Since the only way to reach logs onboarding is manually entering the url
it has been decided to enabled this plugin by default.
In serverless it was already enabled by default through the config.
## Summary
Makes version headers required for internal endpoints. We also require
version headers for public endpoints when in dev mode.
### Note to reviewers
This PR is a re-revert of the original
https://github.com/elastic/kibana/pull/158667 with some minor additions
(see comments).
The original was reverted due to failing Cypress tests blocking Kibana
promotion for 8.8.1 (CC @stephmilovic,
https://github.com/elastic/kibana/pull/158961)
Not sending headers to versioned, internal endpoints will return 400!
Due to the somewhat sensitive nature of this change, I went through all
of the existing `.versioned` endpoints and tried to ensure that for
_internal_ endpoints we send through a version as this is now
**required**.
I would greatly appreciate it if code owners could check their code,
think of any existing consumers of your versioned endpoints and ensure
they are sending a version.
Closes https://github.com/elastic/kibana/issues/158722
---------
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Patryk Kopycinski <contact@patrykkopycinski.com>
## Summary
adds specs for search application and analytics collections apis
-
[`spec_to_console`](https://github.com/elastic/kibana/tree/main/packages/kbn-spec-to-console)
for generated specs
- overrides for body params and some other overrides
ddbdbe2d-0950-4aac-967e-cb376334b2a5
#### Release notes
> Dev Tools console now has autocomplete support for Search Application
and Behavioral Analytics APIs
## Summary
Closes https://github.com/elastic/kibana/issues/158894
Now there is no connection between dataviews and text based mode. In the
background we still creating adhoc dataviews but this is because of our
architecture and not something we want to propagate to the users. For
this reason we hide these dataviews from the dataview picker for the
text based mode
<img width="859" alt="image"
src="0b4f1a69-3218-45bd-8001-1682ab0f7a20">
Closes https://github.com/elastic/kibana/issues/157157
Closes https://github.com/elastic/kibana/issues/152921
## Summary
The primary goal of this PR is to introduce an option for wildcard
("contains") searching to the options list control:
6847d0c5-014a-4322-8e59-308bc3ca27aa
### New Flyout Design
However, since this required adding a radio group to the custom options
list settings in the create/edit control flyout, I also made some
changes to the flyout design in order to better accommodate this (we
were previously using `EuiSwitch` components for the
control-type-specific settings, which did not work in this case because
I wanted to be able to add a tooltip to describe each search type):
| Before | After |
|--------|-------|
| 
| 
|
Note in the above GIFs that, since I was using an `EuiRadioGroup` for
the search technique setting, I decided it made more sense + was more
consistent for the "Allow multiple selections in dropdown" to also be
converted to a radio group rather than a switch. The "Ignore timeout for
results" setting is the only one that remained a switch in the new
design:
| Before | After |
|--------|-------|
|

|

|
### `EuiSwitch` with Tooltip Bug
As part of this redesign, I also fixed a very quick bug where, because
the old `SwitchWithTooltip` was defined **inside** the larger
`OptionsListEditorOptions` component, any state update on
`OptionsListEditorOptions` would cause `SwitchWithTooltip` to **also**
be re-rendered - this caused the "slide" animation to be interrupted on
click:
| Before | After |
|--------|-------|
|

|

|
### Title Bug Fix
And, since I was making so many changes to the flyout code as part of
refactoring the code (including the design changes above), I also fixed
a bug with control titles where things weren't getting set properly. To
test this, consider taking the following steps:
1. Create a new options list control, keeping the default title
2. Edit that options list control and change it to a range slider
control by selecting a number field
3. Notice that...
- Before this PR, the title gets completely cleared:
<br>
- After this PR, the default title gets updated to the range slider
field name:
<br>
4. Delete that range slider control and create a new control, keeping
the default title once again (options list or range slider, the type
doesn't matter).
5. Edit the control and change the field to a different field **of the
same type** (i.e. if your control from step 4 was an options list
control, select a field that keeps it as an options list control).
Before saving your changes, notice that the "default title" in the
`Label` input gets updated to the new field title:<br>
<img width="450"
src="0fabe2e3-7f83-4f2a-87e6-33253652972d"/><br>
6. After saving, notice that...
- Before this PR, the title doesn't actually get updated to the new
default title:
<br>
- After this PR, the title gets updated as expected:
<br>
### Flaky Test Runner
[test/functional/apps/dashboard_elements/controls/options_list/options_list_suggestions.ts](https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/2343):
<img
src="f2ed9d65-adcf-47af-bb00-ee11837c406b"/>
### 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))
- [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
Add a disabled text to date picker when the text based languages is on
disabled state.
<img width="1742" alt="image"
src="e5c544bf-ccac-46c7-a76c-88e877fdb37b">
### 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
## Summary
Fixes#151827, Fixes#117548
This PR contains constant function features in Lens formula:
* direct exposure of the `time_range()` - as suggested in #117548)
<img width="297" alt="Screenshot 2023-05-29 at 12 05 43"
src="8dbd63a6-c5ec-4177-a4a2-cc0770a495bc">
* `interval()` (as intended in #151827)
<img width="359" alt="Screenshot 2023-05-29 at 12 04 18"
src="8c3a4637-bd23-4b4d-8a5f-36853ccbfee3">
* and `now()` (as suggested in
[here](https://github.com/elastic/kibana/issues/112851#issuecomment-1183175053))
functions in the formula input
<img width="364" alt="Screenshot 2023-05-25 at 14 30 14"
src="2137717b-44a0-4531-bcc2-1fbda40368ba">
A visual explanation of what each constant represent:
<img width="677" alt="Screenshot 2023-05-29 at 11 56 16"
src="b7b7e92c-b061-4cce-a77e-e7baeab323a8">
Documentation:
<img width="546" alt="Screenshot 2023-05-31 at 12 59 40"
src="1fea7e88-6e4f-4958-949f-6b71a770cd44">
Some example usage
<img width="683" alt="Screenshot 2023-05-25 at 13 33 26"
src="e03442ab-0062-4999-8a38-c00a66b3b13b">
TSVB => Lens with `params._interval` support:

**Notes**:
* context values work like static values, with the same limits,
therefore it is not possible to build a date histogram with a context
value alone (i.e. a formula with only `interval()` or `now()`). It works
ok without the `Date Histogram` dimension.
* The `interval()` function will report an error if used without a
configured `Date Histogram` dimension:
<img width="671" alt="Screenshot 2023-05-29 at 12 14 13"
src="ca67f102-35bb-4e4d-ab16-15d1be4cadcc">
* The `interval()` function does not take into account different bucket
interval size (i.e. DST changes, leap years, etc...), rather return the
same value to all the buckets. This is the same behaviour as in TSVB,
but in Lens it can be a problem due to the usage of `calendar_interval`.
* I had to duplicate a couple of function from the helpers to avoid
issues with tests. I've tried a different organization of the helpers
(between pure vs impure fns) but that took longer than expected, so I
would defer this task later in another PR.
<details>
<summary>General approach with `constant(...)` removed</summary>
* a more general approach using `constants(value="...")`
<img width="301" alt="Screenshot 2023-05-29 at 12 07 23"
src="0a800aa4-8db5-4055-996d-344d37adfc01">
</details>
A cloud deployment has been created to test both approaches here. Let me
know which one do you prefer cc @elastic/kibana-visualizations
### 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
- [ ] 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)
---------
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Stratoula Kalafateli <efstratia.kalafateli@elastic.co>
## Summary
Fixes https://github.com/elastic/kibana/issues/16139
This PR adds a setting in Console that allows to disable the a11y
overlay. The default will be set to `enabled` so that the default
behaviour should not change. A user can disable the overlay in their
browser and the setting is saved in local storage. So that other users
are not affected by that change.
The reason to allow disabling the overlay is that it can be flaky and
sometimes it's displayed when not intended. The code relies on
`querySelector` (see this
[file](1b3f23829c/src/plugins/es_ui_shared/__packages_do_not_import__/ace/use_ui_ace_keyboard_mode.tsx (L25)))
so I think that causes the flakiness and that is very difficult to test
reliably.
### Screenshot
#### A11y overlay (no changes)
<img width="1483" alt="Screenshot 2023-06-01 at 16 34 23"
src="d776625c-92cd-4bd9-8e5e-2f672df351a4">
#### Settings modal with the new option to disable the a11y overlay
<img width="474" alt="Screenshot 2023-06-01 at 16 29 02"
src="8745c7a0-62f4-41a9-9eff-ff8bebd4f767">
#### How to test
1. Start Kibana and navigate to the Console
2. Press ESC when textarea is focused and now autocomplete popup is
displayed to see the a11y overlay
3. Open the Settings modal and disable the a11y overlay
4. Press ESC in the textarea again to see that no overlay is now
displayed
5. Check that the value is persisted in the local storage
Flaky test runner
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/2346
### 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
## Summary
Fixes: #155154 (introduced in #149878), builds on #155436 .
- Adds tests to ensure the configuration merging order, check those for
reference.
- Updates the README to explain the intention
For the tests, I needed to output something to the logs. I hope it's not
a big issue to log it. If needed, I might hide that behind a verbose- or
feature flag.
### 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: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
## Summary
- Saved searches use content management api
- Saved search plugin provides proper plugin api instead of static
exports
- Discover no longer re-exports static content from saved search plugin
- ML no longer works directly with the saved search saved object
- saved object conflicts are thrown via the api, rather than the api
consumer
- Content management api logs failed requests a bit better, helpful for
tests failing in CI
Closes https://github.com/elastic/kibana/issues/157078
---------
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
## Summary
Closes https://github.com/elastic/kibana/issues/158343
Fixes the broken reference line in aggbased xy charts.
<img width="1715" alt="image"
src="ae48f0b8-475a-44e2-866a-c56e9da8e8b0">
The problem was the default here, apparently the expressions fail when
the default is an empty string. The expression was failing and as a
result the reference line was never rendered
### Checklist
- [ ] [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
Part of https://github.com/elastic/kibana/issues/154307
### Test
* Start kibana with `yarn start --serverless=es`
* set the following yaml configuration values
```
input_control_vis.readOnly: true
```
---------
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>