Commit graph

34916 commits

Author SHA1 Message Date
Nick Peihl
3e6419321a Revert "Make Tags shareable across Spaces"
This reverts commit d71ced9edf.
2023-11-08 11:52:23 -05:00
Nick Peihl
d71ced9edf Make Tags shareable across Spaces 2023-11-08 11:48:01 -05:00
Catherine Liu
20a86c4a2e Restore prohibitedSpaces 2023-11-07 08:52:10 -08:00
Nick Peihl
d222bc5e76
Merge branch 'main' into shareable-dashboards 2023-11-06 10:56:44 -05:00
christineweng
3bf58b04ab
[Security Solution] Expandable flyout - right panel header refactor (#170279) 2023-11-06 09:28:40 -06:00
Janki Salvi
1292c87b65
[Cases] fix service now connector flaky test (#170608)
## Summary

Use use `await findByTestId `to fix flaky tests.

fixes https://github.com/elastic/kibana/issues/161962

added loop in
74738aba6b

### 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

### 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>
2023-11-06 07:50:58 -07:00
James Gowdy
ac0d04d355
[ML] Assigning elser models to the * space (#169939)
Fixes https://github.com/elastic/kibana/issues/169771

Adds a new endpoint
`/internal/ml/trained_models/install_elastic_trained_model/:modelId`
which wraps the `putTrainedModel` call to start the download of the
elser model. It then reassigns the saved object's space to be `*`.

Also updates the saved object sync call to ensure any internal models
(ones which start with `.`) are assigned to the `*` space, if they've
needed syncing.

It is still possible for a user to reassign the spaces for an elser
model and get themselves into the situation covered described in
https://github.com/elastic/kibana/issues/169771.
In this situation, I believe the best we can do is suggest the user
adjusts the spaces via the stack management page.

At the moment a `Model already exists` error is displayed in a toast. In
a follow up PR we could catch this and show more information to direct
the user to the stack management page.

---------

Co-authored-by: Dima Arnautov <arnautov.dima@gmail.com>
2023-11-06 13:34:15 +00:00
César
820cfc02cf
[APM] Mobile most launches (#168925)
## Summary

Enabling the "Most launches" Mobile dashboard panel which shows an
aggregation of log events that contain the attribute
`labels.lifecycle_state` set to either `created` (for Android) or
`active` (for iOS).

![Screenshot 2023-10-27 at 09 37 08
copy](911c769c-1456-4f38-bf07-5e71b6ce5ae5)


### 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

### 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: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Katerina <kate@kpatticha.com>
2023-11-06 14:14:10 +01:00
Janki Salvi
42fc7ea4db
[Cases] fix serviceNow connector flaky test (#170537)
## Summary

Use `use await findByTestId` to fix flaky tests

fixes https://github.com/elastic/kibana/issues/167384
fixes https://github.com/elastic/kibana/issues/167385

### 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

### 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>
2023-11-06 04:16:38 -07:00
Marco Liberati
4053f711b1
[UnifiedSearch] Reduce length for filter badge id (#170439)
## Summary

This PR aims to reduce the possible long length of filter badge test id.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-11-06 11:59:55 +01:00
Antonio
96a4d5b63f
[Cases] Fix flaky "add comment" tests. (#170400)
Fixes #168505
Fixes #168506
Fixes #168507
Fixes #168508
Fixes #168509
(I hope)

## Summary

Covered most of the logic in e2e tests.

Flaky test runner:
-
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/3869

## Checklist

Delete any items that are not applicable to this PR.

- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-11-06 11:45:16 +01:00
Antonio
25522bb99c
[Cases] Fix jira flaky tests (#170507)
Fixes #169392
Fixes #169393
Fixes #169391 
Fixes #169390 
Fixes #169387 
Fixes #169386 
Fixes #169385 
Fixes #169384 
Fixes #169383

## Summary

Summarize your PR. If it involves visual changes include a screenshot or
gif.
2023-11-06 09:56:00 +01:00
Pierre Gayvallet
22a2bfe22a
Audit logging: do not perform logger call if logging is disabled (#170333)
## Summary

Use the recently added `Logger.isLevelEnabled` API to short circuit
audit logging when disabled

That way we're not passing though the whole audit log event construction
logic when logging would effectively not be performed.


7012ca5454/x-pack/plugins/security/server/audit/audit_service.ts (L170-L202)
2023-11-06 01:45:21 -07:00
Pierre Gayvallet
d64e246cb7
Change signature of Plugin.stop to maybe async (#170225)
## Summary

Fix https://github.com/elastic/kibana/issues/83612

This PR doesn't change any behavior, as we're already supporting (and
awaiting) promises returned from `stop` calls to plugin, it just changes
the type's signature to reflect that.

Also removed empty `stop` methods from existing plugins to make
typescript happy.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-11-06 01:38:19 -07:00
Carlos Crespo
9def79267c
[ObsUX] Fix error when navigating from infra to other apps (#170564)
fixes https://github.com/elastic/kibana/issues/170562

## Summary

This PR fixes the error that happens when navigating from infra app to
another app while the charts are still loading


66cecf6d-96e5-4630-b968-aada98b6678a


### How to test

- Navigate to `Infrastructure` > `Hosts`
- While the charts are still loading, navigate to any other app.

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2023-11-06 09:30:13 +01:00
Nikita Indik
e389991557
[Security Solution] Prebuilt rule installation / upgrade flyout test coverage (#169537)
**Resolves: https://github.com/elastic/kibana/issues/166161**

**Flaky test runner pipelne:
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/3868**

## Summary
Adds test coverage based on the test plan:
https://github.com/elastic/kibana/pull/167727/files

<img width="1301" alt="272390474-1aa7aa8b-3746-4767-82ad-f4910034d5eb"
src="4ad6a27a-eeef-467b-bb72-1caf48bfb7e5">

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-11-05 17:19:15 +01:00
Tomasz Ciecierski
5406e2c17b
[EDR Workflows] Unskip more tests (#170401) 2023-11-05 09:01:24 +01:00
Alejandro Fernández Haro
dfec895836
Fix unhandledRejections part 2 (#169522) 2023-11-04 16:31:44 -07:00
Marta Bondyra
e9b6898d73
[Lens] Rewrite some tests to @testing-library/react (#170181)
## Summary

Rewriting some tests to testing library.
2023-11-04 12:48:43 -07:00
Maxim Kholod
5b72f77e07
[Cloud Security] set rowHeight to 0 to fix the bug of large row height in Findings (#170503)
## Summary

fixes
- https://github.com/elastic/kibana/issues/170502

defaulting to row height 0 for the findings table. As the default was -1
before, we were defaulting to 0, but due to this change
https://github.com/elastic/kibana/pull/169724/files the default became
3, which broke our table. I guess the logic of taking the UI setting if
it's differnt from default -1 was to cater for users changing the row
height somewhere in the settings, but we need to bring to product/design
to see if we want to support it

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-11-04 15:26:33 +01:00
Tiago Costa
da485d5bf2
skip flaky suite (#170482) 2023-11-04 00:09:07 +00:00
Juan Pablo Djeredjian
c0c7d1365f
[Security Solution] Unskip and enable for Serverless shared_exception_lists_management Cypress tests (#169182)
## Summary

Running flaky test runner for:
-
`x-pack/test/security_solution_cypress/cypress/e2e/exceptions/shared_exception_lists_management`

## Changes

-
`x-pack/test/security_solution_cypress/cypress/e2e/exceptions/shared_exception_lists_management/list_detail_page/list_details.cy.ts`
**enabled on Serverless**
-
`x-pack/test/security_solution_cypress/cypress/e2e/exceptions/shared_exception_lists_management/manage_exceptions.cy.ts`
**enabled on Serverless**
-
`x-pack/test/security_solution_cypress/cypress/e2e/exceptions/shared_exception_lists_management/manage_exceptions.cy.ts`
**enabled on Serverless**
-
`x-pack/test/security_solution_cypress/cypress/e2e/exceptions/shared_exception_lists_management/shared_exception_list_page/filter_table.cy.ts`
**enabled on Serverless**
-
`x-pack/test/security_solution_cypress/cypress/e2e/exceptions/shared_exception_lists_management/shared_exception_list_page/import_lists.cy.ts`
**enabled on Serverless**
-
`x-pack/test/security_solution_cypress/cypress/e2e/exceptions/shared_exception_lists_management/shared_exception_list_page/manage_lists.cy.ts`
**unskipped and enabled in Serverless**
-
`x-pack/test/security_solution_cypress/cypress/e2e/exceptions/shared_exception_lists_management/shared_exception_list_page/read_only.cy.ts`
**removed from Serverless testing**


## Related failing-test issues
1. https://github.com/elastic/kibana/issues/165874
2. https://github.com/elastic/kibana/issues/165838
3. https://github.com/elastic/kibana/issues/165795
4. https://github.com/elastic/kibana/issues/165743 - **Closed as
duplicate of _#165640**
5. https://github.com/elastic/kibana/issues/165690
6. https://github.com/elastic/kibana/issues/165640

### Flaky test runner link

-
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/3557#_
(Only ESS) 🟢
-
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/3564#_
(ESS and Serverless)
-
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/3613
(Serverless evaluated and corrected)
-
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/3878
[V3]
-
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/3891
[V4]
2023-11-03 23:35:09 +01:00
Tim Sullivan
704e080c93
Integrate Event-Based Telemetry in KibanaErrorBoundary (#169895)
## Summary

Part of https://github.com/elastic/kibana-team/issues/646
Depends on https://github.com/elastic/kibana/pull/169324

Implements telemetry for fatal errors caught by KibanaErrorBoundary in:
-
`packages/core/application/core-application-browser-internal/src/ui/app_router.tsx`
- `packages/kbn-shared-ux-utility/src/with_suspense.tsx` [*]
- `packages/react/kibana_context/render/render_provider.tsx` [*]
-
`src/plugins/management/public/components/management_app/management_router.tsx`
-
`x-pack/plugins/observability_shared/public/components/page_template/page_template.tsx`
- `x-pack/plugins/security_solution/public/app/app.tsx`

[*] The changes made to these allowed the `analytics` dependency to be
provided optionally, to avoid a breaking API change for maintainers.

## Logging screenshot
You can trigger a fatal error in the new error boundary component in
most places in Kibana by adding a TypeError to a React component:
`<p>{breakHere()}</p>`
<img width="1586" alt="fatal error telemetry console log"
src="97f973ac-bb25-41f2-bfe2-547a23f2f450">

## Telemetry work info
Dashboard:
<img width="1382" alt="image"
src="4fe5353a-61ba-405a-ac18-0dd6a044c182">
Discover:
<img width="1331" alt="image"
src="2161b552-c441-4b7c-adef-25896147c08a">

### 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>
2023-11-03 12:55:00 -07:00
Lisa Cawley
8716f65922
[DOCS] Slack api allowed channels (#169706) 2023-11-03 11:37:56 -07:00
Lisa Cawley
89dd69656c
[DOCS] Add solution selection to maintenance windows (#169441) 2023-11-03 11:36:55 -07:00
Tiago Costa
0cd75d9126
skip flaky suite (#170373) 2023-11-03 18:33:28 +00:00
Tiago Costa
7c00488303
skip flaky suite (#168355) 2023-11-03 18:25:01 +00:00
Wafaa Nasr
c93f73363b
[Security Solution][Exceptions][API testing] Refactor commands in package.json (#170538)
## Summary

Append `area` and `license` to `initialize-server` and `run-tests` to
avoid duplicates
2023-11-03 18:22:29 +01:00
Lisa Cawley
ea58f9f6a3
[OAS] Add ES|QL query options to Elasticsearch query rule (#170290) 2023-11-03 10:21:19 -07:00
Cee Chen
d079e9573d
Upgrade EUI to v90.0.0 (#170179)
`v89.1.0``v90.0.0`

The majority of changes in this PR come from:

- **EuiContextMenu** being converted to Emotion
(https://github.com/elastic/eui/pull/7312). If your usage of
`EuiContextMenu` was significantly affected, we recommend pulling down
this PR and QAing it locally.

- `defaultProps` being removed from some very widespread components,
particularly **EuiButton**, in anticipation of React's upcoming
deprecation.
(b7dc9b4e89)
**NOTE**: This only affected Enzyme snapshots, and did not affect
production behavior.

[Commits](https://github.com/elastic/kibana/pull/170179/commits) have
been broken up by component changes as well as types of changes.

---

## [`90.0.0`](https://github.com/elastic/eui/tree/v90.0.0)

- Updated the `eventColor` prop on `EuiCommentEvent` to apply the color
to the entire comment header.
([#7288](https://github.com/elastic/eui/pull/7288))
- Updated `EuiBasicTable` and `EuiInMemoryTable` to support a new
controlled selection API: `selection.selected`
([#7321](https://github.com/elastic/eui/pull/7321))

**Bug fixes**

- Fixed controlled `EuiFieldNumbers` not correctly updating native
validity state ([#7291](https://github.com/elastic/eui/pull/7291))
- Fixed `EuiListGroupItem` to pass `style` props to the wrapping `<li>`
element alongside `className` and `css`. All other props will be passed
to the underlying content.
([#7298](https://github.com/elastic/eui/pull/7298))
- Fixed `EuiListGroupItem`'s non-transitioned transform on hover/focus
([#7298](https://github.com/elastic/eui/pull/7298))
- Fixed `EuiDataGrid`s with `gridStyle.stripes` sometimes showing buggy
row striping after being sorted
([#7301](https://github.com/elastic/eui/pull/7301))
- Fixed `EuiDataGrid`'s `gridStyle.rowClasses` API to not conflict with
`gridStyle.stripes` if dynamically updated
([#7301](https://github.com/elastic/eui/pull/7301))
- Fixed `EuiDataGrid`'s `gridStyle.rowClasses` API to support multiple
space-separated classes
([#7301](https://github.com/elastic/eui/pull/7301))
- Fixed `EuiInputPopover` not calling `onPanelResize` callback prop
([#7305](https://github.com/elastic/eui/pull/7305))
- Fixed `EuiDualRange` incorrectly positioning highlights when rendered
with `showInput="inputWithPopover"`
([#7305](https://github.com/elastic/eui/pull/7305))
- Fixed `EuiTabs` incorrectly wrapping text when it should instead
either scroll or truncate
([#7309](https://github.com/elastic/eui/pull/7309))
- `EuiContextMenu` now renders text colors correctly when used within an
`EuiBottomBar` ([#7312](https://github.com/elastic/eui/pull/7312))
- Fixed the width of `EuiSuperDatePicker`'s Absolute date picker
([#7313](https://github.com/elastic/eui/pull/7313))
- Fixed `EuiDataGrid` cells visually cutting off overflowing content a
little too quickly ([#7320](https://github.com/elastic/eui/pull/7320))

**Deprecations**

- Deprecated `EuiBasicTable` and `EuiInMemoryTable`'s ref `setSelection`
API. Use the new `selection.selected` API instead.
([#7321](https://github.com/elastic/eui/pull/7321))

**Breaking changes**

- Removed `EuiPageTemplate_Deprecated`, `EuiPageSideBar_Deprecated`, and
`EuiPageContent*_Deprecated`
([#7265](https://github.com/elastic/eui/pull/7265))
- Removed the `ghost` color option from `EuiButton`, `EuiButtonEmpty`,
and `EuiButtonIcon`. Use an `<EuiThemeProvider colorMode="dark">`
wrapper and `color="text"` instead.
([#7296](https://github.com/elastic/eui/pull/7296))

**Dependency updates**

- Updated `refractor` to v3.6.0
([#7127](https://github.com/elastic/eui/pull/7127))
- Updated `rehype-raw` to v5.1.0
([#7127](https://github.com/elastic/eui/pull/7127))
- Updated `vfile` to v4.2.1
([#7127](https://github.com/elastic/eui/pull/7127))

**Accessibility**

- `EuiContextMenu` now correctly respects reduced motion preferences
([#7312](https://github.com/elastic/eui/pull/7312))
- `EuiAccordion`s no longer attempt to focus child content when the
accordion is externally opened via `forceState`, but will continue to
focus expanded content when users click the toggle button.
([#7314](https://github.com/elastic/eui/pull/7314))

**CSS-in-JS conversions**

- Converted `EuiContextMenu`, `EuiContextMenuPanel`, and
`EuiContextMenuItem` to Emotion; Removed `$euiContextMenuWidth`
([#7312](https://github.com/elastic/eui/pull/7312))
2023-11-03 10:19:31 -07:00
Alison Goryachev
2b1cd4d080
Disable guided onboarding on serverless (#168303) 2023-11-03 13:11:05 -04:00
Christos Nasikas
55b9c01539
[Cases] Fix FilesTable flaky test (#170504)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2023-11-03 09:45:18 -07:00
Devin W. Hurley
d3c50cd1b7
[Security Solution] [Sourcerer] Adds missing alerts index filtration from sourcerer that was removed during refactoring (#170484)
## Summary

Fixes: https://github.com/elastic/security-team/issues/7859

Thanks to @XavierM and @kqualters-elastic for spending time debugging
this with me.

When we added the [server-side
fetching](https://github.com/elastic/kibana/pull/163448) of index
patterns we missed the functionality that was filtering out the alerts
index from the default sourcerer scope. Without this filtering, the
logic for rendering the matched indices was not correctly refreshing
when adding data the first time.

The result was the alerts index would be set as a part of the filtered
index patterns once a source event data index was present (`logs-*`,
`auditbeat-*` etc..) and the redux store action to set the latest
matched indices was not called because the `useDataView` hook would
incorrectly believe the sourcerer data view no longer needed to be
initialized.




Steps to reproduce:

1. Start local ES and kibana
2. Navigate to Security Solution -> Overview page
3. Welcome / landing page should be visible
4. Start auditbeat (or generate any event data that would be part of the
security solution default data view index patterns)
5. Navigate to Discover, wait for data to load
6. Navigate back to Security Solution -> Overview page
7. Data should be visible, Data View (sourcerer) in the header should
display the correct index pattern for which data exists. Alerts index
should not be included.
2023-11-03 09:38:39 -07:00
Anton Dosov
3249c1a116
Consolidate <CodeEditor/> (#170313)
## Summary

Fix https://github.com/elastic/kibana/issues/159719

- Remove duplicate of code_editor code from `kibana_react` and apply
recent changes to the version in `packages/`
- Fix code_editor styles in `packages/`
https://github.com/elastic/kibana/pull/170313#discussion_r1378839369
- Revert setting default height to 100px (as it breaks in some places)
https://github.com/elastic/kibana/pull/170313#discussion_r1378838788


### Risks

Ideally we should smoke check the code editor in all the places, I
checked bunch of them.
As of special custom features, I tested: 
- The theme switch
- The placeholder 
- The a11y hint
- Fullscreen mode
2023-11-03 09:30:58 -07:00
Angela Chuang
30c859206c
[SecuritySolution] Hide data quality dashboard from assistant conversations (#170479)
## Summary


https://github.com/elastic/kibana/issues/166271

Traditional - with `Data quality dashboard` in assistant conversation
dropdown:
<img width="1505" alt="ess_ai_convo"
src="227aab97-b45c-451a-9c0e-7fd6dd534ff8">

Serverless - no `Data quality dashboard` in assistant conversation
dropdown:

<img width="1506" alt="serverless_ai_convo"
src="ee61c249-5cd0-40ca-b2cb-5885a32152ca">


### Checklist

Delete any items that are not applicable to this PR.


- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-11-03 08:53:44 -07:00
Tomasz Ciecierski
f7393c5480
[EDR Workflows] Include Osquery openApi schemas in codegen (#170389) 2023-11-03 16:39:05 +01:00
Yulia Čech
fdec4bf474
[Index Management] Add content to index details page via extensions service (#170054)
## Summary

Fixes https://github.com/elastic/kibana/issues/168704

This PR adds a function to the extensions service that allows to render
custom content on overview tab of the index details page. When custom
content is set, it will be rendered instead of the code block describing
adding documents to the index. This PR also moves the ILM content from
the overview tab to a separate tab. We will work on the design of this
tab in a follow up PR.

### How to test
To test the custom content apply changes in this
[commit](16769d6c39).

### Screenshots 

#### Custom content (example)
<img width="1357" alt="Screenshot 2023-11-01 at 19 03 32"
src="71372458-4cc2-413d-bf5f-bb29bff73095">


#### ILM tab
<img width="1129" alt="Screenshot 2023-11-01 at 18 54 07"
src="52c09a73-7d75-4f5f-8d52-b704cd9e6859">



### 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&mdash;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&mdash;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: Alison Goryachev <alisonmllr20@gmail.com>
2023-11-03 08:26:34 -07:00
Kibana Machine
ba4f60645d skip failing test suite (#170470) 2023-11-03 11:15:37 -04:00
Ignacio Rivas
e34b2ff35b
[Index Management] Be more explicit about data retention values (#170296) 2023-11-03 15:53:33 +01:00
Efe Gürkan YALAMAN
4e065dac28
[Enterprise Search] Switch to React Testing Library for Enterprise Search (#170514)
## Summary

Added a test helper to create required providers. This way now we can
mount all of our logics and test the changes. It also does a lot of
heavy lifting and simplifies tests.
Full mocking should still be available with previous helpers and a bit
of working around.


### Checklist

Delete any items that are not applicable to this PR.

- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-11-03 07:29:31 -07:00
Maryam Saeidi
cd490eeabe
[Custom threshold] Use data view name instead of indexPattern in reason message (#170453)
## Summary

This PR uses data view `name` instead of `indexPattern` in the reason
message for the custom threshold rule.
2023-11-03 15:29:17 +01:00
Alexi Doak
8a1ad098c8
[ResponseOps] Hide the query delay capability from non-serverless projects for now (#169965)
Resolves https://github.com/elastic/kibana/issues/169868

## Summary

Hides the query delay modal and sub feature privilege for non-serverless
projects until we onboard all rule types


### 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


### To verify

- Run a non serverless project and verify that you can't edit the query
delay settings in the rules settings modal
- Run a serverless project for search and observability to verify that
you can still edit and update the query delay settings

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-11-03 07:10:15 -07:00
Jason Rhodes
74509cdc33
[Asset Manager] Asset client updates (#170184)
## Summary

Updates the assets client with new methods, new tests, and better types
- found while developing a hosts inventory table POC in a separate PR.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Kevin Lacabane <kevin.lacabane@elastic.co>
2023-11-03 09:38:10 -04:00
Robert Oskamp
9f3e1f9a01
[ResponseOps] Stabilize flaky summary actions tests for MKI (#170511)
## Summary

This PR stabilizes the alerting summary actions test `should schedule
actions for summary of alerts on a custom interval` for MKI runs.

## Details

This test has been reported to be flaky in MKI runs in #169204 and the
fix attempts so far didn't remove the flakiness completely.
I was able to reproduce and added some debug logging to find the root
cause of the flakiness. It turns out, that `waitForDocumentInIndex`
sometimes comes back with three documents (instead of the two expected):
```
[
  {
    _index: 'alert-action-es-query',
    _id: 'ukTylIsBgjaJ6Di2KTpT',
    _score: null,
    _source: {
      all: '1',
      new: '0',
      newIds: '[]',
      ongoing: '1',
      ongoingIds: '[query matched,]',
      recovered: '0',
      recoveredIds: '[]',
      date: '2023-11-03T11:29:38.058Z',
      ruleId: '1f288dc5-ec93-44e4-8508-24ca31bac52e'
    },
    sort: [ 1699010978058 ]
  },
  {
    _index: 'alert-action-es-query',
    _id: 'tUTxlIsBgjaJ6Di2Pzoz',
    _score: null,
    _source: {
      all: '1',
      new: '0',
      newIds: '[]',
      ongoing: '1',
      ongoingIds: '[query matched,]',
      recovered: '0',
      recoveredIds: '[]',
      date: '2023-11-03T11:28:37.578Z',
      ruleId: '1f288dc5-ec93-44e4-8508-24ca31bac52e'
    },
    sort: [ 1699010917578 ]
  },
  {
    _index: 'alert-action-es-query',
    _id: 'eAzwlIsBqzjBaGCRSxxs',
    _score: null,
    _source: {
      all: '1',
      new: '1',
      newIds: '[query matched,]',
      ongoing: '0',
      ongoingIds: '[]',
      recovered: '0',
      recoveredIds: '[]',
      date: '2023-11-03T11:27:34.977Z',
      ruleId: '1f288dc5-ec93-44e4-8508-24ca31bac52e'
    },
    sort: [ 1699010854977 ]
  }
]
```
So it seems due to a search delay, there are already 2 `ongoing` entries
logged, which pushes the `new` entry to index 2 in that array and the
assertion which expects it at index 1 fails.

I think in this test, we don't really care about the number of `ongoing`
items in that array, we just want to make sure that we have a `new`
entry first followed by an `ongoing` entry and we don't care about the
rest of the entries.
With that, I've introduced an optional `sort` parameter to the
`waitForDocumentInIndex` helper that allows to sort `asc` (instead of
the hard coded `desc` so far). That way the test could expect the `new`
entry on index 0, an `ongoing` entry on index 1 and pass no matter how
many `ongoing` entries are following.
2023-11-03 06:32:26 -07:00
Patryk Kopyciński
d89631e7d3
Add sentinelOneConnectorOn experimental flag (#169922)
## Summary

Adds experimental flag used for the development of SentinelOne connector

Add this to the `kibana.yml` config
```
xpack.stack_connectors.enableExperimental: [sentinelOneConnectorOn]
```

Before:
<img width="1881" alt="Zrzut ekranu 2023-10-26 o 12 45 22"
src="c47bf713-8da9-4bca-89be-d8cfa0ac7e61">

After:
<img width="1882" alt="Zrzut ekranu 2023-10-26 o 12 44 10"
src="a28d1281-f5b3-41f5-bb9d-8381c8a11291">
2023-11-03 05:54:21 -07:00
Patryk Kopyciński
c41bd2e0de
Update Cypress script for Response Ops area (#169849)
## Summary

As per @mikecote feedback, it seems the current script was pointing to
non-existing directories
2023-11-03 13:35:15 +01:00
Janki Salvi
344ae1c91c
[Cases] fix user actions flaky tests (#170444)
## Summary

fixes https://github.com/elastic/kibana/issues/169858
fixes https://github.com/elastic/kibana/issues/169857
fixes https://github.com/elastic/kibana/issues/169859


### 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

### 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)
2023-11-03 13:15:13 +01:00
Julian Gernun
76a8c9e117
[Cases] Flaky/Broken Add/Draft Comment Tests (#170394)
hopefully fixes https://github.com/elastic/kibana/issues/169875
hopefully fixes https://github.com/elastic/kibana/issues/169876
2023-11-03 07:26:31 -04:00
Mark Hopkin
fa8ae52b66
resolver_generator.js Use optional chaining when checking if plugins exists on API response (#170403) 2023-11-03 10:29:47 +00:00
Christos Nasikas
9c2652778f
[Cases] Fix flakiness in the description tests (#170433)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2023-11-03 11:03:45 +02:00