Fixes#156742
## Summary
Most of this test's logic was about how this specific comment type is
rendered.
There was already some logic from the flaky test duplicated in
`x-pack/plugins/cases/public/components/user_actions/comment/comment.test.tsx`.
I moved the rest of the flaky test logic there.
---------
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
## Summary
`{ match_phrase: { 'vulnerability.enumeration': 'CVE' } }` has been
removed from the vulnerabilities filter so that documents from other
sources are presented in CNVM features
fixes:
- https://github.com/elastic/security-team/issues/7287
## Screenshots
This is how CNVM features look like with GHSA data
<img width="1728" alt="Screenshot 2023-08-08 at 15 47 10"
src="d945afb1-8469-4810-ab27-40b243b34e76">
<img width="1721" alt="Screenshot 2023-08-08 at 15 46 59"
src="0f8a3ce0-ffb6-4cc5-99cc-5d6d31a75640">
## Summary
Related to #162995
This PR unskip TSVB tests for Chrome browser since it is proved to be
stable
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/2836
100x passed
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/2835
100x passed
On Firefox the flakiness is related to Terms 2nd aggregation field
sometimes is not selected. I tested it manually in Firefox 116 and was
able to set fields, though I have a feeling that values are not always
selected on click in the drop-down. But I didn't see any errors in
console.
I also returned back retry for dropdown selection I removed in #161202
though flaky-test-runner proves there is no need. Let's have just to
keep logic as before my PR.
## Summary
Inspired by https://glebbahmutov.com/blog/burning-tests/
Implements the idea presented here
https://glebbahmutov.com/blog/burning-tests/#bonus-3-burning-new-or-changed-specs
In short, on PR that is changing/adding new Cypress spec files we will
try to "burn" them, it means we will try to run each `it` `2` times to
make sure tests are written in a way that gives Cypress a chance to
recover from the failed test.
Also adding a command that allows to "burn" tests locally
```
yarn cypress:burn --spec "<>"
```
Right now the job is set to `soft_fail`, so it is not going to block the
PR from merging, but hopefully will help the Team to recognize potential
flakiness before it is merged to `main`
## Summary
Our public folder tests are taking 35-40+m to run in CI. To try and
mitigate this we are splitting the jest tests configs to each of the
application folders to allow workers to run them separately.
I also added a `jest.config.dev.js` file to the `enterprise_search`
plugin root which allows you to run `./jest.sh` to run all of the
projects with a single command locally.
On my laptop I am seeing this take a similar amount of time to run all
the projects, but it can vary.
before (3 projects)
```
Test Suites: 880 passed, 880 total
Tests: 5513 passed, 5513 total
Snapshots: 29 passed, 29 total
Time: 286.798 s
Ran all test suites in 3 projects.
✨ Done in 289.12s.
```
after (14 projects)
```
Test Suites: 884 passed, 884 total
Tests: 5513 passed, 5513 total
Snapshots: 29 passed, 29 total
Time: 301.281 s
Ran all test suites in 14 projects.
✨ Done in 303.59s.
```
---------
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
## Summary
Adds new connector type to support https://www.sentinelone.com/
The scope of this PR was limited to the Connector logic, schemas, and
types to make PR more digestible.
In the current PR, the connector is NOT registered, so it's not going to
be available to the users.
In the follow-up PR I'm going to improve the UX of Param's form and then
enable the connector
<img width="1685" alt="Zrzut ekranu 2023-08-3 o 11 18 54"
src="965ef8ef-497f-42a8-983e-38fd0370cba8">
visual changes include a screenshot or gif.
<img width="1685" alt="image"
src="119d2255-ed9f-4923-886d-eb139223a47d">
<img width="1690" alt="image"
src="e2c569d2-b497-4641-a6a6-454494223ffc">
On ML's management page a new capabilities poll is created every time
the user changes tabs.
`getMlGlobalServices` gets called every time the jobs list renders,
which creates a new `MlCapabilitiesService` which creates a new timer to
poll for ml's capabilities.
This change moves the `mlServices` so it isn't called on each render.
It also bumps up the interval from 1 min to 5 mins as think 1 min is a
bit too frequent.
## Summary
Closes https://github.com/elastic/kibana/issues/154705
## List of Issues
- Trace Waterfall not clearing and persisting old data

- Infinite Loading of Trace Waterfall where no traces are present and
page is reloaded

- After Fixing these 2 issues, found issue with Container Height

## All issues fixed

