Commit graph

6592 commits

Author SHA1 Message Date
Gerard Soldevila
d18a44c042
Sustainable Kibana Architecture: Relocate script v4 (#204383)
## Summary

* Auto-detect "upstream" and "origin" remotes (instead of assuming their
names).
* Allow relocating modules that are already in a "sustainable" folder.
  * Filter out modules that are in the correct locations.
* Update the list of _modules to relocate_ to show only those modules
that are actually moved.

---------

Co-authored-by: Alejandro Fernández Haro <afharo@gmail.com>
2024-12-16 09:45:31 -06:00
Elena Shostak
a25f1954bf
Removed TLSv1.1 from default set of supported protocols (#203856)
## Summary

Removed `TLSv1.1` from default set of supported protocols.


### Checklist

- [x]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [x] The PR description includes the appropriate Release Notes section,
and the correct `release_note:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)


## Release Note
Removed `TLSv1.1` from default set of supported protocols

__Closes: https://github.com/elastic/kibana/issues/184756__

---------

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2024-12-16 16:27:44 +01:00
Karen Grigoryan
3a6d27af37
[React@18] Improve console.error suppression in react-testing-library setup (#201142) (#202600)
In addition to changes introduced by #201142

Reasoning:

This pull request includes changes to the
`packages/kbn-test/src/jest/setup/react_testing_library.js` file to
improve internal error logging suppression from react-testing-library.
In particular,
[this](1e01273374/src/core/console.ts (L1-L4))
suppression logic has been migrated to avoid breaking devUX
expectations.

Tested against https://github.com/elastic/kibana/pull/201142 code
changes
2024-12-16 14:41:10 +01:00
Alejandro Fernández Haro
2ed34427c0
[Deprecations] Logs Sources settings in all spaces (#203042) 2024-12-16 13:40:56 +01:00
Alejandro Fernández Haro
25b171d6d7
[Deprecations/Docs] Address uncommented apis (#204198)
## Summary

#203042 highlighted these APIs not having comments.


### Checklist


- [x]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
2024-12-16 06:13:16 -06:00
Gerard Soldevila
39732db6da
Sustainable Kibana Architecture: Relocate script v3 (#204239)
## Summary

* Added link to rebase guideline in PR description.
* Do not count `elasticmachine` commits as manual.
* Replace references in CODEOWNERS file manual section.
* Update README prerequisites.
2024-12-13 17:15:31 -06:00
Gerard Soldevila
f144078712
Sustainable Kibana Architecture: Move modules owned by @elastic/security-threat-hunting-explore (#202852)
## Summary

This PR aims at relocating some of the Kibana modules (plugins and
packages) into a new folder structure, according to the _Sustainable
Kibana Architecture_ initiative.

> [!IMPORTANT]
> * We kindly ask you to:
> * Manually fix the errors in the error section below (if there are
any).
> * Search for the `packages[\/\\]` and `plugins[\/\\]` patterns in the
source code (Babel and Eslint config files), and update them
appropriately.
> * Manually review
`.buildkite/scripts/pipelines/pull_request/pipeline.ts` to ensure that
any CI pipeline customizations continue to be correctly applied after
the changed path names
> * Review all of the updated files, specially the `.ts` and `.js` files
listed in the sections below, as some of them contain relative paths
that have been updated.
> * Think of potential impact of the move, including tooling and
configuration files that can be pointing to the relocated modules. E.g.:
>     * customised eslint rules
>     * docs pointing to source code

> [!NOTE]
> * This PR has been auto-generated.
> * Any manual contributions will be lost if the 'relocate' script is
re-run.
> * Try to obtain the missing reviews / approvals before applying manual
fixes, and/or keep your changes in a .patch / git stash.
> * Please use
[#sustainable_kibana_architecture](https://elastic.slack.com/archives/C07TCKTA22E)
Slack channel for feedback.

#### 1 plugin(s) are going to be relocated:

| Id | Target folder |
| -- | ------------- |
| `@kbn/ecs-data-quality-dashboard-plugin` |
`x-pack/solutions/security/plugins/ecs_data_quality_dashboard` |




#### 8 packages(s) are going to be relocated:

| Id | Target folder |
| -- | ------------- |
| `@kbn/cell-actions` | `src/platform/packages/shared/kbn-cell-actions`
|
| `@kbn/ecs-data-quality-dashboard` |
`x-pack/solutions/security/packages/ecs_data_quality_dashboard` |
| `@kbn/security-solution-features` |
`x-pack/solutions/security/packages/features` |
| `@kbn/security-solution-navigation` |
`x-pack/solutions/security/packages/navigation` |
| `@kbn/security-solution-side-nav` |
`x-pack/solutions/security/packages/side_nav` |
| `@kbn/security-solution-storybook-config` |
`x-pack/solutions/security/packages/storybook/config` |
| `@kbn/security-solution-upselling` |
`x-pack/solutions/security/packages/upselling` |
| `@kbn/securitysolution-ecs` |
`src/platform/packages/shared/kbn-securitysolution-ecs` |


<details >
<summary>Updated references</summary>

```
./.eslintrc.js
./.i18nrc.json
./docs/developer/plugin-list.asciidoc
./package.json
./packages/kbn-repo-packages/package-map.json
./packages/kbn-ts-projects/config-paths.json
./src/dev/storybook/aliases.ts
./src/platform/packages/shared/kbn-cell-actions/jest.config.js
./src/platform/packages/shared/kbn-securitysolution-ecs/jest.config.js
./tsconfig.base.json
./x-pack/.i18nrc.json
./x-pack/solutions/security/plugins/ecs_data_quality_dashboard/jest.config.js
./yarn.lock
```

</details><details >
<summary>Updated relative paths</summary>

```
src/platform/packages/shared/kbn-cell-actions/jest.config.js:12
src/platform/packages/shared/kbn-cell-actions/tsconfig.json:2
src/platform/packages/shared/kbn-securitysolution-ecs/jest.config.js:12
src/platform/packages/shared/kbn-securitysolution-ecs/tsconfig.json:2
x-pack/solutions/security/plugins/ecs_data_quality_dashboard/jest.config.js:15
x-pack/solutions/security/plugins/ecs_data_quality_dashboard/tsconfig.json:12
x-pack/solutions/security/plugins/ecs_data_quality_dashboard/tsconfig.json:2
```

</details>

---------

Co-authored-by: Karen Grigoryan <karen.grigoryan@elastic.co>
2024-12-13 12:46:30 -06:00
Matthew Kime
2fd89943c5
kibana-management team module move (#203883)
## Summary

This PR aims at relocating some of the Kibana modules (plugins and
packages) into a new folder structure, according to the _Sustainable
Kibana Architecture_ initiative.

> [!IMPORTANT]
> * We kindly ask you to:
> * Manually fix the errors in the error section below (if there are
any).
> * Search for the `packages[\/\\]` and `plugins[\/\\]` patterns in the
source code (Babel and Eslint config files), and update them
appropriately.
> * Manually review
`.buildkite/scripts/pipelines/pull_request/pipeline.ts` to ensure that
any CI pipeline customizations continue to be correctly applied after
the changed path names
> * Review all of the updated files, specially the `.ts` and `.js` files
listed in the sections below, as some of them contain relative paths
that have been updated.
> * Think of potential impact of the move, including tooling and
configuration files that can be pointing to the relocated modules. E.g.:
>     * customised eslint rules
>     * docs pointing to source code

> [!NOTE]
> * This PR has been auto-generated.
> * Any manual contributions will be lost if the 'relocate' script is
re-run.
> * Try to obtain the missing reviews / approvals before applying manual
fixes, and/or keep your changes in a .patch / git stash.
> * Please use
[#sustainable_kibana_architecture](https://elastic.slack.com/archives/C07TCKTA22E)
Slack channel for feedback.

#### 17 plugin(s) are going to be relocated:

| Id | Target folder |
| -- | ------------- |
| `@kbn/cloud-data-migration-plugin` |
`x-pack/platform/plugins/private/cloud_integrations/cloud_data_migration`
|
| `@kbn/console-plugin` | `src/platform/plugins/shared/console` |
| `@kbn/cross-cluster-replication-plugin` |
`x-pack/platform/plugins/private/cross_cluster_replication` |
| `@kbn/dev-tools-plugin` | `src/platform/plugins/shared/dev_tools` |
| `@kbn/es-ui-shared-plugin` |
`src/platform/plugins/shared/es_ui_shared` |
| `@kbn/grokdebugger-plugin` |
`x-pack/platform/plugins/private/grokdebugger` |
| `@kbn/index-lifecycle-management-plugin` |
`x-pack/platform/plugins/private/index_lifecycle_management` |
| `@kbn/license-api-guard-plugin` |
`x-pack/platform/plugins/private/license_api_guard` |
| `@kbn/license-management-plugin` |
`x-pack/platform/plugins/shared/license_management` |
| `@kbn/management-plugin` | `src/platform/plugins/shared/management` |
| `@kbn/painless-lab-plugin` |
`x-pack/platform/plugins/private/painless_lab` |
| `@kbn/remote-clusters-plugin` |
`x-pack/platform/plugins/private/remote_clusters` |
| `@kbn/rollup-plugin` | `x-pack/platform/plugins/private/rollup` |
| `@kbn/runtime-fields-plugin` |
`x-pack/platform/plugins/private/runtime_fields` |
| `@kbn/searchprofiler-plugin` |
`x-pack/platform/plugins/shared/searchprofiler` |
| `@kbn/snapshot-restore-plugin` |
`x-pack/platform/plugins/private/snapshot_restore` |
| `@kbn/watcher-plugin` | `x-pack/platform/plugins/private/watcher` |




#### 17 packages(s) are going to be relocated:

| Id | Target folder |
| -- | ------------- |
| `@kbn/deeplinks-devtools` |
`src/platform/packages/shared/deeplinks/devtools` |
| `@kbn/deeplinks-management` |
`src/platform/packages/shared/deeplinks/management` |
| `@kbn/default-nav-devtools` |
`src/platform/packages/private/default-nav/devtools` |
| `@kbn/default-nav-management` |
`src/platform/packages/private/default-nav/management` |
| `@kbn/index-lifecycle-management-common-shared` |
`x-pack/platform/packages/shared/index-lifecycle-management/index_lifecycle_management_common_shared`
|
| `@kbn/index-management-shared-types` |
`x-pack/platform/packages/shared/index-management/index_management_shared_types`
|
| `@kbn/management-cards-navigation` |
`src/platform/packages/shared/kbn-management/cards_navigation` |
| `@kbn/management-settings-application` |
`src/platform/packages/private/kbn-management/settings/application` |
| `@kbn/management-settings-components-field-category` |
`src/platform/packages/private/kbn-management/settings/components/field_category`
|
| `@kbn/management-settings-components-field-input` |
`src/platform/packages/shared/kbn-management/settings/components/field_input`
|
| `@kbn/management-settings-components-field-row` |
`src/platform/packages/shared/kbn-management/settings/components/field_row`
|
| `@kbn/management-settings-components-form` |
`src/platform/packages/private/kbn-management/settings/components/form`
|
| `@kbn/management-settings-field-definition` |
`src/platform/packages/shared/kbn-management/settings/field_definition`
|
| `@kbn/management-settings-types` |
`src/platform/packages/shared/kbn-management/settings/types` |
| `@kbn/management-settings-utilities` |
`src/platform/packages/shared/kbn-management/settings/utilities` |
| `@kbn/rollup` | `x-pack/platform/packages/private/rollup` |
| `@kbn/unsaved-changes-prompt` |
`src/platform/packages/shared/kbn-unsaved-changes-prompt` |


<details >
<summary>Updated references</summary>

```
./.buildkite/scripts/steps/console_definitions_sync.sh
./.eslintrc.js
./.i18nrc.json
./docs/developer/contributing/development-tests.asciidoc
./docs/developer/plugin-list.asciidoc
./package.json
./packages/kbn-generate-console-definitions/README.md
./packages/kbn-repo-packages/package-map.json
./packages/kbn-search-connectors/components/cron_editor/readme.md
./packages/kbn-ts-projects/config-paths.json
./src/dev/precommit_hook/casing_check_config.js
./src/dev/storybook/aliases.ts
./src/platform/packages/private/default-nav/devtools/jest.config.js
./src/platform/packages/private/default-nav/management/jest.config.js
./src/platform/packages/private/kbn-management/settings/components/field_category/jest.config.js
./src/platform/packages/shared/deeplinks/devtools/jest.config.js
./src/platform/packages/shared/deeplinks/management/jest.config.js
./src/platform/packages/shared/kbn-management/cards_navigation/jest.config.js
./src/platform/packages/shared/kbn-unsaved-changes-prompt/jest.config.js
./src/platform/plugins/shared/console/README.md
./src/platform/plugins/shared/console/jest.config.js
./src/platform/plugins/shared/console/server/lib/elasticsearch_proxy_config.test.js
./src/platform/plugins/shared/console/server/lib/spec_definitions/json/README.md
./src/platform/plugins/shared/es_ui_shared/.storybook/manager.ts
./src/platform/plugins/shared/es_ui_shared/jest.config.js
./src/platform/plugins/shared/es_ui_shared/static/forms/README.md
./src/platform/plugins/shared/management/jest.config.js
./src/plugins/advanced_settings/README.md
./src/plugins/management/README.md
./tsconfig.base.json
./x-pack/.i18nrc.json
./x-pack/platform/packages/private/rollup/jest.config.js
./x-pack/platform/packages/shared/index-management/index_management_shared_types/jest.config.js
./x-pack/platform/plugins/private/cloud_integrations/cloud_data_migration/jest.config.js
./x-pack/platform/plugins/private/cross_cluster_replication/jest.config.js
./x-pack/platform/plugins/private/grokdebugger/jest.config.js
./x-pack/platform/plugins/private/index_lifecycle_management/integration_tests/README.md
./x-pack/platform/plugins/private/index_lifecycle_management/jest.config.js
./x-pack/platform/plugins/private/index_lifecycle_management/jest.integration.config.js
./x-pack/platform/plugins/private/license_api_guard/jest.config.js
./x-pack/platform/plugins/private/painless_lab/jest.config.js
./x-pack/platform/plugins/private/remote_clusters/jest.config.js
./x-pack/platform/plugins/private/rollup/jest.config.js
./x-pack/platform/plugins/private/runtime_fields/jest.config.js
./x-pack/platform/plugins/private/snapshot_restore/jest.config.js
./x-pack/platform/plugins/private/watcher/jest.config.js
./x-pack/platform/plugins/shared/license_management/jest.config.js
./x-pack/platform/plugins/shared/searchprofiler/jest.config.js
./x-pack/plugins/index_management/README.md
./x-pack/plugins/triggers_actions_ui/README.md
./x-pack/plugins/triggers_actions_ui/server/data/routes/indices.ts
./x-pack/solutions/security/packages/navigation/src/constants.ts
./x-pack/test/functional/apps/dev_tools/searchprofiler_editor.ts
./yarn.lock
```

</details><details >
<summary>Updated relative paths</summary>

```
src/platform/packages/private/default-nav/devtools/jest.config.js:12
src/platform/packages/private/default-nav/devtools/tsconfig.json:2
src/platform/packages/private/default-nav/management/jest.config.js:12
src/platform/packages/private/default-nav/management/tsconfig.json:2
src/platform/packages/private/kbn-management/settings/application/tsconfig.json:2
src/platform/packages/private/kbn-management/settings/components/field_category/jest.config.js:12
src/platform/packages/private/kbn-management/settings/components/field_category/tsconfig.json:2
src/platform/packages/private/kbn-management/settings/components/form/tsconfig.json:2
src/platform/packages/shared/deeplinks/devtools/jest.config.js:12
src/platform/packages/shared/deeplinks/devtools/tsconfig.json:2
src/platform/packages/shared/deeplinks/management/jest.config.js:12
src/platform/packages/shared/deeplinks/management/tsconfig.json:2
src/platform/packages/shared/kbn-management/cards_navigation/jest.config.js:12
src/platform/packages/shared/kbn-management/cards_navigation/tsconfig.json:2
src/platform/packages/shared/kbn-management/settings/components/field_input/tsconfig.json:2
src/platform/packages/shared/kbn-management/settings/components/field_row/tsconfig.json:2
src/platform/packages/shared/kbn-management/settings/field_definition/tsconfig.json:2
src/platform/packages/shared/kbn-management/settings/types/tsconfig.json:2
src/platform/packages/shared/kbn-management/settings/utilities/tsconfig.json:2
src/platform/packages/shared/kbn-unsaved-changes-prompt/jest.config.js:12
src/platform/packages/shared/kbn-unsaved-changes-prompt/tsconfig.json:2
src/platform/plugins/shared/console/jest.config.js:12
src/platform/plugins/shared/console/tsconfig.json:2
src/platform/plugins/shared/dev_tools/tsconfig.json:2
src/platform/plugins/shared/es_ui_shared/jest.config.js:12
src/platform/plugins/shared/es_ui_shared/tsconfig.json:12
src/platform/plugins/shared/es_ui_shared/tsconfig.json:2
src/platform/plugins/shared/management/jest.config.js:12
src/platform/plugins/shared/management/tsconfig.json:10
src/platform/plugins/shared/management/tsconfig.json:2
x-pack/platform/packages/private/rollup/jest.config.js:10
x-pack/platform/packages/private/rollup/tsconfig.json:2
x-pack/platform/packages/shared/index-lifecycle-management/index_lifecycle_management_common_shared/tsconfig.json:2
x-pack/platform/packages/shared/index-management/index_management_shared_types/jest.config.js:10
x-pack/platform/packages/shared/index-management/index_management_shared_types/tsconfig.json:2
x-pack/platform/plugins/private/cloud_integrations/cloud_data_migration/jest.config.js:10
x-pack/platform/plugins/private/cloud_integrations/cloud_data_migration/tsconfig.json:10
x-pack/platform/plugins/private/cloud_integrations/cloud_data_migration/tsconfig.json:2
x-pack/platform/plugins/private/cross_cluster_replication/jest.config.js:10
x-pack/platform/plugins/private/cross_cluster_replication/tsconfig.json:2
x-pack/platform/plugins/private/grokdebugger/jest.config.js:10
x-pack/platform/plugins/private/grokdebugger/tsconfig.json:10
x-pack/platform/plugins/private/grokdebugger/tsconfig.json:2
x-pack/platform/plugins/private/index_lifecycle_management/jest.config.js:10
x-pack/platform/plugins/private/index_lifecycle_management/jest.integration.config.js:10
x-pack/platform/plugins/private/index_lifecycle_management/tsconfig.json:12
x-pack/platform/plugins/private/index_lifecycle_management/tsconfig.json:2
x-pack/platform/plugins/private/license_api_guard/jest.config.js:10
x-pack/platform/plugins/private/license_api_guard/tsconfig.json:2
x-pack/platform/plugins/private/painless_lab/jest.config.js:10
x-pack/platform/plugins/private/painless_lab/public/styles/_index.scss:1
x-pack/platform/plugins/private/painless_lab/tsconfig.json:2
x-pack/platform/plugins/private/remote_clusters/jest.config.js:10
x-pack/platform/plugins/private/remote_clusters/tsconfig.json:12
x-pack/platform/plugins/private/remote_clusters/tsconfig.json:2
x-pack/platform/plugins/private/rollup/jest.config.js:10
x-pack/platform/plugins/private/rollup/tsconfig.json:2
x-pack/platform/plugins/private/runtime_fields/README.md:155
x-pack/platform/plugins/private/runtime_fields/jest.config.js:10
x-pack/platform/plugins/private/runtime_fields/tsconfig.json:2
x-pack/platform/plugins/private/runtime_fields/tsconfig.json:8
x-pack/platform/plugins/private/snapshot_restore/jest.config.js:10
x-pack/platform/plugins/private/snapshot_restore/tsconfig.json:12
x-pack/platform/plugins/private/snapshot_restore/tsconfig.json:2
x-pack/platform/plugins/private/watcher/jest.config.js:10
x-pack/platform/plugins/private/watcher/tsconfig.json:12
x-pack/platform/plugins/private/watcher/tsconfig.json:2
x-pack/platform/plugins/shared/license_management/jest.config.js:10
x-pack/platform/plugins/shared/license_management/tsconfig.json:2
x-pack/platform/plugins/shared/searchprofiler/jest.config.js:10
x-pack/platform/plugins/shared/searchprofiler/public/application/_app.scss:1
x-pack/platform/plugins/shared/searchprofiler/tsconfig.json:2
```

</details>

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2024-12-13 12:29:30 -06:00
Ying Mao
42693caf5f
Revert "[Response Ops][Alerting] Backfill actions schema changes for intermediate release (#203184)" (#204218)
This reverts commit b9bac1628b.

## Summary

Reverting to investigate `Failed to poll for work: Invalid interval
"PT1M". Intervals must be of the form {number}m. Example: 5m.` logs
which may be caused by the updated task schema
2024-12-13 12:30:12 -05:00
Gonçalo Rica Pais da Silva
5791d36d88
[ObsUX][Synthtrace] Remove pidusage for logging cpu usage (#204043)
## Summary

Removes `pidusage` in favour of just getting cpu usage stats from
`node:process` for logging purposes. Other than that, not sure the point
of logging this, but keeping it in case it serves some purpose.

Closes #203983 

## How to test

Not sure, make sure CI doesn't break or something from its removal,
given it is only used for logging.
2024-12-13 17:58:49 +01:00
Dzmitry Lemechko
693a16bf72
[Scout] add initial docs (#204050)
## Summary

Adding initial documentation for the new Kibana Test Framework. 

To reviewers: please read it carefully and provide your feedback/changes
so that we have a solid documentation in place.
2024-12-13 16:38:09 +00:00
Irene Blanco
05e05db07c
[ECO] Add e2e to ensure consistent alert count across APM, Infra and Alerts app (#203845)
## Summary

Closes https://github.com/elastic/kibana/issues/202415.

We recently worked on aligning the alert counts across Entity Inventory,
APM (https://github.com/elastic/kibana/issues/201565), Infra
(https://github.com/elastic/kibana/issues/201567) and the Alerts app.

This PR adds tests to ensure that the alert count remains consistent
across all the impacted pages.

>[!NOTE]
>Alerts data can't be provided using its own Synthtrace client as it
hasn't been created yet.
For these tests, the data is ingested through the API.

### How to run in local
`node x-pack/plugins/observability_solution/inventory/scripts/test/e2e
--server`
`node x-pack/plugins/observability_solution/inventory/scripts/test/e2e
--runner --open`

### Test execution


https://github.com/user-attachments/assets/7f350618-38a2-4e5c-8e8d-8a2166f89ad8
2024-12-13 16:45:57 +01:00
Miriam
0cd82ae09a
[ObsUX][INFRA] Remove-infra-from-babel-preset-styled-components (#204213)
## Summary

After migrating infra plugin from `styled-components` to `@emotion` in
this [PR](https://github.com/elastic/kibana/pull/202405), this file was
missed to update
2024-12-13 15:40:26 +00:00
Gerard Soldevila
6de695a55c
Sustainable Kibana Architecture: Move modules owned by @elastic/security-generative-ai (#202848)
## Summary

This PR aims at relocating some of the Kibana modules (plugins and
packages) into a new folder structure, according to the _Sustainable
Kibana Architecture_ initiative.

> [!IMPORTANT]
> * We kindly ask you to:
> * Manually fix the errors in the error section below (if there are
any).
> * Search for the `packages[\/\\]` and `plugins[\/\\]` patterns in the
source code (Babel and Eslint config files), and update them
appropriately.
> * Manually review
`.buildkite/scripts/pipelines/pull_request/pipeline.ts` to ensure that
any CI pipeline customizations continue to be correctly applied after
the changed path names
> * Review all of the updated files, specially the `.ts` and `.js` files
listed in the sections below, as some of them contain relative paths
that have been updated.
> * Think of potential impact of the move, including tooling and
configuration files that can be pointing to the relocated modules. E.g.:
>     * customised eslint rules
>     * docs pointing to source code

> [!NOTE]
> * This PR has been auto-generated.
> * Any manual contributions will be lost if the 'relocate' script is
re-run.
> * Try to obtain the missing reviews / approvals before applying manual
fixes, and/or keep your changes in a .patch / git stash.
> * Please use
[#sustainable_kibana_architecture](https://elastic.slack.com/archives/C07TCKTA22E)
Slack channel for feedback.

#### 1 plugin(s) are going to be relocated:

| Id | Target folder |
| -- | ------------- |
| `@kbn/elastic-assistant-plugin` |
`x-pack/solutions/security/plugins/elastic_assistant` |




#### 3 packages(s) are going to be relocated:

| Id | Target folder |
| -- | ------------- |
| `@kbn/elastic-assistant` |
`x-pack/platform/packages/shared/kbn-elastic-assistant` |
| `@kbn/elastic-assistant-common` |
`x-pack/platform/packages/shared/kbn-elastic-assistant-common` |
| `@kbn/langchain` | `x-pack/platform/packages/shared/kbn-langchain` |


<details >
<summary>Updated references</summary>

```
./.buildkite/scripts/steps/code_generation/elastic_assistant_codegen.sh
./.buildkite/scripts/steps/openapi_bundling/security_solution_openapi_bundling.sh
./.eslintrc.js
./.github/codeql/codeql-config.yml
./docs/developer/plugin-list.asciidoc
./oas_docs/scripts/merge_ess_oas.js
./oas_docs/scripts/merge_serverless_oas.js
./package.json
./packages/kbn-repo-packages/package-map.json
./packages/kbn-ts-projects/config-paths.json
./tsconfig.base.json
./tsconfig.base.type_check.json
./tsconfig.refs.json
./x-pack/.i18nrc.json
./x-pack/packages/kbn-elastic-assistant-common/README.md
./x-pack/platform/packages/shared/kbn-elastic-assistant-common/README.md
./x-pack/platform/packages/shared/kbn-elastic-assistant-common/env/README.md
./x-pack/platform/packages/shared/kbn-elastic-assistant-common/impl/capabilities/README.md
./x-pack/platform/packages/shared/kbn-elastic-assistant-common/jest.config.js
./x-pack/platform/packages/shared/kbn-elastic-assistant/README.md
./x-pack/platform/packages/shared/kbn-elastic-assistant/jest.config.js
./x-pack/platform/packages/shared/kbn-langchain/jest.config.js
./x-pack/plugins/elastic_assistant/README.md
./x-pack/plugins/security_solution/docs/openapi/README.md
./x-pack/solutions/security/plugins/elastic_assistant/README.md
./x-pack/solutions/security/plugins/elastic_assistant/jest.config.js
./x-pack/solutions/security/plugins/elastic_assistant/scripts/create_conversations_script.ts
./x-pack/solutions/security/plugins/elastic_assistant/server/__mocks__/docs_from_directory_loader.ts
./x-pack/solutions/security/plugins/elastic_assistant/server/knowledge_base/security_labs/embedding_security_in_llm_workflows.md
./x-pack/solutions/security/plugins/elastic_assistant/server/lib/attack_discovery/graphs/default_attack_discovery_graph/index.ts
./yarn.lock
```

</details><details >
<summary>Updated relative paths</summary>

```
x-pack/platform/packages/shared/kbn-elastic-assistant-common/jest.config.js:21
x-pack/platform/packages/shared/kbn-elastic-assistant-common/scripts/openapi/bundle.js:8
x-pack/platform/packages/shared/kbn-elastic-assistant-common/scripts/openapi/generate.js:8
x-pack/platform/packages/shared/kbn-elastic-assistant-common/tsconfig.json:2
x-pack/platform/packages/shared/kbn-elastic-assistant/jest.config.js:21
x-pack/platform/packages/shared/kbn-elastic-assistant/tsconfig.json:15
x-pack/platform/packages/shared/kbn-elastic-assistant/tsconfig.json:2
x-pack/platform/packages/shared/kbn-langchain/jest.config.js:20
x-pack/platform/packages/shared/kbn-langchain/tsconfig.json:2
x-pack/solutions/security/plugins/elastic_assistant/jest.config.js:14
x-pack/solutions/security/plugins/elastic_assistant/scripts/create_conversations.js:8
x-pack/solutions/security/plugins/elastic_assistant/scripts/draw_graph.js:8
x-pack/solutions/security/plugins/elastic_assistant/scripts/model_evaluator.js:8
x-pack/solutions/security/plugins/elastic_assistant/tsconfig.json:13
x-pack/solutions/security/plugins/elastic_assistant/tsconfig.json:2
```

</details>

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2024-12-13 09:39:24 -06:00
Katerina
bd1c00fd65
[Perfomance] Track time range picker with onPageReady function (#202889)
## Summary

closes https://github.com/elastic/observability-dev/issues/3377
## Metrics 
#### `meta.query_range_secs` - The duration of the selected time range
in seconds.
#### `meta.query_offset_secs` - The offset from "now" to the
'rangeTo'/end' time picker value in seconds.

____

Extend the `onPageReady` function to support date ranges in the meta
field. The function should compute the query range in seconds based on
the provided time range and report it to telemetry as
meta.query_range_secs.




If the `rangeTo` is different from 'now', calculate the offset. 
- A negative offset indicates that the rangeTo is in the past, 
- a positive offset means it is in the future, 
- and zero indicates that the rangeTo is exactly 'now'." 



### How to instrument
To report the selected time range, pass the `rangeFrom` and `rangeTo` . 
> Failing to pass the correct type will result in TS error.


Then, use this data when invoking onPageReady:
```
 onPageReady({
        meta: { rangeFrom, rangeTo },
 });
```

### Analysis 

Meta is flatten field. In order to aggregate the data it's necessary to
create a run time field. You can add a field in the

1. select data view (`ebt-kibana-*-performance-metrics`) 
2. Add a new field
3. Type double
4. Set value 

`query_range_secs`
```
def meta = doc[“meta”].size();
if (meta > 0) {
    def range = doc[“meta.query_range_secs”].size();
    if (range > 0) {
        // Emit the value of ‘meta.target’
        emit(Double.parseDouble(doc[“meta.query_range_secs”].value));
    }
}

```

`query_offset_secs` 
```

def meta = doc[“meta”].size();
if (meta > 0) {
    def offset = doc[“meta.query_offset_secs”].size();
    if (offset > 0) {
     
        emit(Double.parseDouble(doc[“meta.query_offset_secs”].value));
    }
}

```







### Examples


<img width="1478" alt="Screenshot 2024-12-09 at 19 51 32"
src="https://github.com/user-attachments/assets/72f796e1-4f20-487f-b62a-b6a4aead9a4a">

<img width="1478" alt="Screenshot 2024-12-09 at 19 56 08"
src="https://github.com/user-attachments/assets/c278dc3b-e6f3-47ed-9c90-954d71b59161">

<img width="1478" alt="Screenshot 2024-12-09 at 19 53 45 1"
src="https://github.com/user-attachments/assets/ef42ecef-48cd-4396-9f5d-c971098d5219">





### Notes
- Instrumented only 2 solutions as an example (dataset and apm services)

### TODO
- [x] Update documentation -
https://github.com/elastic/kibana/pull/204179
- [ ] Update dashboards (create a runtime field) 
- [x] Track offset ( we need to know if the user selected now or now)

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2024-12-13 07:11:44 -06:00
Gerard Soldevila
0147e7456e
Sustainable Kibana Architecture: Move modules owned by @elastic/obs-knowledge-team (#202766)
## Summary

This PR aims at relocating some of the Kibana modules (plugins and
packages) into a new folder structure, according to the _Sustainable
Kibana Architecture_ initiative.

> [!IMPORTANT]
> * We kindly ask you to:
> * Manually fix the errors in the error section below (if there are
any).
> * Search for the `packages[\/\\]` and `plugins[\/\\]` patterns in the
source code (Babel and Eslint config files), and update them
appropriately.
> * Manually review
`.buildkite/scripts/pipelines/pull_request/pipeline.ts` to ensure that
any CI pipeline customizations continue to be correctly applied after
the changed path names
> * Review all of the updated files, specially the `.ts` and `.js` files
listed in the sections below, as some of them contain relative paths
that have been updated.
> * Think of potential impact of the move, including tooling and
configuration files that can be pointing to the relocated modules. E.g.:
>     * customised eslint rules
>     * docs pointing to source code

> [!NOTE]
> This PR has been auto-generated.
> Do not attempt to push any changes unless you know what you are doing.
> Please use
[#sustainable_kibana_architecture](https://elastic.slack.com/archives/C07TCKTA22E)
Slack channel for feedback.


#### 8 package(s) are going to be relocated:

  | Id | Target folder |
  | -- | ------------- |
| `@kbn/io-ts-utils` | `src/platform/packages/shared/kbn-io-ts-utils` |
| `@kbn/server-route-repository` |
`src/platform/packages/shared/kbn-server-route-repository` |
| `@kbn/server-route-repository-client` |
`src/platform/packages/shared/kbn-server-route-repository-client` |
| `@kbn/server-route-repository-utils` |
`src/platform/packages/shared/kbn-server-route-repository-utils` |
| `@kbn/sse-utils` | `src/platform/packages/shared/kbn-sse-utils` |
| `@kbn/sse-utils-client` |
`src/platform/packages/shared/kbn-sse-utils-client` |
| `@kbn/sse-utils-server` |
`src/platform/packages/private/kbn-sse-utils-server` |
| `@kbn/typed-react-router-config` |
`src/platform/packages/shared/kbn-typed-react-router-config` |


<details>
<summary>Updated references</summary>

```
./.i18nrc.json
./package.json
./packages/kbn-repo-packages/package-map.json
./packages/kbn-ts-projects/config-paths.json
./src/platform/packages/private/kbn-sse-utils-server/jest.config.js
./src/platform/packages/shared/kbn-io-ts-utils/jest.config.js
./src/platform/packages/shared/kbn-server-route-repository-client/jest.config.js
./src/platform/packages/shared/kbn-server-route-repository-utils/jest.config.js
./src/platform/packages/shared/kbn-server-route-repository/jest.config.js
./src/platform/packages/shared/kbn-sse-utils-client/jest.config.js
./src/platform/packages/shared/kbn-sse-utils/jest.config.js
./src/platform/packages/shared/kbn-typed-react-router-config/jest.config.js
./tsconfig.base.json
./yarn.lock
```
</details>
<details>
<summary>Updated relative paths</summary>

```
src/platform/packages/private/kbn-sse-utils-server/jest.config.js:12
src/platform/packages/private/kbn-sse-utils-server/tsconfig.json:2
src/platform/packages/shared/kbn-io-ts-utils/jest.config.js:12
src/platform/packages/shared/kbn-io-ts-utils/tsconfig.json:2
src/platform/packages/shared/kbn-server-route-repository-client/jest.config.js:12
src/platform/packages/shared/kbn-server-route-repository-client/tsconfig.json:2
src/platform/packages/shared/kbn-server-route-repository-utils/jest.config.js:12
src/platform/packages/shared/kbn-server-route-repository-utils/tsconfig.json:2
src/platform/packages/shared/kbn-server-route-repository/jest.config.js:12
src/platform/packages/shared/kbn-server-route-repository/tsconfig.json:2
src/platform/packages/shared/kbn-sse-utils-client/jest.config.js:12
src/platform/packages/shared/kbn-sse-utils-client/tsconfig.json:2
src/platform/packages/shared/kbn-sse-utils/jest.config.js:12
src/platform/packages/shared/kbn-sse-utils/tsconfig.json:2
src/platform/packages/shared/kbn-typed-react-router-config/jest.config.js:12
src/platform/packages/shared/kbn-typed-react-router-config/tsconfig.json:2
```
</details>
<details>
<summary>Script errors</summary>

```

```
</details>
2024-12-13 05:43:28 -06:00
Marco Antonio Ghiani
0ca6502ade
[Logs UX][EUI Visual Refresh] Update theme usage (#202746)
## 📓 Summary

Closes #202652
Closes #202653 
Closes #202654
Closes #202656 
Closes #202657 
Closes #202658 
Closes #202660 

These changes close issues as part of a bigger effort to integrate the
EUI changes.

This takes into account renaming `success` colour token to the more
appropriate `accentSecondary` as specified by the guidelines, and
updating legacy naming for tokens to the new respective names.

Also, it removes usages of the static `euiThemeVars` tokens and check
for usages `vis` tokens.

@patpscal Let me know if something feels off, I checked how the colour
render in the 4 theme combination (amsterdam/borealis + light/dark) and
it looks good to me.

---------

Co-authored-by: Marco Antonio Ghiani <marcoantonio.ghiani@elastic.co>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2024-12-13 12:25:04 +01:00
Gerard Soldevila
42af4e60a4
Sustainable Kibana Architecture: Move modules owned by @elastic/security-defend-workflows (#202840) 2024-12-13 12:08:36 +01:00
elastic-renovate-prod[bot]
e061b4c352
Update dependency @elastic/elasticsearch to ^8.16.0 (main) (#200275)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
|
[@elastic/elasticsearch](http://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/index.html)
([source](https://togithub.com/elastic/elasticsearch-js)) | dependencies
| minor | [`^8.15.2` ->
`^8.16.0`](https://renovatebot.com/diffs/npm/@elastic%2felasticsearch/8.15.2/8.16.0)
|

---

### Release Notes

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

###
[`v8.16.0`](https://togithub.com/elastic/elasticsearch-js/releases/tag/v8.16.0)

[Compare
Source](https://togithub.com/elastic/elasticsearch-js/compare/v8.15.2...v8.16.0)


[Changelog](https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/8.16/changelog-client.html)

</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:eyJjcmVhdGVkSW5WZXIiOiIzNy40MjUuMSIsInVwZGF0ZWRJblZlciI6IjM3LjQyNS4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJUZWFtOkNvcmUiLCJUZWFtOk9wZXJhdGlvbnMiLCJiYWNrcG9ydDpza2lwIiwicmVsZWFzZV9ub3RlOnNraXAiXX0=-->

Co-authored-by: elastic-renovate-prod[bot] <174716857+elastic-renovate-prod[bot]@users.noreply.github.com>
2024-12-13 02:47:34 -06:00
Gerard Soldevila
a9f076cb1f
Sustainable Kibana Architecture: Move modules owned by @elastic/security-threat-hunting (#203046)
## Summary

This PR aims at relocating some of the Kibana modules (plugins and
packages) into a new folder structure, according to the _Sustainable
Kibana Architecture_ initiative.

> [!IMPORTANT]
> * We kindly ask you to:
> * Manually fix the errors in the error section below (if there are
any).
> * Search for the `packages[\/\\]` and `plugins[\/\\]` patterns in the
source code (Babel and Eslint config files), and update them
appropriately.
> * Manually review
`.buildkite/scripts/pipelines/pull_request/pipeline.ts` to ensure that
any CI pipeline customizations continue to be correctly applied after
the changed path names
> * Review all of the updated files, specially the `.ts` and `.js` files
listed in the sections below, as some of them contain relative paths
that have been updated.
> * Think of potential impact of the move, including tooling and
configuration files that can be pointing to the relocated modules. E.g.:
>     * customised eslint rules
>     * docs pointing to source code

> [!NOTE]
> * This PR has been auto-generated.
> * Any manual contributions will be lost if the 'relocate' script is
re-run.
> * Try to obtain the missing reviews / approvals before applying manual
fixes, and/or keep your changes in a .patch / git stash.
> * Please use
[#sustainable_kibana_architecture](https://elastic.slack.com/archives/C07TCKTA22E)
Slack channel for feedback.

#### 2 packages(s) are going to be relocated:

| Id | Target folder |
| -- | ------------- |
| `@kbn/data-stream-adapter` |
`x-pack/solutions/security/packages/kbn-data-stream-adapter` |
| `@kbn/index-adapter` |
`x-pack/solutions/security/packages/kbn-index-adapter` |

---------

Co-authored-by: PhilippeOberti <philippe.oberti@elastic.co>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2024-12-12 22:29:21 -06:00
Devon Thomson
abfd590d4d
[Embeddables Rebuild] Make Serialize Function Synchronous (#203662)
changes the signature of the `serializeState` function so that
it no longer returns MaybePromise
2024-12-12 21:25:03 -05:00
Elena Shostak
52dd7e17c4
[Authz] Operator privileges (#196583)
## Summary

This PR adds support for explicit indication whether endpoint is
restricted to operator only users.

### Context
1. If user has [all operator
privileges](https://github.com/elastic/elasticsearch/blob/main/x-pack/plugin/security/src/main/java/org/elasticsearch/xpack/security/operator/DefaultOperatorOnlyRegistry.java#L35-#L53)
granted, but is not listed as operator in `operator_users.yml`, ES would
throw an unauthorized error.
2. If user is listed as operator in `operator_users.yml`, but doesn't
have necessary privileges granted, ES would throw an unauthorized error.
3. It’s not possible to determine if a user is operator via any ES API,
i.e. `_has_privileges`.
4. If operator privileges are disabled we skip the the check for it,
that's why we require to explicitly specify additional privileges to
ensure that the route is protected even when operator privileges are
disabled.

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

__Relates: https://github.com/elastic/kibana/issues/196271__

### How to test

1. Add your user to the operators list
1bd8144924/packages/kbn-es/src/serverless_resources/operator_users.yml (L4)
or use existing user from the list to log in.
2. Run ES and Kibana serverless
3. Change any endpoint or create a new one with the following security
config
```
      security: {
        authz: {
          requiredPrivileges: [ReservedPrivilegesSet.operator],
        },
      },
```
4. Check with enabled and disabled operator privileges (set
`xpack.security.operator_privileges.enabled`)

## Release Note
Added support for explicit indication whether endpoint is restricted to
operator only users at the route definition level.

---------

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2024-12-12 23:55:04 +01:00
Gerard Soldevila
33c18c72fa
Sustainable Kibana Architecture: Move modules owned by @elastic/security-threat-hunting-investigations (#202855)
## Summary

This PR aims at relocating some of the Kibana modules (plugins and
packages) into a new folder structure, according to the _Sustainable
Kibana Architecture_ initiative.

> [!IMPORTANT]
> * We kindly ask you to:
> * Manually fix the errors in the error section below (if there are
any).
> * Search for the `packages[\/\\]` and `plugins[\/\\]` patterns in the
source code (Babel and Eslint config files), and update them
appropriately.
> * Manually review
`.buildkite/scripts/pipelines/pull_request/pipeline.ts` to ensure that
any CI pipeline customizations continue to be correctly applied after
the changed path names
> * Review all of the updated files, specially the `.ts` and `.js` files
listed in the sections below, as some of them contain relative paths
that have been updated.
> * Think of potential impact of the move, including tooling and
configuration files that can be pointing to the relocated modules. E.g.:
>     * customised eslint rules
>     * docs pointing to source code

> [!NOTE]
> * This PR has been auto-generated.
> * Any manual contributions will be lost if the 'relocate' script is
re-run.
> * Try to obtain the missing reviews / approvals before applying manual
fixes, and/or keep your changes in a .patch / git stash.
> * Please use
[#sustainable_kibana_architecture](https://elastic.slack.com/archives/C07TCKTA22E)
Slack channel for feedback.

#### 2 plugin(s) are going to be relocated:

| Id | Target folder |
| -- | ------------- |
| `@kbn/threat-intelligence-plugin` |
`x-pack/solutions/security/plugins/threat_intelligence` |
| `@kbn/timelines-plugin` |
`x-pack/solutions/security/plugins/timelines` |

#### 2 packages(s) are going to be relocated:

| Id | Target folder |
| -- | ------------- |
| `@kbn/expandable-flyout` |
`x-pack/solutions/security/packages/kbn-expandable-flyout` |
| `@kbn/securitysolution-data-table` |
`x-pack/solutions/security/packages/data_table` |

Co-authored-by: PhilippeOberti <philippe.oberti@elastic.co>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2024-12-12 16:22:03 -06:00
Tim Sullivan
80160cbf8f
Preparation for High Contrast Mode, ResponseOps domains (#202610)
## Summary

**Reviewers: Please test the code paths affected by this PR. See the
"Risks" section below.**

Part of work for enabling "high contrast mode" in Kibana. See
https://github.com/elastic/kibana/issues/176219.

**Background:**
Kibana will soon have a user profile setting to allow users to enable
"high contrast mode." This setting will activate a flag with
`<EuiProvider>` that causes EUI components to render with higher
contrast visual elements. Consumer plugins and packages need to be
updated selected places where `<EuiProvider>` is wrapped, to pass the
`UserProfileService` service dependency from the CoreStart contract.

**NOTE:** **EUI currently does not yet support the high-contrast mode
flag**, but support for that is expected to come in around 2 weeks.
These first PRs are simply preparing the code by wiring up the
`UserProvideService`.

### Checklist

Check the PR satisfies following conditions. 

Reviewers should verify this PR satisfies this list as well.

- [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] The PR description includes the appropriate Release Notes section,
and the correct `release_note:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)

### Risks

Does this PR introduce any risks? For example, consider risks like hard
to test bugs, performance regression, potential of data loss.

Describe the risk, its severity, and mitigation for each identified
risk. Invite stakeholders and evaluate how to proceed before merging.

- [ ] [medium/high] The implementor of this change did not manually test
the affected code paths and relied on type-checking and functional tests
to drive the changes. Code owners for this PR need to manually test the
affected code paths.
- [ ] [medium] The `UserProfileService` dependency comes from the
CoreStart contract. If acquiring the service causes synchronous code to
become asynchronous, check for race conditions or errors in rendering
React components. Code owners for this PR need to manually test the
affected code paths.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2024-12-12 14:34:44 -06:00
Gerard Soldevila
5dee9994c9
Sustainable Kibana Architecture: Move modules owned by @elastic/obs-ux-management-team (#202832)
## Summary

This PR aims at relocating some of the Kibana modules (plugins and
packages) into a new folder structure, according to the _Sustainable
Kibana Architecture_ initiative.

> [!IMPORTANT]
> * We kindly ask you to:
> * Manually fix the errors in the error section below (if there are
any).
> * Search for the `packages[\/\\]` and `plugins[\/\\]` patterns in the
source code (Babel and Eslint config files), and update them
appropriately.
> * Manually review
`.buildkite/scripts/pipelines/pull_request/pipeline.ts` to ensure that
any CI pipeline customizations continue to be correctly applied after
the changed path names
> * Review all of the updated files, specially the `.ts` and `.js` files
listed in the sections below, as some of them contain relative paths
that have been updated.
> * Think of potential impact of the move, including tooling and
configuration files that can be pointing to the relocated modules. E.g.:
>     * customised eslint rules
>     * docs pointing to source code

> [!NOTE]
> This PR has been auto-generated.
> Do not attempt to push any changes unless you know what you are doing.
> Please use
[#sustainable_kibana_architecture](https://elastic.slack.com/archives/C07TCKTA22E)
Slack channel for feedback.




#### 8 plugin(s) are going to be relocated:

| Id | Target folder |
| -- | ------------- |
| `@kbn/exploratory-view-plugin` |
`x-pack/solutions/observability/plugins/exploratory_view` |
| `@kbn/investigate-app-plugin` |
`x-pack/solutions/observability/plugins/investigate_app` |
| `@kbn/investigate-plugin` |
`x-pack/solutions/observability/plugins/investigate` |
| `@kbn/observability-plugin` |
`x-pack/solutions/observability/plugins/observability` |
| `@kbn/serverless-observability` |
`x-pack/solutions/observability/plugins/serverless_observability` |
| `@kbn/slo-plugin` | `x-pack/solutions/observability/plugins/slo` |
| `@kbn/synthetics-plugin` |
`x-pack/solutions/observability/plugins/synthetics` |
| `@kbn/uptime-plugin` | `x-pack/solutions/observability/plugins/uptime`
|


#### 10 package(s) are going to be relocated:

  | Id | Target folder |
  | -- | ------------- |
| `@kbn/data-forge` | `x-pack/platform/packages/shared/kbn-data-forge` |
| `@kbn/deeplinks-observability` |
`src/platform/packages/shared/deeplinks/observability` |
| `@kbn/infra-forge` |
`x-pack/platform/packages/private/kbn-infra-forge` |
| `@kbn/investigation-shared` |
`x-pack/solutions/observability/packages/kbn-investigation-shared` |
| `@kbn/observability-alert-details` |
`x-pack/solutions/observability/packages/alert_details` |
| `@kbn/observability-alerting-rule-utils` |
`x-pack/platform/packages/shared/observability/alerting_rule_utils` |
| `@kbn/observability-alerting-test-data` |
`x-pack/solutions/observability/packages/alerting_test_data` |
| `@kbn/observability-get-padded-alert-time-range-util` |
`x-pack/solutions/observability/packages/get_padded_alert_time_range_util`
|
| `@kbn/observability-synthetics-test-data` |
`x-pack/solutions/observability/packages/synthetics_test_data` |
| `@kbn/slo-schema` | `x-pack/platform/packages/shared/kbn-slo-schema` |


<details>
<summary>Updated references</summary>

```
./.buildkite/ftr_oblt_stateful_configs.yml
./.buildkite/pipelines/on_merge_unsupported_ftrs.yml
./.buildkite/pipelines/pull_request/exploratory_view_plugin.yml
./.buildkite/pipelines/pull_request/slo_plugin_e2e.yml
./.buildkite/pipelines/pull_request/synthetics_plugin.yml
./.buildkite/pipelines/pull_request/uptime_plugin.yml
./.buildkite/scripts/steps/functional/exploratory_view_plugin.sh
./.buildkite/scripts/steps/functional/slo_plugin_e2e.sh
./.buildkite/scripts/steps/functional/synthetics.sh
./.buildkite/scripts/steps/functional/synthetics_plugin.sh
./.buildkite/scripts/steps/functional/uptime_plugin.sh
./.eslintrc.js
./.github/paths-labeller.yml
./.i18nrc.json
./docs/developer/plugin-list.asciidoc
./oas_docs/overlays/alerting.overlays.yaml
./oas_docs/scripts/merge_ess_oas.js
./oas_docs/scripts/merge_serverless_oas.js
./package.json
./packages/kbn-eslint-plugin-i18n/helpers/get_i18n_identifier_from_file_path.test.ts
./packages/kbn-eslint-plugin-i18n/rules/formatted_message_should_start_with_the_right_id.test.ts
./packages/kbn-eslint-plugin-i18n/rules/i18n_translate_should_start_with_the_right_id.test.ts
./packages/kbn-eslint-plugin-i18n/rules/strings_should_be_translated_with_formatted_message.test.ts
./packages/kbn-eslint-plugin-i18n/rules/strings_should_be_translated_with_i18n.test.ts
./packages/kbn-eslint-plugin-telemetry/helpers/get_app_name.test.ts
./packages/kbn-repo-packages/package-map.json
./packages/kbn-ts-projects/config-paths.json
./src/dev/storybook/aliases.ts
./src/platform/packages/shared/deeplinks/observability/jest.config.js
./src/plugins/guided_onboarding/README.md
./tsconfig.base.json
./x-pack/.i18nrc.json
./x-pack/platform/packages/private/kbn-infra-forge/jest.config.js
./x-pack/platform/packages/shared/kbn-data-forge/jest.config.js
./x-pack/platform/packages/shared/kbn-data-forge/src/data_sources/fake_hosts/ecs/generate.sh
./x-pack/platform/packages/shared/kbn-data-forge/src/data_sources/fake_logs/ecs/generate.sh
./x-pack/platform/packages/shared/kbn-data-forge/src/data_sources/fake_stack/admin_console/ecs/generate.sh
./x-pack/platform/packages/shared/kbn-data-forge/src/data_sources/fake_stack/heartbeat/ecs/generate.sh
./x-pack/platform/packages/shared/kbn-data-forge/src/data_sources/fake_stack/message_processor/ecs/generate.sh
./x-pack/platform/packages/shared/kbn-data-forge/src/data_sources/fake_stack/mongodb/ecs/generate.sh
./x-pack/platform/packages/shared/kbn-data-forge/src/data_sources/fake_stack/nginx_proxy/ecs/generate.sh
./x-pack/platform/packages/shared/kbn-slo-schema/jest.config.js
./x-pack/platform/packages/shared/observability/alerting_rule_utils/jest.config.js
./x-pack/plugins/observability_solution/observability/dev_docs/custom_threshold.md
./x-pack/plugins/observability_solution/slo/dev_docs/slo.md
./x-pack/plugins/observability_solution/uptime/.buildkite/pipelines/flaky.sh
./x-pack/plugins/observability_solution/uptime/README.md
./x-pack/plugins/observability_solution/uptime/e2e/README.md
./x-pack/solutions/observability/packages/alert_details/jest.config.js
./x-pack/solutions/observability/packages/alerting_test_data/jest.config.js
./x-pack/solutions/observability/packages/get_padded_alert_time_range_util/jest.config.js
./x-pack/solutions/observability/packages/kbn-investigation-shared/jest.config.js
./x-pack/solutions/observability/packages/synthetics_test_data/jest.config.js
./x-pack/solutions/observability/plugins/exploratory_view/README.md
./x-pack/solutions/observability/plugins/exploratory_view/e2e/README.md
./x-pack/solutions/observability/plugins/exploratory_view/jest.config.js
./x-pack/solutions/observability/plugins/investigate/jest.config.js
./x-pack/solutions/observability/plugins/investigate_app/jest.config.js
./x-pack/solutions/observability/plugins/observability/jest.config.js
./x-pack/solutions/observability/plugins/slo/docs/openapi/slo/README.md
./x-pack/solutions/observability/plugins/slo/jest.config.js
./x-pack/solutions/observability/plugins/synthetics/.buildkite/pipelines/flaky.sh
./x-pack/solutions/observability/plugins/synthetics/README.md
./x-pack/solutions/observability/plugins/synthetics/e2e/README.md
./x-pack/solutions/observability/plugins/synthetics/jest.config.js
./x-pack/solutions/observability/plugins/uptime/e2e/README.md
./x-pack/solutions/observability/plugins/uptime/jest.config.js
./yarn.lock
```
</details>
<details>
<summary>Updated relative paths</summary>

```
src/platform/packages/shared/deeplinks/observability/jest.config.js:12
src/platform/packages/shared/deeplinks/observability/tsconfig.json:2
x-pack/platform/packages/private/kbn-infra-forge/jest.config.js:10
x-pack/platform/packages/private/kbn-infra-forge/tsconfig.json:2
x-pack/platform/packages/shared/kbn-data-forge/jest.config.js:10
x-pack/platform/packages/shared/kbn-data-forge/src/data_sources/fake_hosts/ecs/generate.sh:3
x-pack/platform/packages/shared/kbn-data-forge/src/data_sources/fake_logs/ecs/generate.sh:3
x-pack/platform/packages/shared/kbn-data-forge/src/data_sources/fake_stack/admin_console/ecs/generate.sh:3
x-pack/platform/packages/shared/kbn-data-forge/src/data_sources/fake_stack/heartbeat/ecs/generate.sh:3
x-pack/platform/packages/shared/kbn-data-forge/src/data_sources/fake_stack/message_processor/ecs/generate.sh:3
x-pack/platform/packages/shared/kbn-data-forge/src/data_sources/fake_stack/mongodb/ecs/generate.sh:3
x-pack/platform/packages/shared/kbn-data-forge/src/data_sources/fake_stack/nginx_proxy/ecs/generate.sh:3
x-pack/platform/packages/shared/kbn-data-forge/tsconfig.json:2
x-pack/platform/packages/shared/kbn-slo-schema/jest.config.js:10
x-pack/platform/packages/shared/kbn-slo-schema/tsconfig.json:2
x-pack/platform/packages/shared/observability/alerting_rule_utils/jest.config.js:10
x-pack/platform/packages/shared/observability/alerting_rule_utils/tsconfig.json:2
x-pack/solutions/observability/packages/alert_details/jest.config.js:10
x-pack/solutions/observability/packages/alert_details/tsconfig.json:2
x-pack/solutions/observability/packages/alerting_test_data/jest.config.js:10
x-pack/solutions/observability/packages/alerting_test_data/tsconfig.json:2
x-pack/solutions/observability/packages/get_padded_alert_time_range_util/jest.config.js:10
x-pack/solutions/observability/packages/get_padded_alert_time_range_util/tsconfig.json:2
x-pack/solutions/observability/packages/kbn-investigation-shared/jest.config.js:12
x-pack/solutions/observability/packages/kbn-investigation-shared/tsconfig.json:2
x-pack/solutions/observability/packages/synthetics_test_data/jest.config.js:10
x-pack/solutions/observability/packages/synthetics_test_data/tsconfig.json:2
x-pack/solutions/observability/plugins/exploratory_view/e2e/README.md:13
x-pack/solutions/observability/plugins/exploratory_view/e2e/synthetics_run.ts:28
x-pack/solutions/observability/plugins/exploratory_view/e2e/synthetics_run.ts:33
x-pack/solutions/observability/plugins/exploratory_view/e2e/tasks/es_archiver.ts:19
x-pack/solutions/observability/plugins/exploratory_view/e2e/tasks/es_archiver.ts:27
x-pack/solutions/observability/plugins/exploratory_view/e2e/tasks/es_archiver.ts:34
x-pack/solutions/observability/plugins/exploratory_view/e2e/tsconfig.json:2
x-pack/solutions/observability/plugins/exploratory_view/jest.config.js:10
x-pack/solutions/observability/plugins/exploratory_view/public/components/shared/exploratory_view/README.md:116
x-pack/solutions/observability/plugins/exploratory_view/public/components/shared/exploratory_view/README.md:156
x-pack/solutions/observability/plugins/exploratory_view/public/components/shared/exploratory_view/README.md:161
x-pack/solutions/observability/plugins/exploratory_view/tsconfig.json:2
x-pack/solutions/observability/plugins/exploratory_view/tsconfig.json:6
x-pack/solutions/observability/plugins/investigate/jest.config.js:10
x-pack/solutions/observability/plugins/investigate/tsconfig.json:2
x-pack/solutions/observability/plugins/investigate/tsconfig.json:7
x-pack/solutions/observability/plugins/investigate_app/jest.config.js:10
x-pack/solutions/observability/plugins/investigate_app/tsconfig.json:2
x-pack/solutions/observability/plugins/investigate_app/tsconfig.json:7
x-pack/solutions/observability/plugins/observability/dev_docs/custom_threshold.md:10
x-pack/solutions/observability/plugins/observability/dev_docs/custom_threshold.md:36
x-pack/solutions/observability/plugins/observability/dev_docs/feature_flags.md:14
x-pack/solutions/observability/plugins/observability/jest.config.js:10
x-pack/solutions/observability/plugins/observability/tsconfig.json:12
x-pack/solutions/observability/plugins/observability/tsconfig.json:2
x-pack/solutions/observability/plugins/serverless_observability/package.json:8
x-pack/solutions/observability/plugins/serverless_observability/package.json:9
x-pack/solutions/observability/plugins/serverless_observability/tsconfig.json:12
x-pack/solutions/observability/plugins/serverless_observability/tsconfig.json:2
x-pack/solutions/observability/plugins/slo/dev_docs/slo.md:11
x-pack/solutions/observability/plugins/slo/e2e/tsconfig.json:2
x-pack/solutions/observability/plugins/slo/jest.config.js:10
x-pack/solutions/observability/plugins/slo/tsconfig.json:10
x-pack/solutions/observability/plugins/slo/tsconfig.json:2
x-pack/solutions/observability/plugins/synthetics/e2e/tasks/es_archiver.ts:19
x-pack/solutions/observability/plugins/synthetics/e2e/tasks/es_archiver.ts:27
x-pack/solutions/observability/plugins/synthetics/e2e/tasks/es_archiver.ts:34
x-pack/solutions/observability/plugins/synthetics/e2e/tsconfig.json:2
x-pack/solutions/observability/plugins/synthetics/jest.config.js:10
x-pack/solutions/observability/plugins/synthetics/tsconfig.json:12
x-pack/solutions/observability/plugins/synthetics/tsconfig.json:2
x-pack/solutions/observability/plugins/uptime/e2e/tasks/es_archiver.ts:19
x-pack/solutions/observability/plugins/uptime/e2e/tasks/es_archiver.ts:27
x-pack/solutions/observability/plugins/uptime/e2e/tasks/es_archiver.ts:34
x-pack/solutions/observability/plugins/uptime/e2e/tasks/read_kibana_config.ts:15
x-pack/solutions/observability/plugins/uptime/e2e/tsconfig.json:2
x-pack/solutions/observability/plugins/uptime/jest.config.js:10
x-pack/solutions/observability/plugins/uptime/tsconfig.json:13
x-pack/solutions/observability/plugins/uptime/tsconfig.json:2
```
</details>
<details>
<summary>Script errors</summary>

```
Cannot replace multiple occurrences of "../../.." in the same line, please fix manually:	/Users/gsoldevila/Work/kibana-tertiary/x-pack/solutions/observability/plugins/exploratory_view/e2e/tasks/es_archiver.ts:19
Cannot replace multiple occurrences of "../../.." in the same line, please fix manually:	/Users/gsoldevila/Work/kibana-tertiary/x-pack/solutions/observability/plugins/exploratory_view/e2e/tasks/es_archiver.ts:27
Cannot replace multiple occurrences of "../../.." in the same line, please fix manually:	/Users/gsoldevila/Work/kibana-tertiary/x-pack/solutions/observability/plugins/exploratory_view/e2e/tasks/es_archiver.ts:34
Cannot replace multiple occurrences of "../../../.." in the same line, please fix manually:	/Users/gsoldevila/Work/kibana-tertiary/x-pack/solutions/observability/plugins/observability/dev_docs/feature_flags.md:14
Cannot replace multiple occurrences of "../../.." in the same line, please fix manually:	/Users/gsoldevila/Work/kibana-tertiary/x-pack/solutions/observability/plugins/synthetics/e2e/tasks/es_archiver.ts:19
Cannot replace multiple occurrences of "../../.." in the same line, please fix manually:	/Users/gsoldevila/Work/kibana-tertiary/x-pack/solutions/observability/plugins/synthetics/e2e/tasks/es_archiver.ts:27
Cannot replace multiple occurrences of "../../.." in the same line, please fix manually:	/Users/gsoldevila/Work/kibana-tertiary/x-pack/solutions/observability/plugins/synthetics/e2e/tasks/es_archiver.ts:34
Cannot replace multiple occurrences of "../../../.." in the same line, please fix manually:	/Users/gsoldevila/Work/kibana-tertiary/x-pack/solutions/observability/plugins/uptime/e2e/tasks/es_archiver.ts:19
Cannot replace multiple occurrences of "../../../.." in the same line, please fix manually:	/Users/gsoldevila/Work/kibana-tertiary/x-pack/solutions/observability/plugins/uptime/e2e/tasks/es_archiver.ts:27
Cannot replace multiple occurrences of "../../../.." in the same line, please fix manually:	/Users/gsoldevila/Work/kibana-tertiary/x-pack/solutions/observability/plugins/uptime/e2e/tasks/es_archiver.ts:34

```
</details>

---------

Co-authored-by: shahzad31 <shahzad31comp@gmail.com>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2024-12-12 14:28:21 -06:00
Tim Sullivan
99aa884fa0
Preparation for High Contrast Mode, Analytics Experience domains (#202608)
## Summary

**Reviewers: Please test the code paths affected by this PR. See the
"Risks" section below.**

Part of work for enabling "high contrast mode" in Kibana. See
https://github.com/elastic/kibana/issues/176219.

**Background:**
Kibana will soon have a user profile setting to allow users to enable
"high contrast mode." This setting will activate a flag with
`<EuiProvider>` that causes EUI components to render with higher
contrast visual elements. Consumer plugins and packages need to be
updated selected places where `<EuiProvider>` is wrapped, to pass the
`UserProfileService` service dependency from the CoreStart contract.

**NOTE:** **EUI currently does not yet support the high-contrast mode
flag**, but support for that is expected to come in around 2 weeks.
These first PRs are simply preparing the code by wiring up the
`UserProvideService`.

### Checklist

Check the PR satisfies following conditions. 

Reviewers should verify this PR satisfies this list as well.

- [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] The PR description includes the appropriate Release Notes section,
and the correct `release_note:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)

### Risks

Does this PR introduce any risks? For example, consider risks like hard
to test bugs, performance regression, potential of data loss.

Describe the risk, its severity, and mitigation for each identified
risk. Invite stakeholders and evaluate how to proceed before merging.

- [ ] [medium/high] The implementor of this change did not manually test
the affected code paths and relied on type-checking and functional tests
to drive the changes. Code owners for this PR need to manually test the
affected code paths.
- [ ] [medium] The `UserProfileService` dependency comes from the
CoreStart contract. If acquiring the service causes synchronous code to
become asynchronous, check for race conditions or errors in rendering
React components. Code owners for this PR need to manually test the
affected code paths.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2024-12-12 13:16:07 -06:00
Tim Sullivan
0a384639a6
[SharedUX] EUI visual refresh for SharedUX (#202780)
## Summary

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

1. Remove usage of deprecated color variables
2. Remove usage of `@kbn/ui-theme`
3. A few other changes as requested by @andreadelrio

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2024-12-12 12:02:36 -07:00
David Olaru
0dabc52fef
[kbn-code-owners] General improvements (#204023)
## Summary
The following improvements have been made:
- Added `--json` flag to CLI command to output result as JSON
- Terminology updated to more accurately reflect object contents
- Code owner teams are always returned as an array
- Search path validation (is under repo root, exists)
- Proper handling of inline comments
- Better logging for `scripts/check_ftr_code_owners.js`

Existing usage of the `@kbn/code-owners` package has been updated
accordingly, without modifying outcomes.
2024-12-12 12:05:01 -06:00
Marco Antonio Ghiani
08da9468b2
[One Discover] Revert token change from vis palette (#204054)
## 📓 Summary

Related to https://github.com/elastic/kibana/pull/202985

This change reverts a suggestion that was applied but that should only
be valid for v9.

Co-authored-by: Marco Antonio Ghiani <marcoantonio.ghiani@elastic.co>
2024-12-12 18:01:49 +01:00
natasha-moore-elastic
cebcf01d35
[DOCS] Adds conceptual content to API docs (#202305)
## Summary

Resolves https://github.com/elastic/security-docs-internal/issues/49.

In order to retire asciidoc API docs, we first need to move over any
relevant content from those docs to the API reference site. This PR adds
the relevant conceptual information from:

-
https://www.elastic.co/guide/en/security/master/exceptions-api-overview.html
-
https://www.elastic.co/guide/en/security/master/lists-api-overview.html
- https://www.elastic.co/guide/en/security/master/rule-api-overview.html

### Previews:
Bump previews expire after 30min, so I'm providing screenshots below:

Detections preview:

![detections_preview](https://github.com/user-attachments/assets/c47b9d85-b5d0-4a32-8668-dc1ae2215681)

Exceptions preview:

![exceptions_preview](https://github.com/user-attachments/assets/b3fe9139-2162-4c56-bba9-751dffa11cb4)

Lists preview:

![lists_preview](https://github.com/user-attachments/assets/1c714f17-825d-45c7-8112-cc3d25c51047)

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2024-12-12 16:53:29 +00:00
Kevin Delemme
2ab38a3664
feat(investigation): Add eventTypes filter on the API (#202829) 2024-12-12 10:49:34 -06:00
Gonçalo Rica Pais da Silva
d9f8f170ce
[ObsUX][Synthtrace] Replace multistream use with own util method (#203988)
## Summary

A whole dependency was being pulled in for doing something that could
easily be done just using Node.js own utils and be made into a simple
method. As such, `multistream` has been removed since there is no other
place in the codebase that is using it.

## How to test

* Load Kibana local dev environment using synthtrace data/scenarios. No
scenario should fail to load normally, and all tests using synthtrace
data should pass as expected.

Closes #203860
2024-12-12 16:28:19 +01:00
Marco Antonio Ghiani
c47b50925a
[One Discover] Update log.level indicators color (#202985)
## 📓 Summary

Closes #202258 

This change updates the colors scale for Discover's `log.level`
indicators to differentiate errors from other levels better.

**N.B. As this relies on some hard-coded values defined
[here](https://github.com/elastic/kibana/issues/186273#issuecomment-2505817075),
it is not a definitive version, but a middle step to enhance the scale
in v8.x versions.**
With the introduction of the Borealis theme in v9, a new scale
token-based will replace this.

<img width="934" alt="Screenshot 2024-12-04 at 17 40 32"
src="https://github.com/user-attachments/assets/b3da1300-b39a-4ad0-92c9-fde5dabe91ec">

---------

Co-authored-by: Marco Antonio Ghiani <marcoantonio.ghiani@elastic.co>
2024-12-12 16:09:47 +01:00
Sandra G
ba945c9851
[Data Usage] functional tests (#203166)
## Summary

Functional tests for data usage UI.

- `data_streams` route is intercepted, due to filtering out zero size
data streams which will happen because metering api needs time to
aggregate data
- `autoops_api` is using the mock server as there will be no data for it
to return
- tests will only run in local serverless and not MKI due to using the
autoops mock server that won't return data for created data streams
- adds `interceptRequest` functionality to FTR `browser` service

## Tests
- data stream filter dropdown renders with created data streams of
`data_streams` response and are checked
- data stream filter dropdown renders badge with correct number of
selected data streams
- charts render from `data_streams` route response
- chart legends render with correct items
- popover renders for legend items
- links in popovers correctly navigate and update navigation between
different data stream items
2024-12-12 08:08:08 -05:00
Gerard Soldevila
50068fd9ba
Sustainable Kibana Architecture: Move modules under x-pack/packages/security-solution (#203522)
## Summary

This PR aims at relocating some of the Kibana modules (plugins and
packages) into a new folder structure, according to the _Sustainable
Kibana Architecture_ initiative.

> [!IMPORTANT]
> * We kindly ask you to:
> * Manually fix the errors in the error section below (if there are
any).
> * Search for the `packages[\/\\]` and `plugins[\/\\]` patterns in the
source code (Babel and Eslint config files), and update them
appropriately.
> * Manually review
`.buildkite/scripts/pipelines/pull_request/pipeline.ts` to ensure that
any CI pipeline customizations continue to be correctly applied after
the changed path names
> * Review all of the updated files, specially the `.ts` and `.js` files
listed in the sections below, as some of them contain relative paths
that have been updated.
> * Think of potential impact of the move, including tooling and
configuration files that can be pointing to the relocated modules. E.g.:
>     * customised eslint rules
>     * docs pointing to source code

> [!NOTE]
> This PR has been auto-generated.
> Do not attempt to push any changes unless you know what you are doing.
> Please use
[#sustainable_kibana_architecture](https://elastic.slack.com/archives/C07TCKTA22E)
Slack channel for feedback.


#### 7 package(s) are going to be relocated:

  | Id | Target folder |
  | -- | ------------- |
| `@kbn/ecs-data-quality-dashboard` |
`x-pack/solutions/security/packages/ecs_data_quality_dashboard` |
| `@kbn/security-solution-distribution-bar` |
`x-pack/solutions/security/packages/distribution_bar` |
| `@kbn/security-solution-features` |
`x-pack/solutions/security/packages/features` |
| `@kbn/security-solution-navigation` |
`x-pack/solutions/security/packages/navigation` |
| `@kbn/security-solution-side-nav` |
`x-pack/solutions/security/packages/side_nav` |
| `@kbn/security-solution-upselling` |
`x-pack/solutions/security/packages/upselling` |
| `@kbn/securitysolution-data-table` |
`x-pack/solutions/security/packages/data_table` |


<details>
<summary>Updated references</summary>

```
./.eslintrc.js
./package.json
./packages/kbn-repo-packages/package-map.json
./packages/kbn-ts-projects/config-paths.json
./tsconfig.base.json
./tsconfig.base.type_check.json
./tsconfig.refs.json
./x-pack/solutions/security/packages/data_table/jest.config.js
./x-pack/solutions/security/packages/distribution_bar/jest.config.js
./x-pack/solutions/security/packages/ecs_data_quality_dashboard/jest.config.js
./x-pack/solutions/security/packages/features/jest.config.js
./x-pack/solutions/security/packages/navigation/jest.config.js
./x-pack/solutions/security/packages/side_nav/jest.config.js
./x-pack/solutions/security/packages/upselling/jest.config.js
./x-pack/solutions/security/plugins/security_solution_serverless/tsconfig.type_check.json
./yarn.lock
```
</details>
<details>
<summary>Updated relative paths</summary>

```
x-pack/solutions/security/packages/data_table/jest.config.js:11
x-pack/solutions/security/packages/data_table/tsconfig.json:2
x-pack/solutions/security/packages/distribution_bar/jest.config.js:11
x-pack/solutions/security/packages/distribution_bar/tsconfig.json:2
x-pack/solutions/security/packages/ecs_data_quality_dashboard/jest.config.js:21
x-pack/solutions/security/packages/ecs_data_quality_dashboard/tsconfig.json:2
x-pack/solutions/security/packages/features/jest.config.js:10
x-pack/solutions/security/packages/features/tsconfig.json:2
x-pack/solutions/security/packages/navigation/jest.config.js:10
x-pack/solutions/security/packages/navigation/tsconfig.json:2
x-pack/solutions/security/packages/side_nav/jest.config.js:10
x-pack/solutions/security/packages/side_nav/src/solution_side_nav.stories.tsx:11
x-pack/solutions/security/packages/side_nav/tsconfig.json:2
x-pack/solutions/security/packages/upselling/jest.config.js:10
x-pack/solutions/security/packages/upselling/tsconfig.json:2
```
</details>
<details>
<summary>Script errors</summary>

```

```
</details>

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Angela Chuang <yi-chun.chuang@elastic.co>
Co-authored-by: Karen Grigoryan <karen.grigoryan@elastic.co>
2024-12-12 12:18:10 +01:00
Stratoula Kalafateli
6921de3498
[ES|QL] Improves the comments color in dark mode (#203965)
## Summary

Closes https://github.com/elastic/kibana/issues/202152

Fixes the comments color in dark mode 

<img width="928" alt="image"
src="https://github.com/user-attachments/assets/7d007cfa-f6d4-45e9-817d-57178c64d0a4"
/>
2024-12-12 12:08:55 +01:00
Gerard Soldevila
748193d0a7
Sustainable Kibana Architecture: Relocate script v2 (#203887)
## Summary

Commits titles are self-explanatory
2024-12-12 04:10:50 -06:00
Gerard Soldevila
f4795cdcd7
Sustainable Kibana Architecture: Change visibility to "shared" (#203842)
## Summary

Pre-requisite to update https://github.com/elastic/kibana/pull/202766
2024-12-12 10:42:28 +01:00
Nick Partridge
93122486d0
[Visual Refresh] Borealis visualization palettes (#201015)
Adds support for toggling between the old Amsterdam themed visualizations palettes and the new Borealis themed palettes.
2024-12-11 14:58:56 -06:00
Ying Mao
b9bac1628b
[Response Ops][Alerting] Backfill actions schema changes for intermediate release (#203184)
## Summary

This PR contains just the schema changes required to support backfill
actions. This is meant for an intermediate release and then the full PR:
https://github.com/elastic/kibana/pull/200784 will follow after that.

---------

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2024-12-11 13:47:01 -05:00
Marco Antonio Ghiani
d560c49095
[One Discover] Remove conversion to lower case for detail flyout log.level (#203811)
## 📓 Summary

Closes #203525 

This change removes the conversion to lowercase for the `log.level`
field value shown in the flyout detail.
This will solve a bug while adding filters on the table from the badge
in the detail since forcing the value to lowercase was creating a
mismatching filter.

For `log.level` values normalization, we'll consider doing follow-up
work, as this is now unrelated to the bug fix.


https://github.com/user-attachments/assets/4ee7cdd9-1111-4f40-8edc-ffc46acc9b29

Co-authored-by: Marco Antonio Ghiani <marcoantonio.ghiani@elastic.co>
2024-12-11 17:35:09 +01:00
Gerard Soldevila
0b9179acbd
Sustainable Kibana Architecture: Add scripts/relocate CLI (beta) (#203803)
## Summary

Adds the `node scripts/relocate` functionality, that helps moving
modules to their intended locations, according to the _Sustainable
Kibana Architecture_.

Please refer to the README.md for further details and usage.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2024-12-11 17:10:37 +01:00
Ryan Keairns
6f5d5cdfed
more lovable text colors (#203692)
Related to https://github.com/elastic/kibana/issues/199715
Closes https://github.com/elastic/kibana/issues/200160

## Summary

The Kibana ES|QL + Discover teams reviewed the ES|QL editor text colors
and found them to be dull relative to current theme settings. This PR
makes a slight change to use base colors instead of text colors.

**Note**
Longer term - and this consideration was preexisting - we could explore
adding a text-editor-specific set of tokens for use in Monaco editors.
That said, these theme files are not React based, so this might be a
challenge to handle via EUI tokens once the old javascript based theme
tokens are deprecated.

### Before and after

**Editor in 8.X (Amsterdam theme)**
<img width="420"
src="https://github.com/user-attachments/assets/23726e98-9277-4ef4-ae21-c843fc929aa3"
/>

**Editor on main (Borealis theme)**
<img width="400"
src="https://github.com/user-attachments/assets/2b973b8b-d292-46d2-a5d2-0a787f8c686a"
/>

**Editor after this PR (Borealis theme)**
_Light mode_
<img width="600"
src="https://github.com/user-attachments/assets/d34f2961-44b9-4f79-8690-dc44035f8146"
/>

_Dark mode_
<img width="420"
src="https://github.com/user-attachments/assets/e4ccbfb9-4dc1-4c41-ad95-6cc54a8de575"
/>
2024-12-11 07:08:00 -08:00
Marco Liberati
d4194ba5eb
[Embeddable] Avoid rerendering loop due to search context reload (#203150)
## Summary

Fixes #202266

This PR fixes the underline rerendering issue at the `useSearchApi` hook
level, so any embeddable component who uses this hook would benefit from
the fix.

Ideally the props passed to the Lens component should be memoized, but
this assumption would break many integrations as the previous embeddable
component did take care of filtering duplicates.
To test this:
* Go to `Observability > Alerts > Manage rules` and `Add Rule`, pick the
`Custom threshold` option and verify the infinite reload does not happen

Once fixed this, another problem bubbled up with the brushing use case:
when brushing a chart the chart was always one time range step behind.
The other bug was due to the `fetch$(api)` function propagating a stale
`data` search context who the Lens embeddable was relying on.
To solve this other problem the following changes have been applied:
* read the `searchSessionId` from the `api` directly (used for
`autoRefresh`)
* make sure to test the `Refresh` feature with both relative and
absolute time ranges
* read the `search context` from the `parentApi` directly if implements
the `unifiedSearch` API
* to test this, brush and check that the final time range matches the
correct time range

**Note**: the fundamental issue for the latter is `fetch$` not emitting
the up-to-date `data` when the parentApi search context updates. The
retrieved `data` is stale and one step behind, so it is not reliable. cc
@elastic/kibana-presentation

As @ThomThomson noticed in his test failure investigation another issue
was found in this PR due to the wrong handling of the searchSessionId
within the Observability page (for more details see [his
analysis](https://github.com/elastic/kibana/pull/203150#issuecomment-2524080129)).
@markov00 and @crespocarlos helped risolve this problem with some
additional changes on the Observability side of things: this will lead
to some extra searchSessionId to be created, which will be eventually
solved by Observability team [shortly moving away from the
`searchSessionId`
mechanism](https://github.com/elastic/kibana/issues/203412)

### Checklist

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

---------

Co-authored-by: Marco Vettorello <marco.vettorello@elastic.co>
Co-authored-by: Carlos Crespo <crespocarlos@users.noreply.github.com>
2024-12-11 16:03:36 +01:00
Eyo O. Eyo
3683cc2846
[React18] Migrate test suites to account for testing library upgrades security-detection-engine (#201149)
This PR migrates test suites that use `renderHook` from the library
`@testing-library/react-hooks` to adopt the equivalent and replacement
of `renderHook` from the export that is now available from
`@testing-library/react`. This work is required for the planned
migration to react18.

##  Context

In this PR, usages of `waitForNextUpdate` that previously could have
been destructured from `renderHook` are now been replaced with `waitFor`
exported from `@testing-library/react`, furthermore `waitFor`
that would also have been destructured from the same renderHook result
is now been replaced with `waitFor` from the export of
`@testing-library/react`.

***Why is `waitFor` a sufficient enough replacement for
`waitForNextUpdate`, and better for testing values subject to async
computations?***

WaitFor will retry the provided callback if an error is returned, till
the configured timeout elapses. By default the retry interval is `50ms`
with a timeout value of `1000ms` that
effectively translates to at least 20 retries for assertions placed
within waitFor. See
https://testing-library.com/docs/dom-testing-library/api-async/#waitfor
for more information.
This however means that for person's writing tests, said person has to
be explicit about expectations that describe the internal state of the
hook being tested.
This implies checking for instance when a react query hook is being
rendered, there's an assertion that said hook isn't loading anymore.

In this PR you'd notice that this pattern has been adopted, with most
existing assertions following an invocation of `waitForNextUpdate` being
placed within a `waitFor`
invocation. In some cases the replacement is simply a `waitFor(() => new
Promise((resolve) => resolve(null)))` (many thanks to @kapral18, for
point out exactly why this works),
where this suffices the assertions that follow aren't placed within a
waitFor so this PR doesn't get larger than it needs to be.

It's also worth pointing out this PR might also contain changes to test
and application code to improve said existing test.

### What to do next?
1. Review the changes in this PR.
2. If you think the changes are correct, approve the PR.

## Any questions?
If you have any questions or need help with this PR, please leave
comments in this PR.

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2024-12-11 14:46:09 +01:00
Felix Stürmer
62e059f0ca
[Dataset Quality] Work around a geoip limitation in CI (#203165)
The geoip database is not available in CI, so a `tags` field is added to
all ingested APM app log documents. This covers up the difference in
field counts between serverless CI and MKI by always having a `tags`
field in the documents. It also unskips the test that failed in MKI
because of this.

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2024-12-11 12:46:40 +01:00
Dario Gieselaar
fa1998ce92
[RCA] AI-assisted root cause analysis (#197200)
Implements an LLM-based root cause analysis process. At a high level, it
works by investigating entities - which means pulling in alerts, SLOs,
and log patterns. From there, it can inspect related entities to get to
the root cause.

The backend implementation lives in
`x-pack/packages/observability_utils-*` (`service_rca`). It can be
imported into any server-side plugin and executed from there.

The UI changes are mostly contained to
`x-pack/plugins/observability_solution/observabillity_ai_assistant_app`.
This plugin now exports a `RootCauseAnalysisContainer` which takes a
stream of data that is returned by the root cause analysis process.

The current implementation lives in the Investigate app. There, it calls
its own endpoint that kicks off the RCA process, and feeds it into the
`RootCauseAnalysisContainer` exposed by the Observability AI Assistant
app plugin. I've left it in a route there so the investigation itself
can be updated as the process runs - this would allow the user to close
the browser and come back later, and see a full investigation.

> [!NOTE]
> Notes for reviewing teams
> 
> @kbn/es-types:
> - support both types and typesWithBodyKey
> - simplify KeysOfSources type
> 
> @kbn/server-route-repository:
> - abortable streamed responses
> 
> @kbn/sse-utils*:
> - abortable streamed responses
> - serialize errors in specific format for more reliable re-hydration
of errors
> - keep connection open with SSE comments
> 
> @kbn/inference-*:
> - export *Of variants of types, for easier manual inference
> - add automated retries for `output` API
> - add `name` to tool responses for type inference (get type of tool
response via tool name)
> - add `data` to tool responses for transporting internal data (not
sent to the LLM)
> - simplify `chunksIntoMessage`
> - allow consumers of nlToEsql task to add to `system` prompt
> - add toolCallId to validation error message
> 
> @kbn/aiops*:
> - export `categorizationAnalyzer` for use in observability-ai*
> 
> @kbn/observability-ai-assistant*
> - configurable limit (tokens or doc count) for knowledge base recall
> 
> @kbn/slo*:
> - export client that returns summary indices

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Maryam Saeidi <maryam.saeidi@elastic.co>
Co-authored-by: Bena Kansara <bena.kansara@elastic.co>
2024-12-11 12:35:01 +01:00
Dzmitry Lemechko
87b2a12480
[scout] add ci pipeline (#202707)
## Summary

Adding basic pipeline to run scout UI tests for stateful and 3
serverless projects. Few tests were skipped for Security project because
esArchives used in tests ingest index that are restricted for default
project roles.

It is an opt-in pipeline to verify kbn/scout changes does not break the
existing tests. It is only for start and we plan to re-work into a
mature pipeline later.

New opt-in
[pipeline](https://buildkite.com/elastic/kibana-pull-request/builds/258589#0193afc4-bbd6-4200-8c5f-a7e4a8073e1d)
was added
<img width="1659" alt="Screenshot 2024-12-10 at 11 31 35"
src="https://github.com/user-attachments/assets/1c19fa46-4e66-4796-ac6d-c2c96c74fa8e">
2024-12-11 12:15:50 +01:00
Vitalii Dmyterko
8821e034e9
[Security Solution][Detection Engine] adds legacy siem signals telemetry (#202671)
## Summary

- partly addresses https://github.com/elastic/kibana/issues/195523
- adds snapshot telemetry that shows number of legacy siem signals and
number of spaces they are in
- while working on PR, discovered and fixed few issues in APIs
- get migration status API did not work correctly with new `.alerts-*`
indices, listing them as outdated
- finalize migration API did account for spaces, when adding alias to
migrated index
- remove migration API failed due to lack of permissions to removed
migration task from `.tasks` index

### How to test

#### How to create legacy siem index?

run script that used for FTR tests

```bash
node scripts/es_archiver --kibana-url=http://elastic:changeme@localhost:5601 --es-url=http://elastic:changeme@localhost:9200 load x-pack/test/functional/es_archives/signals/legacy_signals_index

```
These would create legacy siem indices. But be aware, it might break
Kibana .alerts indices creation. But sufficient for testing


#### How to test snapshot telemetry

Snapshot
For snapshot telemetry use
[API](https://docs.elastic.dev/telemetry/collection/snapshot-telemetry#telemetry-usage-payload-api)
call
OR
Check snapshots in Kibana adv settings -> Global Settings Tab -> Usage
collection section -> Click on cluster data example link -> Check
`legacy_siem_signals ` fields in flyout

<details>
<summary> Snapshot telemetry </summary>


<img width="2549" alt="Screenshot 2024-12-03 at 13 08 03"
src="https://github.com/user-attachments/assets/28ffe983-01c7-4435-a82a-9a968d32d5e0">


 </details>

---------

Co-authored-by: Ryland Herrick <ryalnd@gmail.com>
2024-12-11 10:03:19 +00:00
Julia Rechkunova
42594ebe8b
[Discover][Borealis] Update colors in field stats for Borealis theme (#203579)
- Closes https://github.com/elastic/kibana/issues/202044

## Summary

This PR updates the colors for field stats for Borealis theme. For
Amsterdam theme there should be no visual changes.

<img width="513" alt="Screenshot 2024-12-10 at 13 50 37"
src="https://github.com/user-attachments/assets/b5bc37da-eb95-45f6-b196-37511f6c936a">
<img width="514" alt="Screenshot 2024-12-10 at 13 51 07"
src="https://github.com/user-attachments/assets/cdf3c206-c88c-4f82-9905-3c9187d7461c">


### Testing

* Add the following to your `kibana.dev.yml`
```
uiSettings.experimental.themeSwitcherEnabled: true
uiSettings.overrides.theme:name: borealis
```
* Start Kibana with `KBN_OPTIMIZER_THEMES="experimental" yarn start`
2024-12-11 09:59:54 +01:00