Closes https://github.com/elastic/kibana/issues/156430
## Summary
The only reason a control embeddable should enter a fatal error state is
if, for some reason, the embeddable actually cannot be created (for
example, trying to create a control with a type that doesn't exist) -
every other error should be considered **recoverable** as much as
possible. So, this PR ensures that both the options list and the range
slider are able to recover from most errors by switching from calling
`onFatalError` to instead handling most errors internally via component
state.
> **Note**
> The time slider control does not have any errors that would be
considered "recoverable" because it is actually **much more difficult**
to enter an error state for this control; so, I did not need to change
anything for this control type.
### Errors:
- **Recoverable error:**
- **Before:**
7737a3e8-1c97-47ba-92ab-55f5e1a6c30a
- **After:**
e4ced721-2b84-497e-8608-965877409bf5
- **Unrecoverable error:**
To test this, I've created a dashboard saved object with a control type
that does not exist:
[controlTypeDoesNotExistDashboard.ndjson.zip](11547128/controlTypeDoesNotExistDashboard.ndjson.zip).
Try importing this dashboard and ensure that you can actually see an
error unlike the "before" state:
- **Before:**

- **After:**

### Flaky Test Runner
- [Options list dashboard interavction
(`test/functional/apps/dashboard_elements/controls/options_list/options_list_dashboard_interaction.ts`)](https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/2316)

- [Range slider
(`test/functional/apps/dashboard_elements/controls/range_slider.ts`)](https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/2317)

### 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
- [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)
## 📓 Summary
Closes#157042
After the implementation of
https://github.com/elastic/kibana/pull/156837, we are now able to limit
the `logs.app_target` configuration to be accepted only in a serverless
environment, otherwise, it'll not be accepted.
Since we still need to use a default fallback value for the logs UI app,
the fallback will be applied internally when looking for this config, to
keep the original behaviour unchanged.
## 🧪 Testing
### Serverless environment
- Start Elasticsearch with `yarn es snapshot` and Kibana with `yarn
serverless-oblt`
- Verify that when navigating to Logs pages through the sidebar links or
directly accessing the url `/app/logs` it redirects to discover.
### Normal environment
- Start Elasticsearch with `yarn es snapshot` and Kibana with `yarn
start`
- Verify that when navigating to Logs pages through the sidebar links or
directly accessing the url `/app/logs` the log stream is rendered
correctly.
### Limited to serverless env
To verify that the configuration is only accepted under a serverless
context, set into your kibana.yml or `kibana.dev.yml` the configuration
```yml
xpack.infra.logs.app_target: discover
```
and verify that it triggers a validation error when running Kibana.
---------
Co-authored-by: Marco Antonio Ghiani <marcoantonio.ghiani@elastic.co>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
- Closes https://github.com/elastic/kibana/issues/147885
- Closes https://github.com/elastic/kibana/issues/157109
## Summary
**Before:**
Unified Field List plugin has internal routes (wrappers for client code)
which exist only to run api functional tests against them:
- `/api/unified_field_list/existing_fields/{dataViewId}`
- `/api/unified_field_list/field_stats`
Client code does not call these routes directly. So there is no reason
in keeping and versioning them.
**After:**
- Internal routes are removed
- A new "Unified Field List Examples" page was created
http://localhost:5601/app/unifiedFieldListExamples
- API functional tests (which used the routes) were converted to
functional tests against this new example page
- Created a new `unifiedFieldList` page object which is used now in
functional tests (methods are extracted from existing `discover` page
object).
**For testing:**
Steps:
1. Run Kibana with examples: `yarn start --run-examples`
2. Install sample data
3. And navigate to Developer Examples > Unified Field List Examples
page.

### 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
Closes https://github.com/elastic/kibana/issues/154334
This PR:
- make the text based languages to work with adhoc dataviews and not
permanent dataviews. The text based languages will not be related with
dataviews
- enables the timepicker always for text based languages
- the timepicker is disabled if the index pattern doesn't have an
@timestamp field
- the timepicker is enabled if the index pattern has an @timestamp field
- the timepicker is enabled if the index pattern doesn't have an
@timestamp field but there is a dirty state (user is writing the query
and hasn't hit the update button. We do that to give the user the
ability to change the timepicker with the query
- An info text has been added to the editor footer to inform the users
about the @timestamp existence
The timepicker in the disabled state needs to have a disabled status
text (All time) but this is not possible atm. I have created an issue to
eui https://github.com/elastic/eui/issues/6814 to add this property.
This is going to be tackled before the 8.9 FF but we don't want to block
this PR
<img width="1839" alt="image"
src="8fc0a492-1f00-41b6-a4a6-b0527725931f">
### 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
---------
Co-authored-by: Stratoula Kalafateli <efstratia.kalafateli@elastic.co>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
## Summary
With Firefox update to v113 on our CI workers, we noticed that tests are
run slower and more often fail with timeouts.
Unfortunately our auto-skip functionality skip the test suite
completely, meaning it won't run on Chrome as well.
This PR unskips the firefox failed test to run on Chrome, I also fix the
labels for some suites to run only sub set of tests for now.
part of https://github.com/elastic/kibana/issues/154307
PR adds ability to put TSVB into read only mode - preventing TSVB
visualizations from being created and edited.
To test:
* start kibana with `yarn start --serverless=es`
* add `vis_type_timeseries.readOnly: true` to kibana.yml
Visualization public plugin changes:
* Removes `hideTypes` from VisualizationSetup contract. Used by Maps
plugin to set "hidden" to true for tile_map and region_map visualization
types. In 8.0, tile_map and region_map visualization type registration
moved into maps plugin so `hideTypes` no longer needed.
* Renamed vis type definition `hidden` to `disableCreate`.
* Added `disableEdit` to vis type definition.
* Hide edit link in dashboard panel options when `disableEdit` is true
* Does not display links and edit action in listing table when
`disableEdit` is true
Visualization server plugin changes:
* Add `readOnlyVisType` registry to set up contract
* Update visualization savedObject.management.getInAppUrl to return
undefined when vis type has been registered as readOnly.
* Prevents "readOnly "visualization types from being displayed in global
search results
* Prevents "readOnly "visualization types from having links in saved
object management listing table.
Timeseries server plugin changes:
* Add `readOnly` yaml configuration
* Expose `readOnly` yaml configuration to public
* When `readOnly` is true, call
VisualizationsServerSetup.registerReadOnlyVisType to mark vis type as
read only
Timeseries public plugin changes:
* Set disableCreate and disableEdit to true when `readOnly` is true
---------
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Stratoula Kalafateli <efstratia.kalafateli@elastic.co>
Partially addresses https://github.com/elastic/kibana/issues/157756
## Summary
This PR makes the UI of the following Security apps disable-able for
serverless:
- Users
- Roles
- Role Mappings
**How to test:**
1. Start Elasticsearch with `yarn es snapshot` and Kibana with yarn
`serverless-{mode}` where `{mode}` can be `es`, `security`, or `oblt`.
2. Verify that the Users app is not accessible and its path
(`management/security/users`) leads to the Stack Management landing
page.
3. Verify that the Roles app is not accessible and its path
(`management/security/roles`) leads to the Stack Management landing
page.
4. Verify that the Role Mappings app is not accessible and its path
(`management/security/role_mappings`) leads to the Stack Management
landing page.
Test the Security apps in regular (non-serverless) mode:
1. Start Elasticsearch with `yarn es snapshot` and Kibana with `yarn
start`.
2. Verify that Users, Roles, and Role Mappings apps work as expected.
## Summary
Closes https://github.com/elastic/kibana/issues/154330
This PR:
- Moves the editor from unified-search to a standalone package
- The editor has now a core ui settings dependency but is going to have
an expressions dependency too when merged with the ESQL branch
- Adds a new plugin (text-based-languages) which is used to pass the
dependencies on the package. The user can either use this plugin without
giving any dependencies or use the package with passing the dependecies
on the KibanaContextProvider.
- Adds storybook for the editor (I used the mdx stories as we did on the
random sampling package)
<img width="1668" alt="image"
src="763a3112-1ae5-49bb-81f3-acd02892e402">
### Checklist
- [x]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
---------
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
## Summary
This PR adds boilerplate code and a few initial end-to-end tests to
serverless plugins.
Note that the tests defined in this PR are not part of any CI run yet,
this will be done in a follow-up after this PR is merged.
### Details
The serverless test structure corresponds to what we have in
`x-pack/test` with API tests in `api_integration` and UI tests in
`functional`, each with their set of helper methods and sub-directories
for
- `common` functionality shared across serverless projects (core, shared
UX, ...)
- `observability` project specific functionality
- `search` project specific functionality
- `security` project specific functionality
The `shared` directory contains fixtures, services, ... that are shared
across `api_integration` abd `functional` tests.
```
x-pack/test_serverless/
├─ api_integration
│ ├─ services
│ ├─ test_suites
│ │ ├─ common
│ │ ├─ observability
│ │ ├─ search
│ │ ├─ security
├─ functional
│ ├─ page_objects
│ ├─ services
│ ├─ test_suites
│ │ ├─ common
│ │ ├─ observability
│ │ ├─ search
│ │ ├─ security
├─ shared
│ ├─ services
│ ├─ types
```
See also `x-pack/test_serverless/README.md`
### Run tests
Similar to how functional tests are run in `x-pack/test`, you can point
the functional tests server and test runner to config files in this
`x-pack/test_serverless` directory, e.g. from the `x-pack` directory
run:
```
node scripts/functional_tests_server.js --config test_serverless/api_integration/test_suites/common/config.ts
```
and
```
node scripts/functional_test_runner.js --config test_serverless/api_integration/test_suites/common/config.ts
```
### Additional changes
- The stateful `common_page` page object used the existence of the
global nav to determine `isChromeVisible` and `isChromeHidden`, which is
not working when the global nav is disabled. To solve this, a
`data-test-subj` that indicates the chrome visible state is added to the
Kibana app wrapper and is used for the checks.
- Add a few `data-test-subj` entries to the Observability overview page.
- Add optional `dataTestSubj` to the `Navigation` component and use that
for the serverless search nav.
- Add optional `titleDataTestSubj` to the `SolutionNav` component and
use it for the serverless security nav.
- Add a data-test-subj entry to the Search overview page.
* Add deferred migrations parameter.
* Update outdated documents query to take into account deferred migrations.
* Update outdated documents query to take into account the core migration version.
* Update read operations in the saved objects repository to perform deferred migrations.
## Summary
Closes https://github.com/elastic/kibana/issues/152833
This PR:
- Removes the visualize:enableLabs setting which doesn't do anything
after the presentation team decided to hide the creation of the legacy
input controls from the UI
- Cleanups wherever the components associated with this feature were
used
---------
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
## Summary
The interface for fields allow array of string see below but the
validation with `@kbn/config-schema` only allow string. This will allow
to pass fields as array.
<img width="355" alt="image"
src="04c099c6-6a84-49ef-af45-587efa8e508b">
### 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
`eui@77.2.2` ⏩ `eui@79.0.1`
🦴 The primary changes in this upgrade are around the deprecated
`EuiLoadingContent` being removed in favor of `EuiSkeletonText`.
- Most instances have been a [direct swap of
usage](327626a7be),
but [some replacements were a bit more
opinionated](e6ceb36a75)
as I saw them as potential to take advantage of `EuiSkeletonText`'s
syntactical sugar and screen reader announcements for when state
switches to loaded.
---
## [`79.0.1`](https://github.com/elastic/eui/tree/v79.0.1)
**Bug fixes**
- Fixed broken push `EuiFlyout` behavior
([#6764](https://github.com/elastic/eui/pull/6764))
## [`79.0.0`](https://github.com/elastic/eui/tree/v79.0.0)
- Updated all `EuiSkeleton` components with new props that allow for
more control over screen reader live announcements:
`announceLoadingStatus`, `announceLoadedStatus`, and `ariaLiveProps`
([#6752](https://github.com/elastic/eui/pull/6752))
- Improved keyboard accessibility in `EuiPageHeader` by ensuring the
right side menu items come into focus from left to right.
([#6753](https://github.com/elastic/eui/pull/6753))
**Breaking changes**
- Removed deprecated `EuiLoadingContent`. Use the `EuiSkeleton`
components instead. ([#6754](https://github.com/elastic/eui/pull/6754))
## [`78.0.0`](https://github.com/elastic/eui/tree/v78.0.0)
- Improved the contrast ratio of `EuiCheckbox`, `EuiRadio`, and
`EuiSwitch` in their unchecked states to meet WCAG AA guidelines.
([#6729](https://github.com/elastic/eui/pull/6729))
- Added React Testing Library `*ByTestSubject` custom commands to
`within()`. RTL utilities can be imported from
`@elastic/eui/lib/test/rtl`.
([#6737](https://github.com/elastic/eui/pull/6737))
- Updated `EuiAvatar` to support a new letter `casing` prop that allow
customizing text capitalization
([#6739](https://github.com/elastic/eui/pull/6739))
- Updated `EuiFocusTrap` to support the `gapMode` prop configuration
(now defaults to `padding`)
([#6744](https://github.com/elastic/eui/pull/6744))
**Bug fixes**
- Fixed inconsistency in `EuiSearchBar`'s AND/OR semantics between DSL
and query string generation
([#6717](https://github.com/elastic/eui/pull/6717))
- Fixed `EuiFieldNumber`'s native browser validity detection causing
extra unnecessary rerenders
([#6741](https://github.com/elastic/eui/pull/6741))
- Fixed the `scrollLock` property on `EuiFocusTrap` (and other
components using `EuiFocusTrap`, such as `EuiFlyout` and `EuiModal`) to
no longer block scrolling on nested portalled content, such as combobox
dropdowns ([#6744](https://github.com/elastic/eui/pull/6744))
**Breaking changes**
- `EuiAvatar`s with the default `user` type will now default to
capitalizing all initials in uppercase
([#6739](https://github.com/elastic/eui/pull/6739))
---------
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
## Summary
Starting with Chrome v113 we noticed that `_area_chart.ts` suite became
flaky #156821 failing with
`WebDriverError: unknown error: unhandled inspector error:
{"code":-32000,"message":"No node with given id found"}`
Updating chromedriver to v113 did not solve the issue and more tests
started to fail with the same error.
It happens occasionally when driver returns unhandled error instead of
StaleElementReferenceException. This PR adds the error to the
`RETRY_ON_ERRORS` list, so that FTR can search for the element again and
re-try the action on it:
```
│ debg getVisibleText: elementId=29C3E81151C86107290DD8F020524333_element_290
│ debg Chromedriver issue #4440, WebElementWrapper.getVisibleText: WebDriverError: unknown error: unhandled inspector error: {"code":-32000,"message":"No node with given id found"}
│ (Session info: chrome=113.0.5672.63)
│ debg current ElementID=29C3E81151C86107290DD8F020524333_element_290
│ debg new ElementID=29C3E81151C86107290DD8F020524333_element_293
│ debg Searching again for the element 'By(css selector, [data-test-subj="visEditorInterval"] + .euiFormErrorText)', 2 attempts left
│ debg getVisibleText: elementId=29C3E81151C86107290DD8F020524333_element_293
└- ✓ pass (1.8s)
```
There is no need to use `Retry` service, `WebDriverWrapper.retryCall`
should handle the issue.
Flaky test runner 100x for Vis Editor config:
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/2236
Flaky test runner 100x for Cases config:
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/2237
And 2 more 100x:
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/2239https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/2237
## Summary
Resolves https://github.com/elastic/kibana/issues/136856
- Add async keyword where it should have been.
- Split archive into kbn and es archives...
instigated by Pierre's comment:
https://github.com/elastic/kibana/issues/136856#issuecomment-1253609280
- Note: Had to use both archive types as
one archive is "hidden", and cannot be accessed via the kbn client.
- Unload via Pierre's "new" clean method.
- Add shell fn to print out server's currently loaded so's, with user
and pass hardcoded for local dev.
This PR stabilizes the export job tests by making sure the export
success toast is closed before moving on to the next test. As part of
that, the toasts service got two new methods
`dismissAllToastsWithChecks` and `assertToastCount`.