closes [#162672](https://github.com/elastic/kibana/issues/162672)
## Summary
This PR fixes the `should render alerts count for a host inside a
flyout`. It also moves all flyout-related tests to the `#Single Host
Flyout` test.
### How to test
```bash
yarn test:ftr:server --config x-pack/test/functional/apps/infra/config.ts
```
```bash
yarn test:ftr:runner --config x-pack/test/functional/apps/infra/config.ts --include x-pack/test/functional/apps/infra/hosts_view.ts
```
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/2830
## Summary
Fixes#163040
This PR generialize the fix in #150321 to handle also the empty string
at parent level when the `Other` response is merged.
Added few unit tests to cover some more scenarios.
Added some functional tests for top and nested `empty` + `Other`
scenarios at higher level (XY + table)
The fix affects both Visualize and Lens:
<img width="1230" alt="Screenshot 2023-08-04 at 18 21 32"
src="8e0d2d38-d361-4441-ac64-dbb4351c4081">
<img width="1224" alt="Screenshot 2023-08-04 at 18 21 18"
src="c689b7c7-c19c-49be-a845-c32f7e33f6ca">
<img width="1223" alt="Screenshot 2023-08-04 at 18 21 04"
src="28db1471-578e-4b77-ba45-3e0b9ee1bfaa">
<img width="1222" alt="Screenshot 2023-08-04 at 18 20 57"
src="3a6f5512-496a-4713-b21a-efd4c68ad85b">
<img width="1217" alt="Screenshot 2023-08-04 at 18 20 48"
src="c3b93c52-ca6b-4ec8-bb5f-ad411e8b955b">
<img width="1219" alt="Screenshot 2023-08-04 at 18 20 36"
src="34b7b340-6dfa-42e9-91aa-f3b2e15972a9">
<img width="1506" alt="Screenshot 2023-08-04 at 18 20 15"
src="eb2d29ed-1817-4027-86ee-48454e2c8904">
<img width="1505" alt="Screenshot 2023-08-04 at 18 20 01"
src="4eae15e4-64e4-437b-897b-6a0a02dd7561">
<img width="1508" alt="Screenshot 2023-08-04 at 18 19 49"
src="01863142-1042-40b4-9843-ab46fefb4666">
<img width="1497" alt="Screenshot 2023-08-04 at 18 19 36"
src="d5bbdd4a-d8a4-43fc-a0e2-6626a2b0cf62">
<img width="1511" alt="Screenshot 2023-08-04 at 18 19 22"
src="10491869-34ce-402d-a530-02734e90cd87">
<img width="1222" alt="Screenshot 2023-08-04 at 18 26 35"
src="d671f9ff-e883-4af5-b03a-3c348f2b643f">
### 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#154832
This PR is a first attempt to provide a visual feedback to users while
configuring a visualization that use a time series metric, showing a new
category in the field picker that highlights time series dimensions by
which the gauge/counter are mapped against.
Current idea:
* Works with XY and Heatmap visualizations only
* Works only for Breakdown (XY) and Y axis (Heatmap) only
* Top values on the horizontal axis for both visualizations won't show
the new field category
* The feature is enabled only when a metric using a time series metric
field (like gauge or counter) is detected in the configuration,
otherwise the category is hidden.
* The feature is disabled for multi terms - it means that just the group
is hidden, no impact on the actual field
* Fields for this group are taken from both `Available` and `Empty`
fields but the rendering styles for the empty case is retained.
<img width="353" alt="Screenshot 2023-08-01 at 17 52 38"
src="51d5af78-60b1-4106-a27a-82f5e7deb416">
Empty field but within the Time series dimension:
<img width="366" alt="Screenshot 2023-08-08 at 16 29 17"
src="1ef75234-8622-45e3-9deb-d1842d26783a">
While the actual implementation of the ES aggs is not leveraging yet
this information, this is still useful to indicate to the user which
dimension the index/dataView mapping author thought it makes sense that
metric.
With #152537 also the aggregation request will benefit from this.
### 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] [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>
1. Removed Kerberos option from auth type selection
2. Used EuiFieldPassword component for password input
State:

3. Added `None` authentication option. This will save `auth_type` as
`none` and won't pass `usernamer`, `password` nor `ssl` to the SO.

4. Renamed `broker_ack_reliability` to `required_acks` in UI and API.
Changed value type to `1 || 0 || -1`
5. Renamed `broker_buffer_size` to `channel_buffer_size` in UI and API.
6. Temporarily disabled `password` field encryption.
7. `partition` key stored in yaml follows proper requirements
8. `topics` key stored in yaml follows proper requirements
---------
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
## Summary
fixes https://github.com/elastic/kibana/issues/160337
This PR
- hides cases in the serverless Elasticsearch project, cases APIs throw
error
- throws 403 from API when `owner=cases` for security or observability
serverless mode
- verifies the behaviour in serverless functional as well as
api_integration tests
**How to test**
- Boot up `es` serverless solution and make sure that `cases` from the
navbar is hidden and cannot not be accessible through url as well
- Boot up `observability` or `security` serverless solutions and make
sure that `cases` is available in the navbar and works fine
- Boot up classic kibana and make sure that the left navbar has the same
menu entries it always had.
### 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
20c1974e-44f0-45b0-80aa-e644fec148ff
### 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: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Fixes#156750Fixes#156747Fixes#156744Fixes#156743Fixes#156748Fixes#156746Fixes#156745Fixes#156749
## Summary
Basically what you suggested offline @js-jankisalvi.
| Scenario | Old Test | Functional test where it is covered |
| ------------- | ------------- | ------------- |
| Only shows one list of user actions when `total_user_actions < 10` |
`'renders only one action list when user actions are less than or equal
to 10'` | `'initially renders user actions list correctly'`|
| `Show More` button does not show up when `total_user_actions <=
page_size` | `'shows more button visible 21st user action added'` |
`'initially renders user actions list correctly'` |
| Shows 2 user action lists when `total_user_actions > page_size` |
`'renders two user actions list when user actions are more than 10'` |
`'shows more actions on button click'` |
| loading spinner | `'Loading spinner when user actions loading'` |
`'shows more actions on button click'` |
## Flaky Test Runner
Let's make sure that the functional tests don't become flaky too.
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/2826
closes [#161957](https://github.com/elastic/kibana/issues/161957)
## Summary
This PR encapsulates the styling and logic to render the Lens charts
components. Doing so simplifies the usage in places that render these
charts, eliminating the previously necessary code duplication
### How to test
- Start a local Kibana instance
- Navigate to `Infrastructure` > `Hosts`
- Confirm that all charts still work
- Play with the filters
- Verify whether only charts above the fold are rendered
- Open the flyout
- Switch hosts with the flyout open
---------
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
## Summary
The breaking tests have nothing to do with this PR. I ran the [test PR
and it broke too.](https://github.com/elastic/kibana/pull/163229/files)
### Functionality changes
#### XY Chart
Adds tooltip action for x series if it exists. The copy is different for
time and categorical series.
2a043e04-c5b1-480d-be10-ae618145fb65
<img width="246" alt="Screenshot 2023-08-04 at 17 37 39"
src="d3e4b7ae-cace-444e-8c86-c210ca1be2ee">
<img width="222" alt="Screenshot 2023-08-04 at 17 37 57"
src="dd44cc10-d4bd-4b5d-a6bb-856e48a77f34">
When filtering by one time interval we create a time picker filter and
not regular filter now.
#### Partition Chart
Adds tooltip actions filters.
Doesn't add them if we only have metric dimensions.
c4d427c3-fb81-4f9d-b4be-dcb5ba872fdb
#### Heat map Chart
Adds tooltip actions filters
68795a02-8d40-47af-8366-d7c4f88c6ce3
### Code changes
#### Changes to `MultiValueClickContext`
1. I changed the interface to:
```
export interface MultiValueClickContext {
{...}
data: {
data: Array<{
cells: Array<{
column: number;
row: number;
}>;
table: Pick<Datatable, 'rows' | 'columns' | 'meta'>;
relation?: BooleanRelation;
}>;
{...}
};
}
```
The important changes are accepting the array of data (this way we can
pass multiple tables for different dataviews, for example for different
layers for xy chart and we don't have run separate handlers for separate
layers). Also we don't pass a single column and array of values (that
then we have to convert to multiple rows inside of the functions) but a
`cells` array. This way we can pass values that belong to different rows
and columns. I also added a `relation` param so user can control if they
prefer to use `AND` or `OR` relation for combined filter. If none is
used, the filters are separate.
Fixes https://github.com/elastic/kibana/issues/150304
---------
Co-authored-by: Stratoula Kalafateli <efstratia.kalafateli@elastic.co>
Resolves https://github.com/elastic/kibana/issues/161465
## Summary
Adds `ignore_malformed: true` to alerts index template settings. This
ignores malformed content globally across all allowed mapping types. For
existing alerts as data indices, the new setting is not applied directly
to the existing concrete indices but will be applied whenever the alias
rolls over and a new concrete index is created.
## Verify
- Verify that after upgrading alerts indices created in an older version
to this branch, alerts continue to be written and read as expected.
---------
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Vitalii Dmyterko <vitalii.dmyterko@elastic.co>
## Summary
- Addresses https://github.com/elastic/kibana/issues/155122
## Investigations
*First attempt*
> While investigating the three failing pipelines and examining the
Artifacts, specifically target/test_failures/*.log, I discovered the
root cause to be
> Did not get an expected 200 "ok" when waiting for a list item
(waitForListItem) yet. Retrying until we get a 200 "ok". body:
{"message":"list_id: \"list_items.txt\" item of 1.0 does not
exist","status_code":404}, status: 404
>
>

>
*Second attempt*
> Upon incorporating additional logs to pinpoint the underlying issue,
it was realized that the test will persist in its attempts until the
preceding error is rectified, and it was determined that the
list_items.txt file contains the correct item once located.
>
> The problem seemed to be associated with incomplete indexing of all
indices signalsOpen.hits.hits when the test verifies against the
anticipated value.
>
> To investigate the matter, two iterations were conducted, totaling 490
attempts. During these iterations, logs, and warnings were deliberately
inserted to facilitate the tracing of the issue.
>
>
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/2770#0189bb29-c258-4586-986a-2ac5e128eb52
>
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/2768#0189baeb-8f09-488e-936f-69e72d089787
>
> In this
[Atifact](0189bb29-c258-4586-986a-2ac5e128eb52_d98d35afa0abd1ad03e28a68882291c4.log?response-content-type=text%2Fplain&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=ASIAQPCP3C7LXS7MSJGH%2F20230808%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20230808T102039Z&X-Amz-Expires=600&X-Amz-Security-Token=IQoJb3JpZ2luX2VjEOH%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JHxWk5%2FoBwScZRUSYGWmkhaxnZXDjXg6LBuH7uZOJjf%2FLuFVdtQ%3D%3D&X-Amz-SignedHeaders=host&X-Amz-Signature=8a44c3a5e3b88b632097dc344ecec1ba6d6cb8e80e10d9058e96883e43d925b5)
>
>

>
>
## Solution
By modifying the third parameter of the `await
waitForSignalsToBePresent(supertest, log, 1, [id]);` function to a value
of 3 instead of the initial 1, we signify the number of alerts we need
to await before conducting assertions. This change is made to
accommodate the assertion of three alerts being generated, accounting
for the exclusion of a single 1.0 value.
closes https://github.com/elastic/kibana/issues/163144
## Summary
This PR fixes the Disk Throughput Read and Write formulas, and Disk
Usage Availability formula in the Asset Details flyout.
The flyout had another problem. the Disk IOPS was using Disk Throughput
formulas and vice-versa.
<img width="570" alt="image"
src="c1e987a1-43cf-459a-8491-51de0e3b4f3d">
<img width="570" alt="image"
src="bf2976bb-0409-46c4-ba02-002528947cff">
<img width="570" alt="image"
src="7f542b21-9992-4088-adac-05a344f066ac">
### How to test
- Start a local Kibana instance
- Navigate to `Infrastructure` > `Hosts`
- Open the flyout for a host
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
## Summary
This PR adds a feedback button to Metrics Explorer
## Testing
- Go to Infrastructure > Metrics Explorer
- The feedback button (Tell us what you think!) should be visible
<img width="1702" alt="image"
src="0d94371c-6269-4595-9b10-c85d1bcc66d9">
- When you click on the link the Kibana version should be prefilled (no
need to submit just go to step 4)
<img width="1193" alt="image"
src="f03d641b-83f8-4a08-ad12-e279303e4a61">
This updates log rate analysis to be able to auto-detect whether the
selected deviation is a spike or dip compared to the baseline time
range. To achieve this, we compare the median bucket size of the two
selections. If a dip gets detected, the analysis will then switch the
window parameters sent to the API endpoint to run the analysis.
An info callout points out the auto-selected analysis type and explains
to which time range the analysis results refer to. We need to do this to
make it clear that for dip analysis the significant terms and their doc
counts refer to the baseline time range and vice versa for spike
analysis.