Commit graph

3546 commits

Author SHA1 Message Date
elastic-renovate-prod[bot]
43daa7ee07
Update dependency @redocly/cli to ^1.25.8 (main) (#197990)
Co-authored-by: elastic-renovate-prod[bot] <174716857+elastic-renovate-prod[bot]@users.noreply.github.com>
2024-11-05 07:42:04 -06:00
Steph Milovic
0744b13ee0
[Security solution] Update LangChain packages to latest (#198622) 2024-11-04 10:18:37 -07:00
Jatin Kathuria
641d0e2d47
[Security Solution] Revert security_solution_common package which is unnecessary (#198294)
## Summary

This PR reverts https://github.com/elastic/kibana/pull/189633.

### Background

PR : https://github.com/elastic/kibana/pull/189633 had created a package
`security_solution_common` so that security components can be easily
used in Discover plugins.

But because of recent direction change, I have decided to revert that
change which mainly moved `flyout` code to the
`security_solution_common` package.

Most of the changes that you will see will be path changes replacing
`security_solution_common`.


## TL;DR

`security_solution_common` is being removed as the reason it was created
does not exists any more.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2024-11-04 15:39:32 +01:00
Pierre Gayvallet
631ccb031c
[Inference] create the @kbn/inference-common package (#193464)
## Summary

At the moment, all inference API related types and utilities
(`chatComplete`, `output` and more) are living inside the `inference`
plugin's common folder.

This is somewhat problematic because it forces any consumers of those
types to explicitly depends on the `inference` plugin (via plugin dep or
ts ref), which could lead to any kind of cyclic dependency issues, in
addition to being overall a bad design pattern.

This also makes it more complicated that it should to try to split the
inference logic / task framework / task implementation into distinct
packages or plugins, due to some (concrete) utilities living in the
inference plugin's code.

It's also a bad experience for consumers, as it's quite difficult to
easily resolve imports they need (we're mixing internal and public
exports atm, plus not all types are exported from a single entry point,
making it very tedious to find the right path for each individual import
we need to consume the inference APIs)

This PR addresses most of those points, by introducing a new
`@kbn/inference-common` package and moving all the low level types and
utilities to it, while exposing all of them from the package's
entrypoint.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2024-11-01 04:08:44 -05:00
elastic-renovate-prod[bot]
d1531e351e
Update LaunchDarkly (main) (#198163)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
|
[@launchdarkly/node-server-sdk](https://togithub.com/launchdarkly/js-core/tree/main/packages/sdk/server-node)
([source](https://togithub.com/launchdarkly/js-core)) | dependencies |
patch | [`^9.6.1` ->
`^9.7.0`](https://renovatebot.com/diffs/npm/@launchdarkly%2fnode-server-sdk/9.7.0/9.7.0)
|
|
[launchdarkly-js-client-sdk](https://togithub.com/launchdarkly/js-client-sdk)
| dependencies | minor | [`^3.4.0` ->
`^3.5.0`](https://renovatebot.com/diffs/npm/launchdarkly-js-client-sdk/3.4.0/3.5.0)
|

---

### Release Notes

<details>
<summary>launchdarkly/js-client-sdk
(launchdarkly-js-client-sdk)</summary>

###
[`v3.5.0`](https://togithub.com/launchdarkly/js-client-sdk/blob/HEAD/CHANGELOG.md#350-2024-10-18)

[Compare
Source](https://togithub.com/launchdarkly/js-client-sdk/compare/3.4.0...3.5.0)

##### Features

- Add support for client-side prerequisite events.
([#&#8203;306](https://togithub.com/launchdarkly/js-client-sdk/issues/306))
([fe51da0](fe51da0c2b))

</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.

👻 **Immortal**: This PR will be recreated if closed unmerged. Get
[config help](https://togithub.com/renovatebot/renovate/discussions) if
that's undesired.

---

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

---

This PR has been generated by [Renovate
Bot](https://togithub.com/renovatebot/renovate).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy40MjUuMSIsInVwZGF0ZWRJblZlciI6IjM3LjQyNS4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJUZWFtOkNvcmUiLCJUZWFtOlNlY3VyaXR5IiwiYmFja3BvcnQ6cHJldi1taW5vciIsInJlbGVhc2Vfbm90ZTpza2lwIl19-->

---------

Co-authored-by: elastic-renovate-prod[bot] <174716857+elastic-renovate-prod[bot]@users.noreply.github.com>
Co-authored-by: Alex Szabo <alex.szabo@elastic.co>
2024-10-31 18:08:16 +00:00
elastic-renovate-prod[bot]
a3d90cfcf6
Update ftr (main) (#198455)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [chromedriver](https://togithub.com/giggio/node-chromedriver) |
devDependencies | major | [`^129.0.0` ->
`^130.0.1`](https://renovatebot.com/diffs/npm/chromedriver/129.0.1/130.0.1)
|
|
[geckodriver](https://togithub.com/webdriverio-community/node-geckodriver)
| devDependencies | minor | [`^4.4.4` ->
`^4.5.1`](https://renovatebot.com/diffs/npm/geckodriver/4.4.4/4.5.1) |

---

### Release Notes

<details>
<summary>giggio/node-chromedriver (chromedriver)</summary>

###
[`v130.0.1`](https://togithub.com/giggio/node-chromedriver/compare/130.0.0...130.0.1)

[Compare
Source](https://togithub.com/giggio/node-chromedriver/compare/130.0.0...130.0.1)

###
[`v130.0.0`](https://togithub.com/giggio/node-chromedriver/compare/129.0.4...130.0.0)

[Compare
Source](https://togithub.com/giggio/node-chromedriver/compare/129.0.4...130.0.0)

###
[`v129.0.4`](https://togithub.com/giggio/node-chromedriver/compare/129.0.3...129.0.4)

[Compare
Source](https://togithub.com/giggio/node-chromedriver/compare/129.0.3...129.0.4)

###
[`v129.0.3`](https://togithub.com/giggio/node-chromedriver/compare/129.0.2...129.0.3)

[Compare
Source](https://togithub.com/giggio/node-chromedriver/compare/129.0.2...129.0.3)

###
[`v129.0.2`](https://togithub.com/giggio/node-chromedriver/compare/129.0.1...129.0.2)

[Compare
Source](https://togithub.com/giggio/node-chromedriver/compare/129.0.1...129.0.2)

</details>

<details>
<summary>webdriverio-community/node-geckodriver (geckodriver)</summary>

###
[`v4.5.1`](https://togithub.com/webdriverio-community/node-geckodriver/releases/tag/v4.5.1):
Release 4.5.1

[Compare
Source](https://togithub.com/webdriverio-community/node-geckodriver/compare/v4.5.0...v4.5.1)

- fix: correct type on gecko driver params to be logNoTruncate instead
of logNoTruncated
([#&#8203;567](https://togithub.com/webdriverio-community/node-geckodriver/issues/567))
([`138fde4`](138fde4))
- chore(deps-dev): bump
[@&#8203;vitest/coverage-v8](https://togithub.com/vitest/coverage-v8)
from 2.1.1 to 2.1.2
([#&#8203;562](https://togithub.com/webdriverio-community/node-geckodriver/issues/562))
([`c67f71f`](c67f71f))
- chore(deps-dev): bump eslint-plugin-unicorn from 55.0.0 to 56.0.0
([#&#8203;563](https://togithub.com/webdriverio-community/node-geckodriver/issues/563))
([`8976f2c`](8976f2c))
- chore(deps-dev): bump release-it from 17.6.0 to 17.7.0
([#&#8203;559](https://togithub.com/webdriverio-community/node-geckodriver/issues/559))
([`81cee91`](81cee91))
- chore(deps-dev): bump eslint-plugin-import from 2.30.0 to 2.31.0
([#&#8203;561](https://togithub.com/webdriverio-community/node-geckodriver/issues/561))
([`17fc269`](17fc269))
- chore(deps-dev): bump
[@&#8203;typescript-eslint/eslint-plugin](https://togithub.com/typescript-eslint/eslint-plugin)
([#&#8203;557](https://togithub.com/webdriverio-community/node-geckodriver/issues/557))
([`0adbf99`](0adbf99))
- chore(deps-dev): bump webdriverio from 9.0.9 to 9.1.2
([#&#8203;555](https://togithub.com/webdriverio-community/node-geckodriver/issues/555))
([`82d20c7`](82d20c7))
- chore(deps-dev): bump
[@&#8203;types/node](https://togithub.com/types/node) from 22.5.5 to
22.7.4
([#&#8203;554](https://togithub.com/webdriverio-community/node-geckodriver/issues/554))
([`15a13a8`](15a13a8))
- chore(deps-dev): bump
[@&#8203;typescript-eslint/parser](https://togithub.com/typescript-eslint/parser)
from 8.6.0 to 8.7.0
([#&#8203;556](https://togithub.com/webdriverio-community/node-geckodriver/issues/556))
([`a15da9a`](a15da9a))

###
[`v4.5.0`](https://togithub.com/webdriverio-community/node-geckodriver/releases/tag/v4.5.0):
Release 4.5.0

[Compare
Source](https://togithub.com/webdriverio-community/node-geckodriver/compare/v4.4.4...v4.5.0)

- feat: support spawnOpts for geckodriver child process
([#&#8203;552](https://togithub.com/webdriverio-community/node-geckodriver/issues/552))
([`3edaf8e`](3edaf8e))
- chore(deps): bump rollup from 4.21.3 to 4.22.4
([#&#8203;551](https://togithub.com/webdriverio-community/node-geckodriver/issues/551))
([`2b429a4`](2b429a4))
- chore(deps-dev): bump
[@&#8203;typescript-eslint/parser](https://togithub.com/typescript-eslint/parser)
from 8.5.0 to 8.6.0
([#&#8203;548](https://togithub.com/webdriverio-community/node-geckodriver/issues/548))
([`c24a4c6`](c24a4c6))
- chore(deps-dev): bump
[@&#8203;typescript-eslint/eslint-plugin](https://togithub.com/typescript-eslint/eslint-plugin)
([#&#8203;549](https://togithub.com/webdriverio-community/node-geckodriver/issues/549))
([`6437865`](6437865))
- chore(deps): bump vite from 5.4.5 to 5.4.6
([#&#8203;546](https://togithub.com/webdriverio-community/node-geckodriver/issues/546))
([`9ad9e72`](9ad9e72))
- chore(deps-dev): bump husky from 9.1.5 to 9.1.6
([#&#8203;540](https://togithub.com/webdriverio-community/node-geckodriver/issues/540))
([`590a837`](590a837))
- chore(deps-dev): bump
[@&#8203;types/node](https://togithub.com/types/node) from 22.5.4 to
22.5.5
([#&#8203;543](https://togithub.com/webdriverio-community/node-geckodriver/issues/543))
([`e5f91da`](e5f91da))
- chore(deps-dev): bump
[@&#8203;vitest/coverage-v8](https://togithub.com/vitest/coverage-v8)
from 2.0.5 to 2.1.1
([#&#8203;544](https://togithub.com/webdriverio-community/node-geckodriver/issues/544))
([`cc5c1aa`](cc5c1aa))
- chore(deps-dev): bump npm-run-all2 from 6.2.2 to 6.2.3
([#&#8203;538](https://togithub.com/webdriverio-community/node-geckodriver/issues/538))
([`26d8383`](26d8383))
- chore(deps-dev): bump typescript from 5.5.4 to 5.6.2
([#&#8203;542](https://togithub.com/webdriverio-community/node-geckodriver/issues/542))
([`9c97480`](9c97480))
- chore(deps-dev): bump
[@&#8203;typescript-eslint/parser](https://togithub.com/typescript-eslint/parser)
from 8.4.0 to 8.5.0
([#&#8203;541](https://togithub.com/webdriverio-community/node-geckodriver/issues/541))
([`4bd169d`](4bd169d))
- chore(deps-dev): bump tsx from 4.19.0 to 4.19.1
([#&#8203;539](https://togithub.com/webdriverio-community/node-geckodriver/issues/539))
([`2e366a9`](2e366a9))
- chore(deps-dev): bump
[@&#8203;types/node](https://togithub.com/types/node) from 22.5.2 to
22.5.4
([#&#8203;537](https://togithub.com/webdriverio-community/node-geckodriver/issues/537))
([`78502e3`](78502e3))
- chore(deps-dev): bump
[@&#8203;typescript-eslint/parser](https://togithub.com/typescript-eslint/parser)
from 8.3.0 to 8.4.0
([#&#8203;533](https://togithub.com/webdriverio-community/node-geckodriver/issues/533))
([`9f71ec5`](9f71ec5))
- chore(deps-dev): bump
[@&#8203;typescript-eslint/eslint-plugin](https://togithub.com/typescript-eslint/eslint-plugin)
([#&#8203;531](https://togithub.com/webdriverio-community/node-geckodriver/issues/531))
([`94aed15`](94aed15))
- chore(deps-dev): bump webdriverio from 9.0.7 to 9.0.9
([#&#8203;534](https://togithub.com/webdriverio-community/node-geckodriver/issues/534))
([`fd6c4a6`](fd6c4a6))
- chore(deps-dev): bump eslint-plugin-import from 2.29.1 to 2.30.0
([#&#8203;532](https://togithub.com/webdriverio-community/node-geckodriver/issues/532))
([`ae42ebd`](ae42ebd))

</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.

👻 **Immortal**: This PR will be recreated if closed unmerged. Get
[config help](https://togithub.com/renovatebot/renovate/discussions) if
that's undesired.

---

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

---

This PR has been generated by [Renovate
Bot](https://togithub.com/renovatebot/renovate).

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

Co-authored-by: elastic-renovate-prod[bot] <174716857+elastic-renovate-prod[bot]@users.noreply.github.com>
Co-authored-by: Jon <jon@elastic.co>
2024-10-31 09:12:46 -05:00
Cee Chen
4e7d43a031
Upgrade EUI to v97.3.0 (#198087)
`v97.2.0``v97.3.0`

_[Questions? Please see our Kibana upgrade
FAQ.](https://github.com/elastic/eui/blob/main/wiki/eui-team-processes/upgrading-kibana.md#faq-for-kibana-teams)_

---

## [`v97.3.0`](https://github.com/elastic/eui/releases/v97.3.0)

- `EuiDataGrid` now supports a new
`toolbarVisibility.showDisplaySelector.customRender` function that
allows completely customizing the rendering of the display selector
popover ([#8080](https://github.com/elastic/eui/pull/8080))
- `EuiDataGrid`'s row height/lines per row setting has been streamlined
in both UI and UX ([#8080](https://github.com/elastic/eui/pull/8080))
- `EuiDataGrid` now accepts consumer-passed display setting updates even
after users have changed their display preferences via UI
([#8080](https://github.com/elastic/eui/pull/8080))
- Updated `EuiDataGrid` to vertically center all
`toolbarVisibility.additionalControls` nodes
([#8085](https://github.com/elastic/eui/pull/8085))
- Updated `EuiDataGrid` with a beta
`rowHeightsOptions.autoBelowLineCount` feature flag
([#8096](https://github.com/elastic/eui/pull/8096))
- Updated `EuiContextMenuPanel` to allow disabling initial focus via
`initialFocusedItemIndex={-1}`
([#8101](https://github.com/elastic/eui/pull/8101))

**Bug fixes**

- Fixed `EuiComment`'s typing to correctly reflect all accepted props
([#8089](https://github.com/elastic/eui/pull/8089))
- Fixed `EuiSelectableTemplateSitewide`s within dark-themed `EuiHeader`s
missing input borders
([#8100](https://github.com/elastic/eui/pull/8100))
2024-10-30 19:41:45 -07:00
elastic-renovate-prod[bot]
b7beae8e19
Update dependency @types/lodash to ^4.17.13 (main) (#198275)
Co-authored-by: elastic-renovate-prod[bot] <174716857+elastic-renovate-prod[bot]@users.noreply.github.com>
2024-10-30 08:27:14 -05:00
elastic-renovate-prod[bot]
88ebb55fc7
Update dependency @launchdarkly/node-server-sdk to ^9.6.1 (main) (#196897) 2024-10-29 06:36:48 -05:00
elastic-renovate-prod[bot]
0de1f95d0e
Update dependency msw to ^2.4.12 (main) (#198060)
This PR contains the following updates:

| Package | Type | Update | Change | Pending |
|---|---|---|---|---|
| [msw](https://mswjs.io) ([source](https://togithub.com/mswjs/msw)) |
devDependencies | patch | [`^2.4.11` ->
`^2.4.12`](https://renovatebot.com/diffs/npm/msw/2.4.11/2.4.12) |
`2.5.2` (+3) |

---

### Release Notes

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

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

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

#### v2.4.12 (2024-10-21)

##### Bug Fixes

- **node:** preserve headers instanceof when recording raw headers
([#&#8203;2321](https://togithub.com/mswjs/msw/issues/2321))
([`a58a300`](a58a300687))
[@&#8203;paoloricciuti](https://togithub.com/paoloricciuti)

</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 [Renovate
Bot](https://togithub.com/renovatebot/renovate).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy40MjUuMSIsInVwZGF0ZWRJblZlciI6IjM3LjQyNS4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJUZWFtOkNsb3VkIFNlY3VyaXR5IiwiYmFja3BvcnQ6c2tpcCIsInJlbGVhc2Vfbm90ZTpza2lwIl19-->

Co-authored-by: elastic-renovate-prod[bot] <174716857+elastic-renovate-prod[bot]@users.noreply.github.com>
2024-10-28 18:47:42 -05:00
Mike Côté
c31f11e7d8
Set mget task claim strategy as the default (#197070)
Resolves https://github.com/elastic/kibana/issues/194625

In this PR, I'm setting `mget` as the default task claiming strategy
along the following changes:
- Given we no longer need the 8.16 specific PRs
(https://github.com/elastic/kibana/pull/196317 and
https://github.com/elastic/kibana/pull/196757), I've also reverted them.
- Given we now use `met` as the default, I've renamed
`task_manager_claimer_mget` to `task_manager_claimer_update_by_query`
and made tests in that folder test using the `update_by_query` claim
strategy.
- Stabilize flaky tests caused by mget + polling for tasks more
frequently

Flaky test runners:
-
[[59b71bc](59b71bcdbe)]
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/7197
-
[[aea910e](aea910e36d)]
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/7199
-
[[4723ced](4723ced751)]
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/7206
-
[[d28c8c5](d28c8c56f6)]
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/7209
-
[[dd7773a](dd7773aeba)]
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/7224

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2024-10-25 08:57:46 -04:00
Jeramy Soucy
7732b8d91d
Upgrade @elastic/node-crypto 1.2.1 → 1.2.3 (#197629)
## Summary

Upgrades `@elastic/node-crypto` from v1.2.1 to v1.2.3, upgrades
`@elastic/request-crypto` from v2.0.2 to v2.0.3
2024-10-25 13:32:04 +02:00
Paulina Shakirova
7d1cffd671
refactor: remove unused setup code to connect to remote debugger (#196979)
## Summary

This PR resolved the issue [[Reporting/Dev] Remove setup code for Remote
Debugger - No longer using this feature
](https://github.com/elastic/kibana/issues/101233)
2024-10-24 20:35:33 +02:00
elastic-renovate-prod[bot]
49102dde10
Update dependency @elastic/charts to v68.0.2 (main) (#197572)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [@elastic/charts](https://togithub.com/elastic/elastic-charts) |
dependencies | patch | [`68.0.1` ->
`68.0.2`](https://renovatebot.com/diffs/npm/@elastic%2fcharts/68.0.1/68.0.2)
|

---

### Release Notes

<details>
<summary>elastic/elastic-charts (@&#8203;elastic/charts)</summary>

###
[`v68.0.2`](https://togithub.com/elastic/elastic-charts/blob/HEAD/CHANGELOG.md#6802-2024-10-24)

[Compare
Source](https://togithub.com/elastic/elastic-charts/compare/v68.0.1...v68.0.2)

##### Bug Fixes

- **xy:** single point visibility
([#&#8203;2557](https://togithub.com/elastic/elastic-charts/issues/2557))
([e16c902](e16c902dd5))

</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 [Renovate
Bot](https://togithub.com/renovatebot/renovate).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy40MjUuMSIsInVwZGF0ZWRJblZlciI6IjM3LjQyNS4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJUZWFtOlZpc3VhbGl6YXRpb25zIiwiYmFja3BvcnQ6cHJldi1taW5vciIsInJlbGVhc2Vfbm90ZTpza2lwIl19-->

Co-authored-by: elastic-renovate-prod[bot] <174716857+elastic-renovate-prod[bot]@users.noreply.github.com>
2024-10-24 19:02:27 +02:00
Nick Partridge
a854ff8a4e
[Lens][Datatable] Fix share export and inspect data (#193780)
The exported table data table provided in the inspector and the share export now match what was visible in the UI.
2024-10-24 11:51:38 -05:00
Kerry Gallagher
6b63f7f631
[Logs Overview] Add a flyout to show category document examples (#194867)
## Summary

Implements https://github.com/elastic/kibana/issues/193450.

## Discover changes ⚠️ 

As part of this we need to render a basic table with the log level and
summary columns, which is technically context aware but only in the
sense we know we want it to be a logs context up front.

The "correct" solution here (or at least from recent conversations) is
to use the saved search embeddable. There is upcoming work planned to
move log stream component usages over to the saved search embeddable.
However, currently this isn't in a place to just be dropped in without
some pretty extensive work. I didn't feel comfortable doing a big push
on that work as a side effort to this work, especially with a loose (if
possible) 8.16 aim for this.

What I've done (and which isn't ideal I appreciate) is used the start
contract of the Discover plugin to export the columns / cells
pre-wrapped with the Discover services. It's not ideal in the sense of
dependencies, but technically Discover doesn't use logs shared. I
considered Discover shared but that's for registering functionality for
Discover, rather than the other way around.

Eventually we'll be able to remove this and convert over to the new
solution. I'm all ears to a better solution, but there's a big mismatch
between the needs here and dropping in something that exists currently.
Thankfully the changeset for Discover is small if we're happy to keep
this temporarily.

Edit: I've made some notes here:
https://github.com/elastic/logs-dev/issues/111#issuecomment-2411096251

Edit: New package added here:
c290819c1c

## Overview

From a high level:

- Adds a new state machine for handling "details" to show in the flyout
(document examples now, plus details and a timeline later).

- Hooks this up to a flyout expanded from the categories table.

- Provides linking to Discover to view documents from the category in
the flyout.

I've also left some comments inline.

## UI / UX 

![Screenshot 2024-10-10 at 15 05
21](https://github.com/user-attachments/assets/49b525b1-f730-4e90-9a84-05175edb8c40)


![flyout_open](https://github.com/user-attachments/assets/0995b952-566b-4e09-80cf-20ad94343980)


![discover_link](https://github.com/user-attachments/assets/249ef269-0105-48af-9c81-ebae1cfb1680)

---------

Co-authored-by: Felix Stürmer <felix.stuermer@elastic.co>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: Felix Stürmer <weltenwort@users.noreply.github.com>
Co-authored-by: Julia Rechkunova <julia.rechkunova@gmail.com>
2024-10-24 15:49:27 +01:00
elastic-renovate-prod[bot]
ee9fe0e82a
Update dependency trace to ^3.2.0 (main) (#197354) 2024-10-24 05:14:36 -05:00
elastic-renovate-prod[bot]
d1bf69cf3d
Update dependency @redocly/cli to ^1.25.7 (main) (#197474) 2024-10-23 17:30:25 -05:00
elastic-renovate-prod[bot]
ee6a6bcb64
Update dependency @elastic/charts to v68.0.1 (main) (#197473)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [@elastic/charts](https://togithub.com/elastic/elastic-charts) |
dependencies | patch | [`68.0.0` ->
`68.0.1`](https://renovatebot.com/diffs/npm/@elastic%2fcharts/68.0.0/68.0.1)
|

---

### Release Notes

<details>
<summary>elastic/elastic-charts (@&#8203;elastic/charts)</summary>

###
[`v68.0.1`](https://togithub.com/elastic/elastic-charts/blob/HEAD/CHANGELOG.md#6801-2024-10-23)

[Compare
Source](https://togithub.com/elastic/elastic-charts/compare/v68.0.0...v68.0.1)

##### Bug Fixes

- **deps:** update dependency
[@&#8203;playwright/test](https://togithub.com/playwright/test) to
^1.47.2
([#&#8203;2539](https://togithub.com/elastic/elastic-charts/issues/2539))
([10d5f40](10d5f40f99))
- **Metric:** improve default font-sizing
([#&#8203;2548](https://togithub.com/elastic/elastic-charts/issues/2548))
([2e1178d](2e1178da38))

</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 [Renovate
Bot](https://togithub.com/renovatebot/renovate).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy40MjUuMSIsInVwZGF0ZWRJblZlciI6IjM3LjQyNS4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJUZWFtOlZpc3VhbGl6YXRpb25zIiwiYmFja3BvcnQ6cHJldi1taW5vciIsInJlbGVhc2Vfbm90ZTpza2lwIl19-->

Co-authored-by: elastic-renovate-prod[bot] <174716857+elastic-renovate-prod[bot]@users.noreply.github.com>
2024-10-23 17:27:57 -05:00
Christos Nasikas
a7a81c2897
[ResponseOps][Rules] Create the rule params package (#196971)
## Summary

This PR creates a package containing the schema of the params of all
rule types. It starts as `schema.recordOf(schema.string(),
schema.maybe(schema.any()))` which is the current one. In subsequent
PRs, the schema will be updated to `schema.oneOf([apmRuleType,
esQueryRuleType, ....])`. I also substituted the definition of `params`
in the alerting plugin with the `params` exported from the package.

Towards: https://github.com/elastic/kibana/issues/187356
Fixes: https://github.com/elastic/kibana/issues/195183

### For maintainers

- [x] This was checked for breaking API changes and was [labeled
appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#_add_your_labels)
- [ ] This will appear in the **Release Notes** and follow the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2024-10-23 09:44:38 +03:00
elastic-renovate-prod[bot]
3c3f748d83
Update dependency @redocly/cli to ^1.25.6 (main) (#197146)
Co-authored-by: elastic-renovate-prod[bot] <174716857+elastic-renovate-prod[bot]@users.noreply.github.com>
2024-10-22 17:29:04 -05:00
Larry Gregory
1e05086ea4
Remove unused dependencies (#197058)
## Summary

Removes the following unused dependencies:

- `@cfworker/json-schema`
- `flat`
- `font-awesome`
- `html2canvas`
- `@formatjs/cli`
- `@formatjs/cli-lib`
- `@types/babel__core`
- `@types/babel__generator`
- `@types/babel__helper-plugin-utils`
- `@types/event-stream`
- `@types/flat`
- `@types/md5`
- `@types/pegjs`
- `@types/tapable`
- `@types/zen-observable`
- `debug`
- `html`


Also removes `pbf` from `devDependencies`, as it already exists in the
production `dependencies` list.
2024-10-22 12:04:01 -04:00
Gerard Soldevila
2a085e103a
Add ESLINT constraints to detect inter-group dependencies (#194810)
## Summary

Addresses https://github.com/elastic/kibana-team/issues/1175

As part of the **Sustainable Kibana Architecture** initiative, this PR
sets the foundation to start classifying plugins in isolated groups,
matching our current solutions / project types:

* It adds support for the following fields in the packages' manifests
(kibana.jsonc):
* `group?: 'search' | 'security' | 'observability' | 'platform' |
'common'`
  * `visibility?: 'private' | 'shared'`

* It proposes a folder structure to automatically infer groups:
```javascript
  'src/platform/plugins/shared': {
    group: 'platform',
    visibility: 'shared',
  },
  'src/platform/plugins/internal': {
    group: 'platform',
    visibility: 'private',
  },
  'x-pack/platform/plugins/shared': {
    group: 'platform',
    visibility: 'shared',
  },
  'x-pack/platform/plugins/internal': {
    group: 'platform',
    visibility: 'private',
  },
  'x-pack/solutions/observability/plugins': {
    group: 'observability',
    visibility: 'private',
  },
  'x-pack/solutions/security/plugins': {
    group: 'security',
    visibility: 'private',
  },
  'x-pack/solutions/search/plugins': {
    group: 'search',
    visibility: 'private',
  },
```

* If a plugin is moved to one of the specific locations above, the group
and visibility in the manifest (if specified) must match those inferred
from the path.
* Plugins that are not relocated are considered: `group: 'common',
visibility: 'shared'` by default. As soon as we specify a custom
`group`, the ESLINT rules will check violations against dependencies /
dependants.

The ESLINT rules are pretty simple:
* Plugins can only depend on:
  * Plugins in the same group
  * OR plugins with `'shared'` visibility
* Plugins in `'observability', 'security', 'search'` groups are
mandatorily `'private'`.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2024-10-22 06:34:19 -05:00
elastic-renovate-prod[bot]
993e6839cd
Update dependency msw to ^2.4.11 (main) (#197147)
This PR contains the following updates:

| Package | Type | Update | Change | Pending |
|---|---|---|---|---|
| [msw](https://mswjs.io) ([source](https://togithub.com/mswjs/msw)) |
devDependencies | patch | [`^2.4.10` ->
`^2.4.11`](https://renovatebot.com/diffs/npm/msw/2.4.11/2.4.11) |
`2.4.12` |

---

### 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 [Renovate
Bot](https://togithub.com/renovatebot/renovate).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy40MjUuMSIsInVwZGF0ZWRJblZlciI6IjM3LjQyNS4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJUZWFtOkNsb3VkIFNlY3VyaXR5IiwiYmFja3BvcnQ6c2tpcCIsInJlbGVhc2Vfbm90ZTpza2lwIl19-->

Co-authored-by: elastic-renovate-prod[bot] <174716857+elastic-renovate-prod[bot]@users.noreply.github.com>
2024-10-21 19:24:29 -05:00
elastic-renovate-prod[bot]
a1c902ac4e
Update dependency msw to ^2.4.10 (main) (#196901)
This PR contains the following updates:

| Package | Type | Update | Change | Pending |
|---|---|---|---|---|
| [msw](https://mswjs.io) ([source](https://togithub.com/mswjs/msw)) |
devDependencies | patch | [`^2.4.9` ->
`^2.4.10`](https://renovatebot.com/diffs/npm/msw/2.4.9/2.4.10) |
`2.4.11` |

---

### Release Notes

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

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

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

#### v2.4.10 (2024-10-11)

##### Bug Fixes

- **setupWorker:** perform worker update in the background
([#&#8203;2311](https://togithub.com/mswjs/msw/issues/2311))
([`8e40724`](8e40724cd3))
[@&#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 [Renovate
Bot](https://togithub.com/renovatebot/renovate).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy40MjUuMSIsInVwZGF0ZWRJblZlciI6IjM3LjQyNS4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJUZWFtOkNsb3VkIFNlY3VyaXR5IiwiYmFja3BvcnQ6c2tpcCIsInJlbGVhc2Vfbm90ZTpza2lwIl19-->

---------

Co-authored-by: elastic-renovate-prod[bot] <174716857+elastic-renovate-prod[bot]@users.noreply.github.com>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Paulo Silva <paulo.henrique@elastic.co>
2024-10-21 15:29:12 -07:00
elastic-renovate-prod[bot]
a7ea69a006
Update dependency @types/lodash to ^4.17.12 (main) (#196898) 2024-10-19 13:24:18 -05:00
elastic-renovate-prod[bot]
22b442f616
Update dependency listr2 to ^8.2.5 (main) (#196899)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [listr2](https://togithub.com/listr2/listr2) | devDependencies | patch
| [`^8.2.4` ->
`^8.2.5`](https://renovatebot.com/diffs/npm/listr2/8.2.4/8.2.5) |

---

### Release Notes

<details>
<summary>listr2/listr2 (listr2)</summary>

###
[`v8.2.5`](https://togithub.com/listr2/listr2/releases/tag/listr2%408.2.5)

[Compare
Source](https://togithub.com/listr2/listr2/compare/listr2@&#8203;8.2.4...listr2@&#8203;8.2.5)

#### listr2
[8.2.5](https://togithub.com/listr2/listr2/compare/listr2@&#8203;8.2.4...listr2@&#8203;8.2.5)
(2024-10-03)

##### Bug Fixes

- ability to use zen-observable
([bae701b](bae701bab5)),
closes [#&#8203;724](https://togithub.com/listr2/listr2/issues/724)

</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 [Renovate
Bot](https://togithub.com/renovatebot/renovate).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy40MjUuMSIsInVwZGF0ZWRJblZlciI6IjM3LjQyNS4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJUZWFtOk9wZXJhdGlvbnMiLCJiYWNrcG9ydDphbGwtb3BlbiIsInJlbGVhc2Vfbm90ZTpza2lwIl19-->

Co-authored-by: elastic-renovate-prod[bot] <174716857+elastic-renovate-prod[bot]@users.noreply.github.com>
2024-10-18 17:37:10 -05:00
Lene Gadewoll
d7c5608420
Upgrade EUI to v97.2.0 (#196397)
`v97.0.0-backport.0``v97.2.0`

_[Questions? Please see our Kibana upgrade
FAQ.](https://github.com/elastic/eui/blob/main/wiki/eui-team-processes/upgrading-kibana.md#faq-for-kibana-teams)_

---

## [`v97.2.0`](https://github.com/elastic/eui/releases/v97.2.0)

- Updated `EuiHeaderLinks` with a new `xxs` gutter size
([#8079](https://github.com/elastic/eui/pull/8079))

**Bug fixes**

- Reverted an `EuiDataGrid` regression from
[#8015](https://github.com/elastic/eui/pull/8015) which prevented
overriding column widths via columns's `initialWidth`s
([#8086](https://github.com/elastic/eui/pull/8086))


## [`v97.1.0`](https://github.com/elastic/eui/releases/v97.1.0)

- Added `columnVisibility.canDragAndDropColumns` on `EuiDataGrid` which
enables reordering columns via draggable header cells
([#8015](https://github.com/elastic/eui/pull/8015))
- Updated `EuiHeader`s in dark mode to have a visible border-bottom
color ([#8070](https://github.com/elastic/eui/pull/8070))
- Added props `minDate` and `maxDate` on `EuiSuperDatePicker` to support
restricting date range selections
([#8071](https://github.com/elastic/eui/pull/8071))
2024-10-18 15:06:35 -07:00
Lukas Olson
b0bae065d4
Move ItemBuffer to package (#196455)
## Summary

Part of https://github.com/elastic/kibana/issues/186139.

Bfetch exports `ItemBuffer` and `TimedItemBuffer`, the latter of which
is also used inside of the content management plugin.

After bfetch is removed, content management will be the sole consumer,
which is why I've added the team ownership to be appex-sharedux.

### Checklist

- [x]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2024-10-18 14:55:42 -07:00
Alejandro Fernández Haro
41998b48f7
Improve stack traces in dev mode (#195916) 2024-10-18 17:35:08 +02:00
elastic-renovate-prod[bot]
138ed75317
Update dependency @xyflow/react to ^12.3.1 (main) (#196007)
This PR contains the following updates:

| Package | Type | Update | Change | Pending |
|---|---|---|---|---|
| [@xyflow/react](https://reactflow.dev)
([source](https://togithub.com/xyflow/xyflow/tree/HEAD/packages/react))
| dependencies | patch | [`^12.3.0` ->
`^12.3.1`](https://renovatebot.com/diffs/npm/@xyflow%2freact/12.3.0/12.3.1)
| `12.3.2` |

---

### Release Notes

<details>
<summary>xyflow/xyflow (@&#8203;xyflow/react)</summary>

###
[`v12.3.1`](https://togithub.com/xyflow/xyflow/blob/HEAD/packages/react/CHANGELOG.md#1231)

[Compare
Source](https://togithub.com/xyflow/xyflow/compare/@xyflow/react@12.3.0...@xyflow/react@12.3.1)

##### Patch Changes

- [#&#8203;4670](https://togithub.com/xyflow/xyflow/pull/4670)
[`b056564c`](b056564c96)
Thanks [@&#8203;peterkogo](https://togithub.com/peterkogo)! - Fix
initial `fitView` not working correctly for `nodeOrigin` other than
\[0,0]

- [#&#8203;4670](https://togithub.com/xyflow/xyflow/pull/4670)
[`b056564c`](b056564c96)
Thanks [@&#8203;peterkogo](https://togithub.com/peterkogo)! - Improve
`fitView` to respect clamped node positions based on `nodeExtent`

- [#&#8203;4653](https://togithub.com/xyflow/xyflow/pull/4653)
[`02390f99`](02390f9966)
Thanks [@&#8203;bcakmakoglu](https://togithub.com/bcakmakoglu)! -
Calculate viewport dimensions in `fitView` instead of using stored
dimensions. Fixes
[#&#8203;4652](https://togithub.com/xyflow/xyflow/issues/4652)

- Updated dependencies
\[[`99ba64ac`](99ba64ac2e),
[`b056564c`](b056564c96)]:
-
[@&#8203;xyflow/system](https://togithub.com/xyflow/system)[@&#8203;0](https://togithub.com/0).0.43

</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 [Renovate
Bot](https://togithub.com/renovatebot/renovate).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy40MjUuMSIsInVwZGF0ZWRJblZlciI6IjM3LjQyNS4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJUZWFtOkNsb3VkIFNlY3VyaXR5IiwiYmFja3BvcnQ6c2tpcCIsInJlbGVhc2Vfbm90ZTpza2lwIl19-->

Co-authored-by: elastic-renovate-prod[bot] <174716857+elastic-renovate-prod[bot]@users.noreply.github.com>
2024-10-17 15:34:21 -05:00
Cauê Marcondes
3bfa7c0018
[Inventory] Adding initial e2e structure (#196560)
closes https://github.com/elastic/kibana/issues/193992

How to open cypress dashboard locally:
```
node x-pack/plugins/observability_solution/inventory/scripts/test/e2e.js --open            
```

How to run cypress tests:
```
node x-pack/plugins/observability_solution/inventory/scripts/test/e2e.js
```

How to run cypress tests multiple times:
```
node x-pack/plugins/observability_solution/inventory/scripts/test/e2e.js --server
node x-pack/plugins/observability_solution/inventory/scripts/test/e2e.js --runner --times=X
```

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2024-10-17 08:50:11 -05:00
Anton Dosov
dc3dda7d12
[React@18] useLayoutEffect when setting value from a prop in react-monaco-editor (#195775)
## Summary

This PR is part of
https://github.com/elastic/kibana-team/issues/1016#issuecomment-2399310175
and needed to upgrade Kibana to React@18 in Legacy mode.

We've found a problem in `react-monaco-editor` component which is a very
thin wrapper around `monaco` where it doesn't play nicely with React@18
in legacy mode. You can read on details around the issue here
https://github.com/elastic/eui/issues/8018 where we've found a similar
issue in EUI's search bar component. The workaround we've found is to
change `useEffect` -> `useLayouEffect` where the value that is coming
from the prop is set into the model. The issue and a fix might be a bit
controversal and the component is very thin, so I decided that it might
be better to bring the fork into Kibana with only what's needed and with
a workaround.
2024-10-17 13:24:06 +02:00
Jatin Kathuria
fa92a8ede7
[Security Solution] Event Renderer Virtualization (#193316)
## Summary

This PR implements virtualization when Event Renderers are enabled.
Ideally from UX pespective nothing should change but from performance
perspective, the event renderers should be scalable.

### Testing checklist

1. UX is working same as before when Event Renderers are enabled.
2. Operations such as increasing page size from `10` to `100` are not
taking as much time as before. Below operations can be used to test.
   a. Closing / Opening Timeline
   b. Changes `Rows per page`
   c. Changes tabs from query to any other and back.

### Before
In below video, you will notice how long it took to change `pageSize` to
100 and all 100 rows are rendered at once.


https://github.com/user-attachments/assets/106669c9-bda8-4b7d-af3f-b64824bde397


### After


https://github.com/user-attachments/assets/356d9e1f-caf1-4f88-9223-0e563939bf6b



> [!Note]
> 1. Also test in small screen. The table should be scrollable but
nothing out of ordinary.
> 2. Additionally, try to load data which has `network_flow` process so
as to create bigger and varied Event Renderers.

---------

Co-authored-by: Cee Chen <constance.chen@elastic.co>
2024-10-16 12:53:49 -05:00
Matthew Kime
d3fc354cbb
upgrade request-converter for 8.16 (#196193)
## Summary

https://github.com/elastic/request-converter needs to be updated
regularly to maintain support for the latest ES apis.
2024-10-16 11:44:34 +01:00
Nicolas Chaulet
a63b93976c
[Fleet] Add placeholder and comments to integration config (#195735) 2024-10-15 15:18:43 -04:00
Quentin Pradet
920d782392
[Console] Remove unused spec-to-console package (#193426)
Closes https://github.com/elastic/kibana/issues/163333

## Summary

It was superseded by generate-console-definitions.

### 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: Elena Stoeva <59341489+ElenaStoeva@users.noreply.github.com>
2024-10-15 10:04:54 -05:00
elastic-renovate-prod[bot]
563910b672
Update dependency @types/lodash to ^4.17.10 (main) (#194739) 2024-10-15 08:21:03 +02:00
Aleh Zasypkin
cb2112cae5
feat: allow plugins to deprecate and replace features and feature privileges (#186800)
## Summary

This change is the implementation of the `Kibana Privilege Migrations`
proposal/RFC and provides a framework that allows developers to replace
an existing feature with a new one that has the desired configuration
while teaching the platform how the privileges of the deprecated feature
can be represented by non-deprecated ones. This approach avoids
introducing breaking changes for users who still rely on the deprecated
privileges in their existing roles and any automation.

Among the use cases the framework is supposed to handle, the most common
are the following:

* Changing a feature ID from `Alpha` to `Beta`
* Splitting a feature `Alpha` into two features, `Beta` and `Gamma`
* Moving a capability between privileges within a feature (top-level or
sub-feature)
* Consolidating capabilities across independent features

## Scope

This PR includes only the core functionality proposed in the RFC and
most of the necessary guardrails (tests, early validations, etc.) to
help engineers start planning and implementing their migrations as soon
as possible. The following functionality will be added in follow-ups or
once we collect enough feedback:

* Telemetry
* Developer documentation
* UI enhancements (highlighting roles with deprecated privileges and
manual migration actions)

## Framework

The steps below use a scenario where a feature `Alpha` should be split
into two other features `Beta` and `Gamma` as an example.

### Step 1: Create new features with the desired privileges

First of all, define new feature or features with the desired
configuration as you'd do before. There are no constraints here.

<details>

<summary>Click to see the code</summary>

```ts
deps.features.registerKibanaFeature({
  id: 'feature_beta',
  name: 'Feature Beta',
  privileges: {
    all: {
      savedObject: { all: ['saved_object_1'], read: [] },
      ui: ['ui_all'],
      api: ['api_all'],
      … omitted for brevity …
    },
    read: {
      savedObject: { all: [], read: ['saved_object_1'] },
      ui: ['ui_read'],
      api: ['api_read'],
      … omitted for brevity …
    },
  },
  … omitted for brevity …
});

deps.features.registerKibanaFeature({
  id: 'feature_gamma',
  name: 'Feature Gamma',
  privileges: {
    all: {
      savedObject: { all: ['saved_object_2'], read: [] },
      ui: ['ui_all'],
      // Note that Feature Gamma, unlike Features Alpha and Beta doesn't provide any API access tags
      … omitted for brevity …
    },
    read: {
      savedObject: { all: [], read: ['saved_object_2'] },
      ui: ['ui_read'],
      // Note that Feature Gamma, unlike Features Alpha and Beta doesn't provide any API access tags
      … omitted for brevity …
    },
  },
  … omitted for brevity …
});
```

</details>

### Step 2: Mark existing feature as deprecated

Once a feature is marked as deprecated, it should essentially be treated
as frozen for backward compatibility reasons. Deprecated features will
no longer be available through the Kibana role management UI and will be
replaced with non-deprecated privileges.

Deprecated privileges will still be accepted if the role is created or
updated via the Kibana role management APIs to avoid disrupting existing
user automation.

To avoid breaking existing roles that reference privileges provided by
the deprecated features, Kibana will continue registering these
privileges as Elasticsearch application privileges.

<details>

<summary>Click to see the code</summary>

```ts
deps.features.registerKibanaFeature({
  // This is a new `KibanaFeature` property available during feature registration.
  deprecated: {
    // User-facing justification for privilege deprecation that we can display
    // to the user when we ask them to perform role migration.
    notice: i18n.translate('xpack.security...', {
      defaultMessage: "Feature Alpha is deprecated, refer to {link}...",
      values: { link: docLinks.links.security.deprecatedFeatureAlpha },
    })
  },
  // Feature id should stay unchanged, and it's not possible to reuse it.
  id: 'feature_alpha',
  name: 'Feature Alpha (DEPRECATED)',
  privileges: {
    all: {
      savedObject: { all: ['saved_object_1', 'saved_object_2'], read: [] },
      ui: ['ui_all'],
      api: ['api_all'],
      … omitted for brevity …
    },
    read: {
      savedObject: { all: [], read: ['saved_object_1', 'saved_object_2'] },
      ui: ['ui_read'],
      api: ['api_read'],
      … omitted for brevity …
    },
  },
  … omitted for brevity …
});
```
</details>

### Step 3: Map deprecated feature’s privileges to the privileges of the
non-deprecated features

The important requirement for a successful migration from a deprecated
feature to a new feature or features is that it should be possible to
express **any combination** of the deprecated feature and sub-feature
privileges with the feature or sub-feature privileges of non-deprecated
features. This way, while editing a role with deprecated feature
privileges in the UI, the admin will be interacting with new privileges
as if they were creating a new role from scratch, maintaining
consistency.

The relationship between the privileges of the deprecated feature and
the privileges of the features that are supposed to replace them is
expressed with a new `replacedBy` property available on the privileges
of the deprecated feature.

<details>

<summary>Click to see the code</summary>

```ts
deps.features.registerKibanaFeature({
  // This is a new `KibanaFeature` property available during feature registration.
  deprecated: {
    // User-facing justification for privilege deprecation that we can display
    // to the user when we ask them to perform role migration.
    notice: i18n.translate('xpack.security...', {
      defaultMessage: "Feature Alpha is deprecated, refer to {link}...",
      values: { link: docLinks.links.security.deprecatedFeatureAlpha },
    })
  },
  // Feature id should stay unchanged, and it's not possible to reuse it.
  id: 'feature_alpha',
  name: 'Feature Alpha (DEPRECATED)',
  privileges: {
    all: {
      savedObject: { all: ['saved_object_1', 'saved_object_2'], read: [] },
      ui: ['ui_all'],
      api: ['api_all'],
      replacedBy: [
        { feature: 'feature_beta', privileges: ['all'] },
        { feature: 'feature_gamma', privileges: ['all'] },
      ],
      … omitted for brevity …
    },
    read: {
      savedObject: { all: [], read: ['saved_object_1', 'saved_object_2'] },
      ui: ['ui_read'],
      api: ['api_read'],
      replacedBy: [
        { feature: 'feature_beta', privileges: ['read'] },
        { feature: 'feature_gamma', privileges: ['read'] },
	],
      … omitted for brevity …
    },
  },
  … omitted for brevity …
});
```

</details>

### Step 4: Adjust the code to rely only on new, non-deprecated features

Special care should be taken if the replacement privileges cannot reuse
the API access tags from the deprecated privileges and introduce new
tags that will be applied to the same API endpoints. In this case,
developers should replace the API access tags of the deprecated
privileges with the corresponding tags provided by the replacement
privileges. This is necessary because API endpoints can only be accessed
if the user privileges cover all the tags listed in the API endpoint
definition, and without these changes, existing roles referencing
deprecated privileges won’t be able to access those endpoints.

The UI capabilities are handled slightly differently because they are
always prefixed with the feature ID. When migrating to new features with
new IDs, the code that interacts with UI capabilities will be updated to
use these new feature IDs.

<details>

<summary>Click to see the code</summary>

```ts
// BEFORE deprecation/migration
// 1. Feature Alpha defition (not deprecated yet)
deps.features.registerKibanaFeature({
  id: 'feature_alpha',
  privileges: {
    all: {
      api: ['api_all'],
      … omitted for brevity …
    },
  },
  … omitted for brevity …
});

// 2. Route protected by `all` privilege of the Feature Alpha
router.post(
  { path: '/api/domain/my_api', options: { tags: ['access:api_all'] } },
  async (_context, request, response) => {}
);

// AFTER deprecation/migration
// 1. Feature Alpha defition (deprecated, with updated API tags)
deps.features.registerKibanaFeature({
  deprecated: …,
  id: 'feature_alpha',
  privileges: {
    all: {
      api: ['api_all_v2'],
      replacedBy: [
        { feature: 'feature_beta', privileges: ['all'] },
      ],
      … omitted for brevity …
    },
  },
  … omitted for brevity …
});

// 2. Feature Beta defition (new)
deps.features.registerKibanaFeature({
  id: 'feature_beta',
  privileges: {
    all: {
      api: ['api_all_v2'],
      … omitted for brevity …
    }
  },
  … omitted for brevity …
});

// 3. Route protected by `all` privilege of the Feature Alpha OR Feature Beta
router.post(
  { path: '/api/domain/my_api', options: { tags: ['access:api_all_v2'] } },
  async (_context, request, response) => {}
);

----

//  Old client-side code (supports only deprecated privileges)
if (capabilities.feature_alpha.ui_all) {
  … omitted for brevity …
}

//  New client-side code (will work for **both** new and deprecated privileges)
if (capabilities.feature_beta.ui_all) {
  … omitted for brevity …
}
```
</details>

## How to test

The code introduces a set of API integration tests that are designed to
validate whether the privilege mapping between deprecated and
replacement privileges maintains backward compatibility.

You can run the test server with the following config to register a
number of [example deprecated
features](https://github.com/elastic/kibana/pull/186800/files#diff-d887981d43bbe30cda039340b906b0fa7649ba80230be4de8eda326036f10f6fR20-R49)(`x-pack/test/security_api_integration/plugins/features_provider/server/index.ts`)
and the features that replace them, to see the framework in action:

```bash
node scripts/functional_tests_server.js --config x-pack/test/security_api_integration/features.config.ts
```

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2024-10-14 14:40:59 -05:00
Tomasz Kajtoch
e5b0b8108b
Upgrade EUI to v97.0.0-backport.0 (#196138)
`v97.0.0``v97.0.0-backport.0`

_[Questions? Please see our Kibana upgrade
FAQ.](https://github.com/elastic/eui/blob/main/wiki/eui-team-processes/upgrading-kibana.md#faq-for-kibana-teams)_

---

# Backport

This EUI backport adds a single requested change on top of `v97.0.0` to
get it in Kibana before the 8.16 feature freeze:

* https://github.com/elastic/eui/pull/8071

The change can be considered a patch release and shouldn't affect any of
the existing usages of `EuiSuperDatePicker`
2024-10-14 20:16:23 +02:00
Kfir Peled
96eff23f50
[Cloud Security] Refactoring cloud-security-posture packages' folder structure (#196008)
## Summary

Organized the team's packages under the same root folder

```
 "@kbn/cloud-security-posture": "link:x-pack/packages/cloud_security_posture/public",
 "@kbn/cloud-security-posture-common": "link:x-pack/packages/kbn-cloud-security-posture/common",
 "@kbn/cloud-security-posture-graph": "link:x-pack/packages/kbn-cloud-security-posture/graph",
```

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2024-10-14 09:43:08 -05:00
Christiane (Tina) Heiligers
500ac5b195
[dependency update] update reflect-metadata version requirment (#196020)
Updates dependency from `^0.2.1` to `^0.2.2`

---------

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2024-10-14 06:28:32 -07:00
Cee Chen
cd60c66d19
Upgrade EUI to v97.0.0 (#195525)
`v96.1.0``v97.0.0`

_[Questions? Please see our Kibana upgrade
FAQ.](https://github.com/elastic/eui/blob/main/wiki/eui-team-processes/upgrading-kibana.md#faq-for-kibana-teams)_

---

## [`v97.0.0`](https://github.com/elastic/eui/releases/v97.0.0)

**Breaking changes**

- EuiDataGrid's custom grid body (rendered via `renderCustomGridBody`)
no longer automatically renders the column header row or footer rows. It
instead now passes the `headerRow` and `footerRow` React elements, which
require manual rendering.
([#8028](https://github.com/elastic/eui/pull/8028))
- This change was made to allow consumers to sync header/footer rows
with their own custom virtualization libraries.
- To facilitate this, a `gridWidth` prop is now also passed to custom
grid body renderers.

**Bug fixes**

- Fixed inputs not taking the whole width when passing `fullWidth` as
`true` to EuiDatePickerRange component
([#8061](https://github.com/elastic/eui/pull/8061))

**Accessibility**

- Improved accessibility of `EuiExternalLinkIcon` by clarifying text for
Screen Reader users. ([#8065](https://github.com/elastic/eui/pull/8065))

---------

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2024-10-14 13:35:35 +02:00
Kfir Peled
be0eadfb9f
[Cloud Security] Graph visualization and API (#195307)
## Summary

This PR adds:
- Graph visualization component using `xyflow`, and layouts the graph
using `dagre`.
- API that supports the graph visualization
- API tests
- Serverless API tests

**List of open issues (will be tracked in a different ticket):**
- Identify if `related.hosts`, `related.ip` and `related.user` are
mapped before the query. (can be fixed by
https://github.com/elastic/elasticsearch/issues/112912)
- Update nodes rendering to match recent figma changes
- Return 404 when feature is not enabled
- Add keyboard accessibility
- Resolve 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))

### How to test

You can view the graph using storybook's
[playground](https://supreme-adventure-8qjmlp1.pages.github.io/graph-storybook/?path=/story/components-graph-components-dagree-layout-graph--graph-stacked-edge-cases).

To test this PR you can run

```
yarn storybook cloud_security_posture_packages
```

To test the API you can use the mocked data

```bash
node scripts/es_archiver load x-pack/test/cloud_security_posture_api/es_archives/logs_gcp_audit \ 
--es-url http://elastic:changeme@localhost:9200 \
--kibana-url http://elastic:changeme@localhost:5601
```

And through dev tools:

```
POST kbn:/internal/cloud_security_posture/graph?apiVersion=1
{
  "query": {
    "actorIds": ["admin@example.com"],
    "eventIds": [""],
    "start": "now-1y/y",
    "end": "now/d"
  }
}
```

### 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
- [x] [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))
- [x] This renders correctly on smaller devices using a responsive
layout. (You can test this [in your
browser](https://www.browserstack.com/guide/responsive-testing-on-local-server))
- [x] This was checked for [cross-browser
compatibility](https://www.elastic.co/support/matrix#matrix_browsers)

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2024-10-11 22:37:02 -05:00
Sander Philipse
ee341d5f80
[Search Assistant] Use scopes to modify behavior contextually (#195785)
## Summary

This actually uses the Search Assistant scope to modify the assistant's
behavior depending on the context they're in. The assistant now:
- Defaults to Observability mode
- Is a Search assistant in the Search pages
- Switches dynamically, changing available functions, prompts and
instructions based on context

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2024-10-11 18:09:06 -05:00
elastic-renovate-prod[bot]
072df4a4d4
Update dependency @redocly/cli to ^1.25.5 (main) (#195910)
Co-authored-by: elastic-renovate-prod[bot] <174716857+elastic-renovate-prod[bot]@users.noreply.github.com>
2024-10-11 11:38:07 -05:00
Sander Philipse
8a3a05927b
Extract AI assistant to package (#194552)
## Summary

This extracts the Observability AI Assistant into a shared package so
Search and Observability can both consume it.

A few notes:

This still relies on significantly tight coupling with the Obs AI
assistant plugin, which we will want to slowly decouple over time. It
means that currently to consume this in multiple places, you need to
provide a number of plugins for useKibana. Hopefully we can get rid of
that and replace them with props eventually and make the interface a
little less plugin-dependent.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2024-10-10 15:11:49 +02:00
Ignacio Rivas
d86ce77217
Remove kbn-ace, ace and brace dependencies (#195703) 2024-10-10 14:16:42 +02:00
Felix Stürmer
0caea22006
[Logs Overview] Overview component (iteration 1) (attempt 2) (#195673)
This is a re-submission of https://github.com/elastic/kibana/pull/191899, which was reverted due to
a storybook build problem. This introduces a "Logs Overview" component for use in solution UIs
behind a feature flag.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Kerry Gallagher <471693+Kerry350@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2024-10-10 12:46:25 +02:00
Brad White
a31b16e411 Revert "[Logs Overview] Overview component (iteration 1) (#191899)"
This reverts commit 15bccdf233.
2024-10-09 12:40:00 -06:00