Commit graph

76835 commits

Author SHA1 Message Date
Jean-Louis Leysens
a8091ab0ac
[OAS/HTTP] Empty response bodies (status only) and descriptions for responses (#188632)
## Summary

* Adds the ability to exclude a response schema when declaring route
schemas
* Adds the ability to provide a description of a the response

See code comments for more info.

## Example

You can declare a response with no validation to imply an empty object
in OAS

```
router.versioned.post({ version: '2023-10-31', access: 'public', path: '...' })
  .addVersion({
    validation: {
      responses: {
        201: { description: 'Resource created!' }
      }
    }
  }, () => {})
```

Will result in

```jsonc
{
 //...
  201: { description: 'Resource created!' }
 //...
}
```

## Risks

No notable risks
2024-07-22 15:29:15 +02:00
Jonathan Budzenski
06b111d993 skip failing test suite (#188840) 2024-07-22 08:20:43 -05:00
Dzmitry Lemechko
605b10468c
[ftr] add lost APM stateful configs (#188825)
## Summary

During #187440 we lost some FTR configs, this PR adds it back.
2024-07-22 15:09:39 +02:00
Tre
9cb903a641
[FTR] Fixup Requester Attempt Logic (specifically cli output) (#188827)
## Summary
### What 
Simply change function signatures and types (for one variable), such
that the `attempt` variable is accurate at invocation time.

### Why
After merging https://github.com/elastic/kibana/pull/188292
I noticed the output did not properly have the integers shown on the
cli:

## Before
```
                 └- ✖ fail: index_patterns index_patterns/service/lib index_patterns/* error handler "before all" hook in "index_patterns/* error handler"
                 │      KbnClientRequesterError: [GET - http://localhost:5620/api/status] request failed (attempt=0/5): ECONNREFUSED -- and ran out of retries
                 │       at KbnClientRequester.request (kbn_client_requester.ts:142:15)
                 │       at processTicksAndRejections (node:internal/process/task_queues:95:5)
                 │       at KbnClientStatus.get (kbn_client_status.ts:43:22)
                 │       at KbnClientPlugins.getEnabledIds (kbn_client_plugins.ts:17:21)
                 │       at loadAction (load.ts:80:27)
                 │       at Proxy.load (es_archiver.ts:99:12)
                 │       at Context.<anonymous> (errors.js:29:7)
                 │       at Object.apply (wrap_function.js:73:16)
                 │ 
```
## After
```
                 └- ✖ fail: index_patterns index_patterns/service/lib index_patterns/* error handler "before all" hook in "index_patterns/* error handler"
                 │      KbnClientRequesterError: [GET - http://localhost:5620/api/status] request failed (attempt=5/5): ECONNREFUSED -- and ran out of retries
                 │       at KbnClientRequester.request (kbn_client_requester.ts:140:15)
                 │       at processTicksAndRejections (node:internal/process/task_queues:95:5)
                 │       at KbnClientStatus.get (kbn_client_status.ts:43:22)
                 │       at KbnClientPlugins.getEnabledIds (kbn_client_plugins.ts:17:21)
                 │       at loadAction (load.ts:80:27)
                 │       at Proxy.load (es_archiver.ts:99:12)
                 │       at Context.<anonymous> (errors.js:29:7)
                 │       at Object.apply (wrap_function.js:73:16)
```
Please draw your attention to: 
**BEFORE**: `KbnClientRequesterError: [GET -
http://localhost:5620/api/status] request failed (attempt=0/5):
ECONNREFUSED -- and ran out of retries`
 vs 
**AFTER**: `KbnClientRequesterError: [GET -
http://localhost:5620/api/status] request failed (attempt=5/5):
ECONNREFUSED -- and ran out of retries`
 
 So it's now `(attempt=5/5)` and no longer `(attempt=0/5)`
 
 ## To Verify
 **no need to start server**
Place a `.only` on [this
line](7089f35803/x-pack/test_serverless/functional/test_suites/common/management/transforms/transform_list.ts (L40))
 Then run the test with the `.only`
 ```
TEST_BROWSER_HEADLESS=1 node scripts/functional_test_runner
--config=x-pack/test_serverless/functional/test_suites/security/config.context_awareness.ts
```
2024-07-22 13:58:37 +01:00
Shahzad
eb71438b9c
[Synthetics] Status overview embeddable (#188807)
## Summary

Added status overview embeddable !!


https://github.com/user-attachments/assets/27499ecf-549f-43a6-a16b-22a44db36814

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2024-07-22 14:21:50 +02:00
Joe McElroy
bc42310da5
[Search] [Getting Started Guide] Update examples (#188642)
## Summary

Updating the quick start guides. 

Changes:
- introduce a new semantic search guide which talks through
semantic_text
- vector search updates to make the examples simpler + callouts to use
semantic search with semantic_text
 - Updates to AI search to make it more up to date

### 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)
- [ ]
[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
- [ ] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
- [ ] 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: Liam Thompson <32779855+leemthompo@users.noreply.github.com>
Co-authored-by: Rodney Norris <rodney@tattdcodemonkey.com>
2024-07-22 14:19:35 +02:00
jennypavlova
0db883a9d5
[Infra] Disable Top 10 functions full screen table in a flyout (#188743)
## Summary

This PR disables functions full-screen option in the asset details
flyout. It adds control of the `showFullScreenSelector` to the
`EmbeddableFunctionsGrid` so we can set it based on the render mode in
the asset details - in apm it will be set to true as before.

## Testing

- Go to the asset details page
- Check the Universal Profiling tab > Top 10 Functions tab
   - The full-screen option should be visible: 

![image](https://github.com/user-attachments/assets/aace7ca0-ed4f-404d-8cbf-91c29088c133)

   - Same in the tab inside APM service view:

![image](https://github.com/user-attachments/assets/f885630a-4f43-4c23-9ff4-05c03f7ede72)

- Go to Hosts view and open the flyout for a host 
   - The full-screen option should not be visible: 

![image](https://github.com/user-attachments/assets/e724c569-df7a-4e4a-b6c3-9dcfa7b60ad6)

---------

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2024-07-22 07:09:57 -05:00
Pierre Gayvallet
e5638db74e
[core rendering] get rid of getInjectedVar (#188755)
## Summary

Fix https://github.com/elastic/kibana/issues/54376
Fix https://github.com/elastic/kibana/issues/127733

- get rid of the `InjectedMetadata.vars` and `getInjectedVar` deprecated
"API"
- Add `apmConfig` as an explicit `InjectedMetadata` property instead of
passing it via `vars`
- Inject the apm config from the `rendering` service instead of
`httpResource`, as it's just how it should be and how all other things
get injected.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2024-07-22 14:02:12 +02:00
Stratoula Kalafateli
2d2d8cf603
[ES|QL] Max/Min support IP fields (#188808)
## Summary

Follow up of https://github.com/elastic/elasticsearch/pull/110921

ES|QL max and min aggregations support now IP fields.

### 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
2024-07-22 13:49:12 +02:00
Joe McElroy
ce5ca1db2e
[Search] [Playground] Session persistence (#188523)
## Summary

Stores working state into localstorage so when you visit again, you are
where you left off.

### 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
- [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
- [ ] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
- [ ] 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)
2024-07-22 12:26:01 +01:00
Cristina Amico
1bf7b5814c
[Fleet] Show host id in agent overview page (#188822)
Fixes https://github.com/elastic/kibana/issues/182680

## Summary
Display the host id in agent detail page. Previously this info wasn't
displayed anywhere in the UI

![Screenshot 2024-07-22 at 11 29
20](https://github.com/user-attachments/assets/828c4069-8595-4de0-b9a6-b00c6fa66fe0)


### 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
2024-07-22 06:18:58 -05:00
Katerina
7089f35803
[APM] Updated eem schema (#188763)
## Summary

closes: https://github.com/elastic/kibana/issues/188761

### changes

- identityFields returns only the fields, query directly service name
and service environment from entity document (EEM
[change](https://github.com/elastic/kibana/pull/187699))
- Rename `logRatePerMinute` to `logRate` (EEM
[change](https://github.com/elastic/kibana/pull/187021))
2024-07-22 06:04:30 -05:00
Sebastián Zaffarano
aa6aa26866
[Telemetry][Security Solution] Enrich endpoint alerts with license info (#188760) 2024-07-22 05:56:27 -05:00
Tre
47842f9c43
[SKIP ON MKI] x-pack/test_serverless/functional/test_suites/common/discover/esql/_esql_view.ts (#188818)
## Summary

see details: https://github.com/elastic/kibana/issues/188816
2024-07-22 12:41:53 +02:00
Abdul Wahab Zahid
acf25bc64d
[Logs Explorer] Fixe flaky virtual column popover actions e2e tests (#188773)
The PR attempts to fix the flakiness in the e2e tests by avoiding clicks
on an already opened popover. The click statement within
`retry.tryForTime` can be called in succession, which could
inadvertently close the popover, which we want to avoid in this case.

The screenshot from failed tests suggests that the assertion is made on
a closed down popover:

![image](https://github.com/user-attachments/assets/bd3a9e2c-c292-47db-be89-b4f0a35911f9)
2024-07-22 12:18:36 +02:00
Shahzad
d9c651f20a
[SLO] Fix slo manifest (#187139)
## Summary

Fix slo manifest !!

`node scripts/plugin_check --dependencies slo
`
<img width="1007" alt="image"
src="9e710897-6e65-4818-9c51-a23ea18b2a5c">
2024-07-22 12:06:21 +02:00
Tre
dd42834209
[FTR][kbn-test] Update logging (#188292)
## Summary

Redact url auth data from `description` symbol.
Drop much from the `AxiosError` object, a field of the
`KbnClientRequesterError` class.

## Before
```
ERROR [POST http://elastic_serverless:changeme@localhost:5620/internal/kibana/settings] request failed (attempt=1/3): 
ERROR [POST http://elastic_serverless:changeme@localhost:5620/internal/kibana/settings] request failed (attempt=2/3): 
ERROR [POST http://elastic_serverless:changeme@localhost:5620/internal/kibana/settings] request failed (attempt=3/3): 
ERROR KbnClientRequesterError: [POST http://elastic_serverless:changeme@localhost:5620/internal/kibana/settings] request failed (attempt=3/3):  -- and ran out of retries
          at KbnClientRequester.request (kbn_client_requester.ts:172:15)
          at processTicksAndRejections (node:internal/process/task_queues:95:5)
          at KbnClientUiSettings.update (kbn_client_ui_settings.ts:91:5)
          at kibana_server.ts:30:7
          at lifecycle_phase.ts:76:11
          at async Promise.all (index 1)
          at LifecyclePhase.trigger (lifecycle_phase.ts:73:5)
          at functional_test_runner.ts:114:7
          at FunctionalTestRunner.runHarness (functional_test_runner.ts:252:14)
          at FunctionalTestRunner.run (functional_test_runner.ts:48:12)
          at log.defaultLevel (cli.ts:112:32)
          at run.ts:73:10
          at withProcRunner (with_proc_runner.ts:29:5)
          at run (run.ts:71:5)
```
## After
```
ERROR Requesting url (redacted): [http://localhost:5620/internal/kibana/settings]
ERROR Requesting url (redacted): [http://localhost:5620/internal/kibana/settings]
ERROR Requesting url (redacted): [http://localhost:5620/internal/kibana/settings]
ERROR KbnClientRequesterError: [POST - http://localhost:5620/internal/kibana/settings] request failed (attempt=3/3):  -- and ran out of retries
          at KbnClientRequester.request (kbn_client_requester.ts:131:15)
          at processTicksAndRejections (node:internal/process/task_queues:95:5)
          at KbnClientUiSettings.update (kbn_client_ui_settings.ts:91:5)
          at kibana_server.ts:30:7
          at lifecycle_phase.ts:76:11
          at async Promise.all (index 1)
          at LifecyclePhase.trigger (lifecycle_phase.ts:73:5)
          at functional_test_runner.ts:114:7
          at FunctionalTestRunner.runHarness (functional_test_runner.ts:252:14)
          at FunctionalTestRunner.run (functional_test_runner.ts:48:12)
          at log.defaultLevel (cli.ts:112:32)
          at run.ts:73:10
          at withProcRunner (with_proc_runner.ts:29:5)
          at run (run.ts:71:5)
```

---------

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2024-07-22 10:47:47 +01:00
elena-shostak
bb10859e2b
CHIPS cookie support (#188519)
## Summary

Added CHIPS support. `statehood` doesn't support partitioned cookie out
of the box. We can leverage
[contextualize](https://github.com/hapijs/statehood/blob/master/lib/index.js#L35)
function in statehood with a trick, modifying `isSameSite` property.
`Partitioned` attribute is appended only if embedding is not disabled.

## How to test
1. Add to kibana config:
```yml
server.securityResponseHeaders.disableEmbedding: false
xpack.security.sameSiteCookies: 'None'
xpack.security.secureCookies: true
```
2. ES and Kibana need to run over https to test that, because of
`SameSite=None` settings.
Check the `sid` cookie was set with `Partitioned` attribute.

`Set-Cookie` header has `Partitioned` attribute.

![Screenshot 2024-07-10 at 17 53
24](https://github.com/user-attachments/assets/5ddbe7c5-8648-4552-8697-504a32a42bda)

Stored cookie has a `Partition Key`

<img width="1233" alt="Screenshot 2024-07-10 at 18 04 13"
src="https://github.com/user-attachments/assets/cc0c453e-e33f-4999-bcff-d2acd3a0fcd2">


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

__Fixes: https://github.com/elastic/kibana/issues/180974__

### Release Notes
Added CHIPS cookie support.

---------

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2024-07-22 11:40:20 +02:00
Joe Reuter
f1eae5c924
OTel onboarding: Don't fail on folder existing already (#188657)
The current snippet for Linux and Mac fails if it has been run in the
same working dir already, as the directory the collector is unpacked
into exists already and `mkdir` will fail. This PR adds the `-p` flag to
avoid this.

It also updates the snapshot.
2024-07-22 03:32:35 -05:00
Vadim Kibana
cc65a510db
[ES|QL] Support all AST node types in Walker (#188712)
## Summary

Partially addresses https://github.com/elastic/kibana/issues/182255

- This PR add support for all ES|QL AST node types in the `Walker`
class, which means all nodes from any query now will be visited.


### 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)
2024-07-22 03:10:07 -05:00
Kibana Machine
d5b9af1910
[ES|QL] Update function metadata (#188805)
This PR updates the function definitions and inline docs based on the
latest metadata from Elasticsearch.

Co-authored-by: Stratoula Kalafateli <efstratia.kalafateli@elastic.co>
2024-07-22 10:02:10 +02:00
Dominique Clarke
f7e99a2a3c
[Synthetics] rename variables and delete unused files (#188152)
## Summary

Resolves https://github.com/elastic/kibana/issues/188663

Rename variables and files and delete unused files to remove references
to Uptime within Synthetics

Also adds the `x-elastic-internal-origin` header to synthetics e2e tests
2024-07-22 07:12:09 +02:00
Kibana Machine
f387b48386
[api-docs] 2024-07-22 Daily api_docs build (#188806)
Generated by
https://buildkite.com/elastic/kibana-api-docs-daily/builds/776
2024-07-22 05:03:25 +00:00
Kibana Machine
f21a27475b
[api-docs] 2024-07-21 Daily api_docs build (#188799)
Generated by
https://buildkite.com/elastic/kibana-api-docs-daily/builds/775
2024-07-21 05:01:12 +00:00
Nikita Indik
77afb68cf7
[Security Solution] Add VersionPicker component (#188302)
**Partially addresses: https://github.com/elastic/kibana/issues/171520**

## Summary

This PR adds the `VersionPicker` component ThreeWayDiff UI. This
component is a part of the `ComparisonSide` component ([see it on the
Miro
diagram](https://miro.com/app/board/uXjVK0gqjjQ=/?moveToWidget=3458764594147853908&cot=14)).
`ComparisonSide` will display the read-only diff between two selected
field versions.

These component is not yet connected to the Upgrade flyout. You can view
and test it in Storybook by running `yarn storybook security_solution`
in the root Kibana dir. Go to `http://localhost:9001` once the Storybook
is up and running.

<img width="939" alt="Scherm­afbeelding 2024-07-19 om 11 21 55"
src="https://github.com/user-attachments/assets/f0c5de6c-a1dc-4efc-9466-53033b45a300">
2024-07-20 13:15:25 +02:00
Kibana Machine
0dc3fd1755
[api-docs] 2024-07-20 Daily api_docs build (#188794)
Generated by
https://buildkite.com/elastic/kibana-api-docs-daily/builds/774
2024-07-20 05:02:57 +00:00
christineweng
293e37e776
[Security Solution][Alert Details] Add telemetry for expandable flyout previews (#188593)
## Summary

This PR adds telemetry tracking for new preview panels
2024-07-19 18:35:36 -05:00
renovate[bot]
79da36951f
Update dependency msw to ^2.3.2 (main) (#188706)
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [msw](https://mswjs.io) ([source](https://togithub.com/mswjs/msw)) |
[`^2.3.1` ->
`^2.3.2`](https://renovatebot.com/diffs/npm/msw/2.3.1/2.3.2) |
[![age](https://developer.mend.io/api/mc/badges/age/npm/msw/2.3.2?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/msw/2.3.2?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/msw/2.3.1/2.3.2?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/msw/2.3.1/2.3.2?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>mswjs/msw (msw)</summary>

### [`v2.3.2`](https://togithub.com/mswjs/msw/releases/tag/v2.3.2)

[Compare Source](https://togithub.com/mswjs/msw/compare/v2.3.1...v2.3.2)

#### v2.3.2 (2024-07-19)

##### Bug Fixes

- support typescript@5.5 (deprecate v4.7)
([#&#8203;2190](https://togithub.com/mswjs/msw/issues/2190))
([`7df2533`](7df2533c18))
[@&#8203;KaiSpencer](https://togithub.com/KaiSpencer)
[@&#8203;kettanaito](https://togithub.com/kettanaito)

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/elastic/kibana).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy40MzEuNCIsInVwZGF0ZWRJblZlciI6IjM3LjQzMS40IiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJUZWFtOiBDbG91ZCBTZWN1cml0eSIsImJhY2twb3J0OnNraXAiLCJyZWxlYXNlX25vdGU6c2tpcCJdfQ==-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-07-19 14:20:51 -07:00
Rickyanto Ang
47805a6c44
[Cloud Security] AWS FTR Flaky fix (#188616)
## Summary

Flakiness caused by tabs havent load the URL completely, added small
delay between clicking the button and getting the URL of the tab
2024-07-19 14:05:42 -07:00
Kylie Meli
c27adf11da
[integration automatic-import] Small bugfixes (#188778)
This PR fixes two bugs that were causing failures leading to recursion
timeouts when generating integrations:

1) Small prompt tweak to the related prompt instruction the LLM to
include the if condition inside the processor
2) Followup fix to https://github.com/elastic/kibana/pull/187643 to also
include a field null check on the processor
2024-07-19 16:15:51 -04:00
Alexi Doak
5adf5be1c8
[Task Manager] Add partitions to tasks and assign those task partitions to Kibana nodes (#188758)
Resolves https://github.com/elastic/kibana/issues/187700
Resolves https://github.com/elastic/kibana/issues/187698

## Summary

This is a feature branch PR to main. Merging the following PRs that have
already been approved, https://github.com/elastic/kibana/pull/188001 and
https://github.com/elastic/kibana/pull/188368

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2024-07-19 11:46:50 -07:00
Jon
2c8b2ff4a5
Revert org wide PR bot (#188771)
We're seeing frequent check timeouts on the org wide version. This rolls
back to the Kibana version
2024-07-19 13:20:12 -05:00
Melissa Alvarez
caa56862de
[ML]Transforms and Anomaly detection: update width for icon in messages tab to prevent overlap (#188374)
## Summary

Fixes https://github.com/elastic/kibana/issues/188362
Updates the icon column width to prevent overlap between the icon and
timestamp text. Also updates the transform table messages tab to use the
info icons for info level messages to be consistent with messages in the
anomalies table job messages.

This PR also updates the anomaly detection jobs list messages tab where
the same issue was occurring.

This PR is a temporary fix for a EUI regression and will be reverted
once the fix (https://github.com/elastic/eui/issues/7888) is in


Before:

<img width="1451" alt="image"
src="https://github.com/user-attachments/assets/b5d89ac8-573a-45d4-8888-a3a2c48e5fd4">

After:

<img width="1211" alt="image"
src="https://github.com/user-attachments/assets/da8e99c0-704f-4b53-b152-67b72aa655c3">

Anomalies table fix:

<img width="1344" alt="image"
src="https://github.com/user-attachments/assets/4bf99825-9be9-4b89-842b-e9d1610b5294">




### 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
- [ ] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
- [ ] 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: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: Walter Rafelsberger <walter.rafelsberger@elastic.co>
2024-07-19 11:39:43 -06:00
Melissa Alvarez
c830fbb39b
[ML] Single metric viewer functional test: add retry to reduce flakiness (#188686)
## Summary

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

This PR unskips the single metric viewer functional test that is failing
(confirmed functionality is working as expected) and increases the
retries to reduce flakiness.

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


### 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
- [ ] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
- [ ] 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)
2024-07-19 11:26:11 -06:00
Philippe Oberti
d58de3dc31
[Security Solution][Notes] - ensures that notes are always sorted from newest to oldest in expandable flyout notes tab (#188400) 2024-07-20 03:13:01 +10:00
Maryam Saeidi
80ea21792f
[Custom threshold] Fix adding ECS groups multiple times to recovered alert context (#188629)
## Summary

Fix adding ECS group fields to the recovered alert document for the
custom threshold rule; previously
([PR](https://github.com/elastic/kibana/pull/188241)), it was added to
the context instead of the root level.

|Before|After|
|---|---|

|![image](8c043966-8a59-451d-99e8-1267dd08569e)|

The ECS group by fields should be in AAD for all alerts:
|Active|Recovered|No data|
|---|---|---|

|![image](f6950b3f-bc47-48b1-ad8d-3a8ecabc8bd8)|
2024-07-19 18:56:18 +02:00
Kevin Qualters
a1bb786aa1
[Security Solution] [Notes] [Cases] Create shared hook for fetching notes for tables (#188621)
## Summary

This pr updates the cases public component props to accept an onLoad
prop that is already exposed by the alerts table in trigger actions ui,
to be used in the cases alerts table by security solution to fetch notes
data whenever the set of documents in the table changes. Also creates a
new hook for using this logic in the data fetching hooks powering the
various data tables in the security solution.

### 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
2024-07-19 11:59:17 -04:00
Jean-Louis Leysens
6a7a400c70
[HTTP/OAS] zod support (#186190) 2024-07-20 01:53:32 +10:00
christineweng
001436c8ee
[Security Solutioin][Expandable flyout] Fix preview flashing when going back (#188703)
## Summary

This PR fixes an UI bug. When preview status is tracked in url, opening
multiple previews, and clicking `Back` flashes. This is a follow up of
the preview logic changes in
https://github.com/elastic/kibana/pull/186130

To avoid url keeping track of all the previews (which will cause url
length explosion), we only keep the last preview in url, and to keep url
and redux state in sync, redux also always has 1 preview. Before the
fix, we would call `previousPreviewPanelAction`, which empty the preview
array and caused the preview panel to disappear.


**Before**
In a split second, you can see the preview disappears (showing Endpoint
security) and then the user preview appears. Redux shows a call of
`previousPreviewPanelAction` and it empties the preview array


https://github.com/user-attachments/assets/babb12f2-1c1d-422a-87ef-153ed207817b

After


https://github.com/user-attachments/assets/b2ef891c-181d-4da3-9efb-e4afc7123a99
2024-07-20 01:47:18 +10:00
Jatin Kathuria
6238d7f853
[Security Solution] Skips failing EQL test in MKI (#188672)
Raised an issue to unskip in test :
https://github.com/elastic/kibana/issues/188734

This PR simple skips a test failing in MKI Build. Build link & logs can
be found below:


Build link:
https://buildkite.com/elastic/kibana-serverless-security-solution-quality-gate-detection-engine/builds/845#0190c5bd-7072-4c35-a6af-48f4dda768a4


Logs 
```
Security Solution Cypress
x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/rule_creation/eql_rule.cy·ts

EQL rules Detection rules, sequence EQL Creates and enables a new EQL rule with a sequence Creates and enables a new EQL rule with a sequence

Failures in tracked branches: 1
https://dryrun

Buildkite Job
https://buildkite.com/elastic/kibana-serverless-security-solution-quality-gate-detection-engine/builds/845#0190c5bd-7072-4c35-a6af-48f4dda768a4

AssertionError: Timed out retrying after 300000ms: Expected to find element: `[data-test-subj="eqlRuleType"]`, but never found it.
    at selectEqlRuleType (webpack:///./tasks/create_new_rule.ts:838:5)
    at Context.eval (webpack:///./e2e/detection_response/detection_engine/rule_creation/eql_rule.cy.ts:170:24)


```
2024-07-19 17:16:47 +02:00
Ioana Tagirta
ea3700b01c
Add dev console autocomplete for params for POST _query (#188735)
closes https://github.com/elastic/kibana/issues/181429

For ES|QL `POST _query` API we are missing dev console autocomplete
options.

To verify this PR, we can see now we are showing the autocomplete
options for `POST _query`:

<img width="554" alt="Screenshot 2024-07-19 at 12 50 11"
src="https://github.com/user-attachments/assets/8212cca9-a946-4282-a7b1-baa7a8b95233">
<img width="205" alt="Screenshot 2024-07-19 at 12 50 22"
src="https://github.com/user-attachments/assets/64022e7b-dbd2-4fb0-b695-70d7cda7526f">

Values can be selected for url params:
<img width="623" alt="Screenshot 2024-07-19 at 12 48 33"
src="https://github.com/user-attachments/assets/67011ed2-d180-4b48-b718-d218f19d93db">
<img width="362" alt="Screenshot 2024-07-19 at 12 50 01"
src="https://github.com/user-attachments/assets/b5af07ca-8f72-4252-af06-a66afbee8ecc">

Default values for autocompleted request params:
<img width="184" alt="Screenshot 2024-07-19 at 12 50 44"
src="https://github.com/user-attachments/assets/f4598fac-8bcd-4d83-80e3-2763bcc3e3a8">



For reference:

This list the API's parameters:

https://www.elastic.co/guide/en/elasticsearch/reference/current/esql-query-api.html

For the list of values `format` can take:

https://www.elastic.co/guide/en/elasticsearch/reference/current/esql-rest.html#esql-rest-format
2024-07-20 01:06:37 +10:00
James Gowdy
afe3b0f42c
[ML] AIOps Fixing runtime mappings in pattern analysis (#188530)
Runtime mappings need to be passed to the categorization request factory
function and the field validation function.
Initially they were excluded because we only allow pattern analysis on
text fields and it is not possible to create a text runtime field.
However it is possible to apply a filter which uses a runtime field and
doing so causes pattern analysis to fail.

@walterra I have not investigated log rate analysis' behaviour, in this
PR I have just updated the call to `createCategoryRequest` to pass
`undefined`

To test, create a runtime mapping in the data view. Use this in the
query bar or in a filter in Discover and ML's Log Pattern Analysis page.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2024-07-20 00:38:19 +10:00
Kylie Meli
9faf2f6ebf
[integration automatic-import] Missing input config fix (#188695)
## Summary

- Fixing missing configuration options by correcting input names from _
to -
- Prefixing ECS version with v in build file

<img width="982" alt="Screenshot 2024-07-18 at 3 48 42 PM"
src="https://github.com/user-attachments/assets/ba7476e8-6ebd-4177-9465-bd91d85f8aca">
2024-07-19 09:34:47 -04:00
Eyo O. Eyo
ef88274174
fix issue with viewing watcher execution history (#188654)
## Summary

Closes; https://github.com/elastic/kibana/issues/188745

This PR fixes an issue where attempting to view the execution details
from any watcher execution history throws an error; see screenshot below

<img width="2560" alt="Screenshot 2024-07-18 at 15 37 39"
src="https://github.com/user-attachments/assets/6723f6f8-5769-4bbb-94c3-a111502a06d5">

#### Visual confirmation of fix; 

<img width="2560" alt="Screenshot 2024-07-18 at 15 44 02"
src="https://github.com/user-attachments/assets/738d3b2a-4c87-456d-af8a-f0a5a72cdb2b">

<!--

### 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
- [ ] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
- [ ] 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)
-->
2024-07-19 15:09:28 +02:00
Dzmitry Lemechko
88464e5b6d
[FTR] split configs by target into multiple manifest files (#187440)
## Summary

Part of #186515

Split FTR configs manifest into multiple files based on distro
(serverless/stateful) and area of testing (platform/solutions)
Update the CI scripts to support the change, but without logic
modification

More context:

With this change we will have a clear split of FTR test configs owned by
Platform and Solutions. It is a starting point to make configs
discoverable, our test pipelines be flexible and run tests based on
distro/solution.
2024-07-19 15:00:53 +02:00
Cristina Amico
76c19c61c9
[Fleet] Define new telemetry hourly job for reusable policies (#188536)
Part of https://github.com/elastic/kibana/issues/75867

Depends on merging first https://github.com/elastic/telemetry/pull/3759

## Summary

Define new telemetry hourly job for reusable policies; Example of data:
```
   {
        total_integration_policies: 3,
        shared_integration_policies: 2,
        shared_integrations: {
          agents: 10,
          name: 'aws-1',
          pkg_name: 'aws',
          pkg_version: '1.0.0',
          shared_by_agent_policies: 3,
        }
```


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

---------

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2024-07-19 14:50:32 +02:00
Ievgen Sorokopud
39a55156f1
[Security Solution][Detection Engine] removes feature flag for custom highlighted fields edit in 8.16 (#188628)
## Summary

Removes feature flag `bulkCustomHighlightedFieldsEnabled` for 8.16

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2024-07-19 13:52:43 +02:00
Khristinin Nikita
6aaccd6f08
Manual rule run tests (#187958)
## FTR tests for manual rule run:

For all rule types we cover
- that manual rule run can generate alerts
- that it not create duplicates (except case for threshold and esql)
- that suppression work per execution (except trhreshold)
- that suppression work per time period

For IM rule also covered that `threat_query `not affected by manual rule
run range

Also covered several common cases, but tests are created only for custom
query rule:

- disabling rule, after manual rule run execution started, not affecting
manual run executions
- changing name of the rule after manual rule run started, not affecting
alert generated by manual rule run executions


related:
https://github.com/elastic/security-team/issues/9826#issue-2379978026

---------

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2024-07-19 12:42:20 +02:00
Sergi Massaneda
3dd2034b27
[Integration AutoImport] Use kibana data directory as integration build working dir (#188661)
## Summary

This PR changes the working directory to build the integration Zip
package from `/tmp` to the Kibana data directory using the `@kbn/utils`
library.
It also removes the working directory when the integration zip build
finishes, to keep the house clean.

This change is necessary to prevent the ENOENT error from happening in
serverless environments when creating the working directory.

Before:


![serverless_error](https://github.com/user-attachments/assets/f2a89464-d9ed-4eee-a26f-fce300133e8a)

After:


![serverless_success](https://github.com/user-attachments/assets/58ceb2fd-9121-4242-a5f9-0b504ab5e991)

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2024-07-19 12:31:26 +02:00
Sander Philipse
8e7d634e1c
[Search] Disable semantic text UI on Serverless Search (#188683)
## Summary

Disables semantic text UI on Serverless Search
2024-07-19 12:18:04 +02:00