Commit graph

84671 commits

Author SHA1 Message Date
elastic-renovate-prod[bot]
9494e1a41c
Update dependency tslib to ^2.8.1 2025-03-14 17:49:42 +00:00
Dzmitry Lemechko
b5f158bc42
[Space time] extending Scout with perfTracker fixture (#212397)
## Summary

On-Week project "Client-side performance insights with Playwright &
Lighthouse"

revisiting old PR #66224

This PR extends Scout with `perfTracker` fixture designed to analyze
JavaScript bundle performance and page-level performance metrics in
Kibana by leveraging Chrome DevTools Protocol (CDP).

It intercepts network requests, filters static bundles, and computes
bundle size statistics per page load. Additionally, it collects CDP
Performance Domain Metrics, allowing in-depth analysis of rendering and
script execution times.


[README](c013c39b7e/src/platform/packages/shared/kbn-scout/src/playwright/fixtures/test/performance/README.md)
file with more details and examples was added

Output example for `/app/discover` (shorten, just to share the idea):

```
{
  "url": "http://localhost:5620/app/discover#/",
  "bundleCount": 87,
  "totalSize": 3133420,
  "pluginCount": 9,
  "plugins": [
    {
      "name": "aiops",
      "bundlesCount": 2,
      "totalSize": 5982,
      "bundles": [
        {
          "name": "aiops.chunk.1.js",
          "transferredSize": 2013
        },
        ...
      ]
    },
    {
      "name": "discover",
      "bundlesCount": 17,
      "totalSize": 631605,
      "bundles": [
        {
          "name": "discover.chunk.1.js",
          "transferredSize": 41915
        },
        ...
      ]
    },
    {
      "name": "eventAnnotation",
      "bundlesCount": 1,
      "totalSize": 8652,
      "bundles": [
        {
          "name": "eventAnnotation.chunk.1.js",
          "transferredSize": 8652
        }
      ]
    },
    {
      "name": "expressionXY",
      "bundlesCount": 5,
      "totalSize": 203127,
      "bundles": [
        {
          "name": "expressionXY.chunk.2.js",
          "transferredSize": 5328
        },
        ...
      ]
    },
  ]
}
```

You can create a Scout UI test and start bundle tracker whenever you
want to compute collected stats when all loading is done. Designed as
test, it allows you to have individual validations for plugins, total
bundle size, individual plugin size, etc.

```
      // Ensure all JS bundles are loaded
      await perfTracker.waitForJsLoad(cdp);

      // Collect and validate stats
      const stats = perfTracker.collectJsBundleStats(currentUrl);
      expect(
        stats.totalSize,
        `Total bundles size loaded on page should not exceed 3.0 MB`
      ).toBeLessThan(3 * 1024 * 1024);
      expect(stats.bundleCount, {
        message: `Total bundle chunks count loaded on page should not exceed 100`,
      }).toBeLessThan(100);
      expect(
        stats.plugins.map((p) => p.name),
        { message: 'Unexpected plugins were loaded on page' }
      ).toStrictEqual([
        'aiops',
        'discover',
        'eventAnnotation',
        'expressionXY',
        'kbn-ui-shared-deps-npm',
        'lens',
        'maps',
        'unifiedHistogram',
        'unifiedSearch',
      ]);
      // Validate individual plugin bundle sizes
      expect(stats.plugins.find((p) => p.name === 'discover')?.totalSize, {
        message: `Total 'discover' bundles size should not exceed 625 KB`,
      }).toBeLessThan(625 * 1024);
```

Full test example:
7b18e85541/x-pack/platform/plugins/private/discover_enhanced/ui_tests/tests/discover_cdp_perf.spec.ts

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2025-03-14 18:35:31 +01:00
Nathan Reese
8619fb7114
[maps] layer panel left border (#213625)
### Problem
When viewing globe, map background blends with layer panel, making it
difficult to know where map interaction begins.

![screenshot_2025-03-05_at_5 25
30___pm_720](https://github.com/user-attachments/assets/1389e8c9-c893-4d13-ac89-6785760777ea)

### Solution
Problem is resolve by adding left border to distinguish between map area
and layer panel
<img width="1235" alt="Screenshot 2025-03-07 at 12 11 25 PM"
src="https://github.com/user-attachments/assets/6ed14cbf-6a8e-4bb9-8a9c-69e5d357bfe6"
/>

---------

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2025-03-14 11:30:48 -06:00
Christos Nasikas
1054799f9c
[Cases] Improve unit test flakiness (#212489)
## Summary

This PR attempts (I have lost count of how many there have been so far)
to stabilize the flakiness of cases tests.

## Approach

Based on our investigations, I believe a common factor that causes all
tests to time out is how we wrap the tests with the needed providers.
Instead of figuring out why they time out (which is very difficult), I
tried a different approach. I rewrote how we initialize the testing
dependencies, mocks, and providers on tests. To test my theory, I
created a VM instance in GCloud with the same configuration as the one
running in the CI, specifically the n2-standard-4 (4 vCPUs, 16 GB
Memory) machine type. I ran the tests 100 times, which took almost two
days. In 10 of the runs, a random test was timeouted. I noticed that the
machine was stressed while running the tests, and the CPU frequently
spiked to 100%, especially at the beginning of each test. Then, I
increased the timeout for all cases tests to 10 seconds and ran the
tests again 100 times. No timeouts occurred. Lastly, I created a VM
instance in GCloud with the same configuration as the one running in the
CI, specifically the n2-standard-8 (8 vCPUs, 32 GB Memory) machine type.
I ran the tests again 100 times. In 1 of the runs, a random test was
timeouted. The machine on the CI cannot handle the cases tests. I
believe the work in this PR is a step in the right direction either way,
and we will benefit from it. I also believe increasing the timeout is a
good decision as we need it based on the experiments and the research we
have done in the last months.

CPU usage on n2-standard-4


https://github.com/user-attachments/assets/36b035df-310f-4906-98ba-688d57b97c7e

CPU usage on n2-standard-8


https://github.com/user-attachments/assets/3b1b6351-d48e-41da-a413-a56e52b54b82

## RLT eslint rules
I enabled the [RLT eslint
rules](https://testing-library.com/docs/ecosystem-eslint-plugin-testing-library/)
for Cases and resolved any eslint errors. The process revealed small
bugs in the tests, which I fixed them.

## Testing utils

I removed the `appMockRender` and any usage in favor of the new
`renderWithTestingProviders` utility function and the improved
`TestProviders` component. The `renderWithTestingProviders` follows the
principals
[suggested](https://github.com/testing-library/react-testing-library/issues/780#issuecomment-689053441)
by the RLT team. Specifically:
- The `renderWithTestingProviders` is a wrapper of the `render` function
of the RTL library.
- The `renderWithTestingProviders` does not create the services or any
component inside it.
- The `renderWithTestingProviders` cannot be used in `beforeEach`
functions. It should be called separately on each test.
- The `renderWithTestingProviders` accepts props to override the default
mocks.
- The `renderWithTestingProviders` passes the `TestProviders` in the
`wrapper` argument of the RLT `render` function.
- The `TestProviders` component initializes and memoizes all services
and dependencies. It accepts props to override the default mocks.
- Mock overrides (like core services) should be created and passed to
`renderWithTestingProviders` on each test, even if it means duplication.
We favor test isolation.

### Checklist

Check the PR satisfies the 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

## Issues
<details>
<summary>List</summary>

Fixes: https://github.com/elastic/kibana/issues/207712
Fixes: https://github.com/elastic/kibana/issues/192739
Fixes: https://github.com/elastic/kibana/issues/174682
Fixes: https://github.com/elastic/kibana/issues/206366
Fixes: https://github.com/elastic/kibana/issues/207427
Fixes: https://github.com/elastic/kibana/issues/175239
Fixes: https://github.com/elastic/kibana/issues/177334
Fixes: https://github.com/elastic/kibana/issues/208443
Fixes: https://github.com/elastic/kibana/issues/187526
Fixes: https://github.com/elastic/kibana/issues/208310
Fixes: https://github.com/elastic/kibana/issues/192640
Fixes: https://github.com/elastic/kibana/issues/207077
Fixes: https://github.com/elastic/kibana/issues/197304
Fixes: https://github.com/elastic/kibana/issues/207249
Fixes: https://github.com/elastic/kibana/issues/202761
Fixes: https://github.com/elastic/kibana/issues/202115
Fixes: https://github.com/elastic/kibana/issues/193026
Fixes: https://github.com/elastic/kibana/issues/177304
Fixes: https://github.com/elastic/kibana/issues/208415
Fixes: https://github.com/elastic/kibana/issues/174661
Fixes: https://github.com/elastic/kibana/issues/201611
Fixes: https://github.com/elastic/kibana/issues/182364
Fixes: https://github.com/elastic/kibana/issues/175841
Fixes: https://github.com/elastic/kibana/issues/207907
Fixes: https://github.com/elastic/kibana/issues/171177
Fixes: https://github.com/elastic/kibana/issues/196628
Fixes: https://github.com/elastic/kibana/issues/194703
Fixes: https://github.com/elastic/kibana/issues/207241
Fixes: https://github.com/elastic/kibana/issues/206056
Fixes: https://github.com/elastic/kibana/issues/207328
Fixes: https://github.com/elastic/kibana/issues/205953
Fixes: https://github.com/elastic/kibana/issues/176524
Fixes: https://github.com/elastic/kibana/issues/176335
Fixes: https://github.com/elastic/kibana/issues/207404
Fixes: https://github.com/elastic/kibana/issues/207384
Fixes: https://github.com/elastic/kibana/issues/208380
Fixes: https://github.com/elastic/kibana/issues/207248
Fixes: https://github.com/elastic/kibana/issues/207444
Fixes: https://github.com/elastic/kibana/issues/175240
Fixes: https://github.com/elastic/kibana/issues/178001

</details>

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2025-03-14 17:17:13 +00:00
Søren Louv-Jansen
5f04c35740
[Obs AI Assistant] Decrease log level to debug (#214598)
Minor logging change
2025-03-14 17:14:29 +00:00
Justin Kambic
631a840db4
[Uptime] Fix skipped a11y tests (#214396)
## Summary

Resolves #204152.

Attempt to fix the mislabeled element by adding the `figure` role to it.
2025-03-14 13:01:45 -04:00
Gerard Soldevila
355a834659
SKA: Relocate /test to /src/platform/test (#210956)
## Summary

Part of https://github.com/elastic/kibana-team/issues/1503

This is a first step towards the relocation of all the Kibana tests.

The `/test/` folder at the root, which is in itself a package
(`@kbn/test-suites-src`), and contains a large number of tests and test
plugins, is being relocated under `src/platform/test`.

All the tests under this folder should be related to common platform
features, and they should not have any dependency towards
solution-specific components or features.

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

```
src/platform/test/analytics/plugins/analytics_ftr_helpers/jest.config.js:12
src/platform/test/analytics/plugins/analytics_ftr_helpers/package.json:10
src/platform/test/analytics/plugins/analytics_ftr_helpers/package.json:11
src/platform/test/analytics/plugins/analytics_ftr_helpers/tsconfig.json:11
src/platform/test/analytics/plugins/analytics_ftr_helpers/tsconfig.json:2
src/platform/test/analytics/plugins/analytics_plugin_a/package.json:10
src/platform/test/analytics/plugins/analytics_plugin_a/package.json:11
src/platform/test/analytics/plugins/analytics_plugin_a/tsconfig.json:10
src/platform/test/analytics/plugins/analytics_plugin_a/tsconfig.json:2
src/platform/test/api_integration/jest.config.js:12
src/platform/test/common/plugins/newsfeed/tsconfig.json:2
src/platform/test/common/plugins/otel_metrics/tsconfig.json:2
src/platform/test/functional/jest.config.js:12
src/platform/test/harden/child_process.js:13
src/platform/test/harden/lodash_template.js:13
src/platform/test/harden/prototype.js:10
src/platform/test/health_gateway/plugins/status/tsconfig.json:2
src/platform/test/interactive_setup_api_integration/plugins/test_endpoints/tsconfig.json:2
src/platform/test/interpreter_functional/plugins/kbn_tp_run_pipeline/package.json:11
src/platform/test/interpreter_functional/plugins/kbn_tp_run_pipeline/package.json:12
src/platform/test/interpreter_functional/plugins/kbn_tp_run_pipeline/tsconfig.json:11
src/platform/test/interpreter_functional/plugins/kbn_tp_run_pipeline/tsconfig.json:2
src/platform/test/node_roles_functional/plugins/core_plugin_initializer_context/package.json:11
src/platform/test/node_roles_functional/plugins/core_plugin_initializer_context/package.json:12
src/platform/test/node_roles_functional/plugins/core_plugin_initializer_context/tsconfig.json:2
src/platform/test/node_roles_functional/plugins/core_plugin_initializer_context/tsconfig.json:9
src/platform/test/package/Vagrantfile:2
src/platform/test/plugin_functional/README.md:40
src/platform/test/plugin_functional/plugins/app_link_test/package.json:11
src/platform/test/plugin_functional/plugins/app_link_test/package.json:12
src/platform/test/plugin_functional/plugins/app_link_test/tsconfig.json:10
src/platform/test/plugin_functional/plugins/app_link_test/tsconfig.json:2
src/platform/test/plugin_functional/plugins/core_app_status/package.json:11
src/platform/test/plugin_functional/plugins/core_app_status/package.json:12
src/platform/test/plugin_functional/plugins/core_app_status/tsconfig.json:10
src/platform/test/plugin_functional/plugins/core_app_status/tsconfig.json:2
src/platform/test/plugin_functional/plugins/core_dynamic_resolving_a/package.json:11
src/platform/test/plugin_functional/plugins/core_dynamic_resolving_a/package.json:12
src/platform/test/plugin_functional/plugins/core_dynamic_resolving_a/tsconfig.json:11
src/platform/test/plugin_functional/plugins/core_dynamic_resolving_a/tsconfig.json:2
src/platform/test/plugin_functional/plugins/core_dynamic_resolving_b/package.json:11
src/platform/test/plugin_functional/plugins/core_dynamic_resolving_b/package.json:12
src/platform/test/plugin_functional/plugins/core_dynamic_resolving_b/tsconfig.json:11
src/platform/test/plugin_functional/plugins/core_dynamic_resolving_b/tsconfig.json:2
src/platform/test/plugin_functional/plugins/core_history_block/package.json:11
src/platform/test/plugin_functional/plugins/core_history_block/package.json:12
src/platform/test/plugin_functional/plugins/core_history_block/tsconfig.json:2
src/platform/test/plugin_functional/plugins/core_history_block/tsconfig.json:6
src/platform/test/plugin_functional/plugins/core_http/package.json:11
src/platform/test/plugin_functional/plugins/core_http/package.json:12
src/platform/test/plugin_functional/plugins/core_http/tsconfig.json:11
src/platform/test/plugin_functional/plugins/core_http/tsconfig.json:2
src/platform/test/plugin_functional/plugins/core_plugin_a/package.json:11
src/platform/test/plugin_functional/plugins/core_plugin_a/package.json:12
src/platform/test/plugin_functional/plugins/core_plugin_a/tsconfig.json:11
src/platform/test/plugin_functional/plugins/core_plugin_a/tsconfig.json:2
src/platform/test/plugin_functional/plugins/core_plugin_appleave/package.json:11
src/platform/test/plugin_functional/plugins/core_plugin_appleave/package.json:12
src/platform/test/plugin_functional/plugins/core_plugin_appleave/tsconfig.json:10
src/platform/test/plugin_functional/plugins/core_plugin_appleave/tsconfig.json:2
src/platform/test/plugin_functional/plugins/core_plugin_b/package.json:11
src/platform/test/plugin_functional/plugins/core_plugin_b/package.json:12
src/platform/test/plugin_functional/plugins/core_plugin_b/tsconfig.json:11
src/platform/test/plugin_functional/plugins/core_plugin_b/tsconfig.json:2
src/platform/test/plugin_functional/plugins/core_plugin_chromeless/package.json:11
src/platform/test/plugin_functional/plugins/core_plugin_chromeless/package.json:12
src/platform/test/plugin_functional/plugins/core_plugin_chromeless/tsconfig.json:10
src/platform/test/plugin_functional/plugins/core_plugin_chromeless/tsconfig.json:2
src/platform/test/plugin_functional/plugins/core_plugin_deep_links/package.json:11
src/platform/test/plugin_functional/plugins/core_plugin_deep_links/package.json:12
src/platform/test/plugin_functional/plugins/core_plugin_deep_links/tsconfig.json:10
src/platform/test/plugin_functional/plugins/core_plugin_deep_links/tsconfig.json:2
src/platform/test/plugin_functional/plugins/core_plugin_deprecations/package.json:11
src/platform/test/plugin_functional/plugins/core_plugin_deprecations/package.json:12
src/platform/test/plugin_functional/plugins/core_plugin_deprecations/tsconfig.json:11
src/platform/test/plugin_functional/plugins/core_plugin_deprecations/tsconfig.json:2
src/platform/test/plugin_functional/plugins/core_plugin_execution_context/package.json:10
src/platform/test/plugin_functional/plugins/core_plugin_execution_context/package.json:11
src/platform/test/plugin_functional/plugins/core_plugin_execution_context/tsconfig.json:2
src/platform/test/plugin_functional/plugins/core_plugin_helpmenu/package.json:11
src/platform/test/plugin_functional/plugins/core_plugin_helpmenu/tsconfig.json:10
src/platform/test/plugin_functional/plugins/core_plugin_helpmenu/tsconfig.json:2
src/platform/test/plugin_functional/plugins/core_plugin_route_timeouts/package.json:11
src/platform/test/plugin_functional/plugins/core_plugin_route_timeouts/package.json:12
src/platform/test/plugin_functional/plugins/core_plugin_route_timeouts/tsconfig.json:2
src/platform/test/plugin_functional/plugins/core_plugin_route_timeouts/tsconfig.json:8
src/platform/test/plugin_functional/plugins/core_plugin_static_assets/package.json:11
src/platform/test/plugin_functional/plugins/core_plugin_static_assets/package.json:12
src/platform/test/plugin_functional/plugins/core_plugin_static_assets/tsconfig.json:10
src/platform/test/plugin_functional/plugins/core_plugin_static_assets/tsconfig.json:2
src/platform/test/plugin_functional/plugins/core_provider_plugin/package.json:11
src/platform/test/plugin_functional/plugins/core_provider_plugin/package.json:12
src/platform/test/plugin_functional/plugins/core_provider_plugin/tsconfig.json:10
src/platform/test/plugin_functional/plugins/core_provider_plugin/tsconfig.json:2
src/platform/test/plugin_functional/plugins/data_search/package.json:10
src/platform/test/plugin_functional/plugins/data_search/package.json:9
src/platform/test/plugin_functional/plugins/data_search/tsconfig.json:2
src/platform/test/plugin_functional/plugins/data_search/tsconfig.json:8
src/platform/test/plugin_functional/plugins/elasticsearch_client_plugin/package.json:10
src/platform/test/plugin_functional/plugins/elasticsearch_client_plugin/package.json:9
src/platform/test/plugin_functional/plugins/elasticsearch_client_plugin/tsconfig.json:2
src/platform/test/plugin_functional/plugins/elasticsearch_client_plugin/tsconfig.json:8
src/platform/test/plugin_functional/plugins/eui_provider_dev_warning/package.json:11
src/platform/test/plugin_functional/plugins/eui_provider_dev_warning/package.json:12
src/platform/test/plugin_functional/plugins/eui_provider_dev_warning/tsconfig.json:10
src/platform/test/plugin_functional/plugins/eui_provider_dev_warning/tsconfig.json:2
src/platform/test/plugin_functional/plugins/hardening/package.json:11
src/platform/test/plugin_functional/plugins/hardening/package.json:12
src/platform/test/plugin_functional/plugins/hardening/tsconfig.json:12
src/platform/test/plugin_functional/plugins/hardening/tsconfig.json:2
src/platform/test/plugin_functional/plugins/index_patterns/package.json:11
src/platform/test/plugin_functional/plugins/index_patterns/package.json:12
src/platform/test/plugin_functional/plugins/index_patterns/tsconfig.json:10
src/platform/test/plugin_functional/plugins/index_patterns/tsconfig.json:2
src/platform/test/plugin_functional/plugins/kbn_sample_panel_action/package.json:11
src/platform/test/plugin_functional/plugins/kbn_sample_panel_action/package.json:12
src/platform/test/plugin_functional/plugins/kbn_sample_panel_action/tsconfig.json:10
src/platform/test/plugin_functional/plugins/kbn_sample_panel_action/tsconfig.json:2
src/platform/test/plugin_functional/plugins/kbn_top_nav/package.json:11
src/platform/test/plugin_functional/plugins/kbn_top_nav/package.json:12
src/platform/test/plugin_functional/plugins/kbn_top_nav/tsconfig.json:11
src/platform/test/plugin_functional/plugins/kbn_top_nav/tsconfig.json:2
src/platform/test/plugin_functional/plugins/kbn_tp_custom_visualizations/package.json:11
src/platform/test/plugin_functional/plugins/kbn_tp_custom_visualizations/package.json:12
src/platform/test/plugin_functional/plugins/kbn_tp_custom_visualizations/tsconfig.json:10
src/platform/test/plugin_functional/plugins/kbn_tp_custom_visualizations/tsconfig.json:2
src/platform/test/plugin_functional/plugins/management_test_plugin/package.json:11
src/platform/test/plugin_functional/plugins/management_test_plugin/package.json:12
src/platform/test/plugin_functional/plugins/management_test_plugin/tsconfig.json:10
src/platform/test/plugin_functional/plugins/management_test_plugin/tsconfig.json:2
src/platform/test/plugin_functional/plugins/rendering_plugin/package.json:11
src/platform/test/plugin_functional/plugins/rendering_plugin/package.json:12
src/platform/test/plugin_functional/plugins/rendering_plugin/tsconfig.json:11
src/platform/test/plugin_functional/plugins/rendering_plugin/tsconfig.json:2
src/platform/test/plugin_functional/plugins/saved_object_export_transforms/package.json:11
src/platform/test/plugin_functional/plugins/saved_object_export_transforms/package.json:12
src/platform/test/plugin_functional/plugins/saved_object_export_transforms/tsconfig.json:2
src/platform/test/plugin_functional/plugins/saved_object_export_transforms/tsconfig.json:9
src/platform/test/plugin_functional/plugins/saved_object_import_warnings/package.json:11
src/platform/test/plugin_functional/plugins/saved_object_import_warnings/package.json:12
src/platform/test/plugin_functional/plugins/saved_object_import_warnings/tsconfig.json:11
src/platform/test/plugin_functional/plugins/saved_object_import_warnings/tsconfig.json:2
src/platform/test/plugin_functional/plugins/saved_objects_hidden_from_http_apis_type/package.json:11
src/platform/test/plugin_functional/plugins/saved_objects_hidden_from_http_apis_type/package.json:12
src/platform/test/plugin_functional/plugins/saved_objects_hidden_from_http_apis_type/tsconfig.json:2
src/platform/test/plugin_functional/plugins/saved_objects_hidden_from_http_apis_type/tsconfig.json:9
src/platform/test/plugin_functional/plugins/saved_objects_hidden_type/package.json:11
src/platform/test/plugin_functional/plugins/saved_objects_hidden_type/package.json:12
src/platform/test/plugin_functional/plugins/saved_objects_hidden_type/tsconfig.json:2
src/platform/test/plugin_functional/plugins/saved_objects_hidden_type/tsconfig.json:9
src/platform/test/plugin_functional/plugins/session_notifications/package.json:11
src/platform/test/plugin_functional/plugins/session_notifications/package.json:12
src/platform/test/plugin_functional/plugins/session_notifications/tsconfig.json:11
src/platform/test/plugin_functional/plugins/session_notifications/tsconfig.json:2
src/platform/test/plugin_functional/plugins/telemetry/package.json:11
src/platform/test/plugin_functional/plugins/telemetry/package.json:12
src/platform/test/plugin_functional/plugins/telemetry/tsconfig.json:2
src/platform/test/plugin_functional/plugins/telemetry/tsconfig.json:6
src/platform/test/plugin_functional/plugins/ui_settings_plugin/package.json:11
src/platform/test/plugin_functional/plugins/ui_settings_plugin/package.json:12
src/platform/test/plugin_functional/plugins/ui_settings_plugin/tsconfig.json:2
src/platform/test/plugin_functional/plugins/ui_settings_plugin/tsconfig.json:8
src/platform/test/plugin_functional/plugins/usage_collection/package.json:11
src/platform/test/plugin_functional/plugins/usage_collection/package.json:12
src/platform/test/plugin_functional/plugins/usage_collection/tsconfig.json:11
src/platform/test/plugin_functional/plugins/usage_collection/tsconfig.json:2
src/platform/test/server_integration/plugins/status_plugin_a/package.json:10
src/platform/test/server_integration/plugins/status_plugin_a/package.json:11
src/platform/test/server_integration/plugins/status_plugin_a/tsconfig.json:2
src/platform/test/server_integration/plugins/status_plugin_a/tsconfig.json:9
src/platform/test/server_integration/plugins/status_plugin_b/package.json:10
src/platform/test/server_integration/plugins/status_plugin_b/package.json:11
src/platform/test/server_integration/plugins/status_plugin_b/tsconfig.json:2
src/platform/test/server_integration/plugins/status_plugin_b/tsconfig.json:9
```

</details>

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2025-03-14 16:57:23 +00:00
Andrew Macri
c631bdd574
[Security Solution] [Attack discovery] Display error messages for invalid Anonymization configurations (#214506)
## [Security Solution] [Attack discovery] Display error messages for invalid Anonymization configurations

This PR detects invalid Anonymization configurations when generating Attack discoveries.

It displays an error message when:

- The Security AI Anonymization settings are configured to not allow _any_ fields, as reported in <https://github.com/elastic/kibana/issues/214310>
- The Security AI Anonymization settings are configured to not allow the `_id` field, as reported by @aarju

### Out of scope: detecting configurations that don't include enough useful fields

The default fields in the Security AI Anonymization settings were chosen because they are most likely to provide relevant context for the AI Assistant and Attack discovery.

However, there isn't a well defined threshold for the minimum set of useful fields.

For example, Attack discovery may still produce useful results (depending on the data), if the `user.name`, `host.name`, and `source.ip` fields are not allowed, but in most cases omitting these important fields will reduce the quality of results.

Another example: A configuration that **only** allows just **two** fields, for example the `_id` field AND `user.name` fields is valid, but NOT _useful_.

- Detecting configurations that don't include enough _useful_ fields is beyond the scope of this PR
- Configurations that **only** allow the `_id` field are _valid_, but not _useful_

#### Desk testing

1. Navigate to Stack Management > AI Assistants > Security

2. Configure the Security AI Anonymization settings to deny all fields.

Note: At the time of this writing, using the bulk actions to update all `102` default fields may result in an `Unable to load page` error that appears below the table when it is saved. Refreshing the page reveals the settings are not updated after clicking save. As a workaround for this separate, unrelated issue, apply bulk actions to only one page at a time, and be sure to refresh the page after saving changes to verify the update(s) before continuing to the next step.

3. Navigate to Security > Attack discovery

4. Click `Generate`

**Expected result**

- The following error message is displayed:

```
Your Security AI Anonymization settings are configured to not allow any fields. Fields must be allowed to generate Attack discoveries.
```

as illustrated by the screenshot below:

![no fields allowed error](https://github.com/user-attachments/assets/37933ffa-4ed1-4280-8b77-f2300c6736b2)

5. Once again, navigate to Stack Management > AI Assistants > Security

6. Allow all the (`102`) default fields

7. Once again, navigate to Security > Attack discovery

8. Click `Generate`

**Expected result**

- Attack discoveries are generated

9. Navigate back to Stack Management > AI Assistants > Security

10. Configure the `_id` field, and another (arbitrary) field to NOT be allowed

11. Navigate back to Security > Attack discovery

12. Click `Generate`

**Expected result**

- The following error message is displayed:

```
Your Security AI Anonymization settings are configured to not allow the _id field. The _id field must be allowed to generate Attack discoveries.
```

as illustrated by the screenshot below:

![_id not allowed error](https://github.com/user-attachments/assets/5ac296b1-3380-4aa0-b791-2848f6a1103c)
2025-03-14 10:41:40 -06:00
Joe Reuter
7cab88be97
🌊 Streams: Remove special rules around additive parsing for AI suggestions (#214245)
We decided to not enforce additive parsing. This means it's OK for the
generated patterns to override @timestamp or message directly.

This PR removes the special handling.
2025-03-14 16:38:27 +00:00
Jacek Kolezynski
d6f71349aa
[Security Solution] Remove bulk crud endpoints schemas (#213244)
**Partially addresses:** #211808,
https://github.com/elastic/security-docs/issues/5981 (internal)
**Resolves: #208329**

## Summary

This is the second part of the migration effort, containing changes for:
- BULK CRUD (removing, for v.9.0)

The PR also contains changes for ticket #208329 - as changes for
removing of dead code for handling Bulk CRUD endpoints had to be
combined together with removing the schema files for Bulk CRUD
endpoints.

This PR will be backported only to versions for Kibana v9

# Testing
1. cd x-pack/solutions/security/plugins/security_solution
2. yarn openapi:bundle:detections 
3. Take the bundled file
(docs/openapi/ess/security_solution_detections_api_2023_10_31.bundled.schema.yaml)
and load it into bump.sh console to see the changes.
4. Compare the changes with the [Legacy
documentation](https://www.elastic.co/guide/en/security/current/rule-api-overview.html)

You can also use this [link](https://bump.sh/jkelas2/doc/kibana_wip2/)
where I deployed the generated bundled doc.

---------

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2025-03-14 17:15:38 +01:00
Sergi Massaneda
9e13b5594a
[Security Solution] Siem migrations/copy changes rule translations (#214437)
## Summary

3/3 of https://github.com/elastic/security-team/issues/11696

**Done**
- UI changes in the onboarding cards
- UI changes in the upload form
- UI changes in the translated rules page

### Screenshots

Installed ML prebuilt rule
![Captura de pantalla 2025-03-13 a les 17 10
23](https://github.com/user-attachments/assets/89090e48-343d-4f84-ae07-7cacfbf3c39b)

KQL prebuilt rule
![Captura de pantalla 2025-03-13 a les 17 09
22](https://github.com/user-attachments/assets/cd7807df-50ba-49d9-846e-5879e5bc1794)

Custom translated rule
![Captura de pantalla 2025-03-13 a les 17 09
39](https://github.com/user-attachments/assets/712d4df0-0968-4b91-afe3-53f1e86058dc)

Custom partially translated rule
![Captura de pantalla 2025-03-13 a les 17 10
12](https://github.com/user-attachments/assets/63bd05a5-7066-464a-ac17-4a0754cd781a)

Custom not translated rule
![Captura de pantalla 2025-03-13 a les 17 11
32](https://github.com/user-attachments/assets/05439b43-2a9d-44dd-8ca6-502da743a3c3)

#### Other

Installed badge updated
![Captura de pantalla 2025-03-13 a les 17 12
25](https://github.com/user-attachments/assets/a1c1fdd0-99e0-44c7-8f73-066ce74199da)

Status tooltip updated
![Captura de pantalla 2025-03-13 a les 17 12
54](https://github.com/user-attachments/assets/bf9d05d0-048a-4672-a78b-decb6db36ad4)

Tour step 2 updated
![Captura de pantalla 2025-03-13 a les 17 13
49](https://github.com/user-attachments/assets/7c9312fa-f73c-4a8d-a3e9-4a9ab19a3169)

---------

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2025-03-14 17:15:09 +01:00
Marshall Main
920ce1b9ea
[Security Solution][Detection Engine] Convert wrapHits from factory to regular function (#213826)
## Summary

Follow up to https://github.com/elastic/kibana/pull/212694. This PR
switches more DE functions over to use `sharedParams`, an object that
contains the variety of parameters that we build at the top level of
rule execution in the common security rule wrapper. With `sharedParams`
available throughout rule execution, it's easier to access all the
parameters necessary for `wrapHits` when we call it so I also removed
the "factory" logic and just call `wrapHits` directly instead of passing
the function as a parameter on `sharedParams`.

There should be very few behavior changes in the code as a result of
this PR.
- `kibana.alert.rule.indices` is now populated for ES|QL alerts
- `ignoreFields` and `ignoreFieldsRegexes` are now respected by EQL, new
terms, and all suppressed rule types

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2025-03-14 12:12:50 -04:00
Ryland Herrick
02409dbd65
[Detection Engine] Cypress - Add more robust selection from our DataView dropdown component (#213510)
This addresses some recent cypress failures: 

* https://github.com/elastic/kibana/issues/212743 (Rule Creation with a
DataView)
* https://github.com/elastic/kibana/issues/212742 (Rule Creation + Edit
with a DataView)
* https://github.com/elastic/kibana/issues/213752 (Rule Creation +
Filter with a DataView)

This appears (as much as a cypress failure can 😓) to be caused by an
incorrect/false-positive assertion, leading to us (very occasionally)
interacting with the combobox before it's ready. We were calling
`.should('not.be.disabled')` on an element that could never be disabled.
By calling that instead on the inner `input` that actually is
enabled/disabled, we have the sanity check that was originally intended.

This PR also adds a post-action check (`.should('contains',
thingThatWasTyped)`) so that if the action fails, the test doesn't fail
inscrutably at a later step.

### Evidence

*
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/8003
(50x)
*
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/8004
(200x)
*
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/8033
(200x)

### Significance

**Note also** that some initial investigation found this pattern in
several places in our test suite. I'm going to follow up on this focused
PR with a more comprehensive one (once this is proven out in the flaky
runner).

### 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
- [x] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
2025-03-14 11:10:27 -05:00
Bryce Buchanan
3df90c8f2a
Fix checkPrivilege to query with indicies (#214002)
## Summary
`apmIndices` has the form: 
```
  "transaction": "traces-apm*,apm-*,traces-*.otel-*",
  "span": "traces-apm*,apm-*,traces-*.otel-*",
  "error": "logs-apm*,apm-*,logs-*.otel-*",
  "metric": "metrics-apm*,apm-*,metrics-*.otel-*",
  "onboarding": "apm-*",
  "sourcemap": "apm-*"
```

`mapValues(apmIndices, () => ['read']),` was producing an object that
looked like :
```
{
  "transaction": [
    "read"
  ],
  "span": [
    "read"
  ],
  "error": [
    "read"
  ],
  "metric": [
    "read"
  ],
  "onboarding": [
    "read"
  ],
  "sourcemap": [
    "read"
  ]
}
```

It seems this ought to check privileges on the actual indices, so this
PR restructures the `index` parameter to this :
 
```
{
  "traces-apm*": [
    "read"
  ],
  "apm-*": [
    "read"
  ],
  "traces-*.otel-*": [
    "read"
  ],
  "logs-apm*": [
    "read"
  ],
  "logs-*.otel-*": [
    "read"
  ],
  "metrics-apm*": [
    "read"
  ],
  "metrics-*.otel-*": [
    "read"
  ]
```

### 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)
2025-03-14 09:10:05 -07:00
César
7e8d0c61cc
Android dashboard changes (#213734)
## Summary

Resolves #213730 

## Overview tab

### Before

![Overview
before](https://github.com/user-attachments/assets/e0a61d8b-2649-4738-8276-bf366c7bfbb4)

### After

![Overview
after](https://github.com/user-attachments/assets/19b00766-1c4f-4233-ae82-167b65192534)

## Errors tab

### Before

![Errors
before](https://github.com/user-attachments/assets/e5b3d0c3-b377-4e46-a195-47de05326181)

### After

![Errors
after](https://github.com/user-attachments/assets/1c219849-05f5-4bfc-a198-2957848fe93b)

### Checklist

Check the PR satisfies following conditions. 

Reviewers should verify this PR satisfies this list as well.

- [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)

---------

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2025-03-14 17:00:34 +01:00
Alejandro Fernández Haro
e615dd6457
chore(): add Platform Analytics as codeowners of schemas (#214572)
## Summary

Adds `@elastic/platform-analytics` as codeowners of the telemetry
schemas to raise awareness of any changes implemented in the snapshot
telemetry.

The end goal is to remove Kibana Core from owning them.
2025-03-14 15:16:05 +00:00
Miriam
3ff1340c01
Add feature flag for service map api v2 (#214227)
Closes https://github.com/elastic/kibana/issues/213125

### Summary

Added feature flag to enable the new service map api
Not specific telemetry for events was added, the advance settings have
telemetry already out of the box


https://github.com/user-attachments/assets/684bd369-c46d-4ac0-ab07-33b5395a7f71

<img width="778" alt="Screenshot 2025-03-13 at 14 20 37"
src="https://github.com/user-attachments/assets/6445e85f-1108-43d1-aeee-a340cdfe99b8"
/>

### How to test

- Inspect the response. v2 has a `spans` object, and the current version
has an `elements` object

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2025-03-14 15:55:53 +01:00
elastic-renovate-prod[bot]
f2b5f3fe48
Update dependency @elastic/charts to v69.1.1 (main) (#213623) 2025-03-14 14:58:39 +01:00
Jean-Louis Leysens
5e90e557cf
[OAS] Support examples (and more) (#212495)
## Summary

Close https://github.com/elastic/kibana/issues/188926

Adds the ability to merge in an arbitrary OAS operation object (search
[spec](https://swagger.io/specification/) for "operation object") in
code generated OAS.

This enables us to write examples next to the code:

<img width="306" alt="Screenshot 2025-02-26 at 11 24 00"
src="https://github.com/user-attachments/assets/5df92ae9-c8c5-4797-8b7c-764e937e84e9"
/>

```ts
// Inside the router declaration
  router.post(
    {
      path: `${BASE_ALERTING_API_PATH}/rule/{id?}`,
      security: DEFAULT_ALERTING_ROUTE_SECURITY,
      options: {
        access: 'public',
        summary: `Create a rule`,
        tags: ['oas-tag:alerting'],
        // NEW 👇🏻: this file can contain operation-level OAS and will merge/override anything that we auto generate
        oasOperationObject: () => path.join(__dirname, 'create_rule.examples.yaml'),
        // ☝🏻 can also be a TS-checked OpenAPIV3.OperationObject
```

Tested with create rule example overlay
([gist](https://gist.github.com/jloleysens/dc643522a3f58dc2aed3dcef966b42df))
and bump

<img width="1236" alt="Screenshot 2025-02-26 at 11 45 57"
src="https://github.com/user-attachments/assets/c21b466a-ddab-49ce-b4ba-a04fd0e6c1b7"
/>

## Docs

Added developer guide docs to
https://docs.elastic.dev/kibana-dev-docs/genereating-oas-for-http-apis#2-route-definitions

<details>

<summary>images</summary>

<img width="799" alt="Screenshot 2025-03-13 at 13 02 31"
src="https://github.com/user-attachments/assets/e89b2c5a-1984-4672-a40b-b492581e690f"
/>

<img width="819" alt="Screenshot 2025-03-13 at 13 02 39"
src="https://github.com/user-attachments/assets/1375a25a-4d91-46b4-8ce5-42c763657d96"
/>

</details>




### TO DO
- [x] Document the feature in TS
- [x] Document feature in dev docs
- [x] Add tests

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2025-03-14 14:56:28 +01:00
Milton Hultgren
f2af002a5e
[kbn/server-route-repository] Use appropriate log level based on HTTP status (#214185) 2025-03-14 13:54:08 +00:00
Dmitrii Shevchenko
6d9fc21db9
[Security Solution] Batch prebuilt rule installation (#214441)
**This is a follow-up to:https://github.com/elastic/kibana/pull/211045**

## Summary  

This PR removes inefficiencies in prebuilt rule installation memory
consumption.

### Before

In the worst-case scenario:  

1. All currently installed prebuilt rules were fully loaded into memory.
2. All latest rule versions from the rule packages were fully loaded
into memory.
3. All base rule versions were pulled into memory, even though they were
not used.
4. The algorithm then checked which rules could be installed and
installed them all at once.

### After

1. Pull only aggregated information about installed rules (only
`rule_id` and `versions`).
2. Pull the same lightweight aggregated info about the latest rules in
the package.
3. Using the collected `rule_id`s, fetch rule assets and install them in
small batches of up to 100 rules.
2025-03-14 14:39:32 +01:00
Joey F. Poon
08c9ff33f3
update security serverless metering to allow partial chains (#214324)
## Summary

Update security serverless metering to allow partial chains.


### 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
2025-03-14 13:47:14 +01:00
Robert Stelmach
21ab897e17
Fix field values not visible in borealis theme (#212886)
FIx for the text for values in the Fix It Flow Flyout on Dataset Quality
not being visible post Borealis upgrade in 9.1-Snapshot


![image](https://github.com/user-attachments/assets/8dba368b-8508-44c2-95a6-8a21ef2ada48)
2025-03-14 13:17:11 +01:00
Marco Liberati
07c7450095
[Lens] Enable read only editor mode to inspect panel's configuration (#208554)
## Summary

Fixes #106553 

This PR enables the Read Only editor feature for Lens panels, who will
let users in read mode (no matter broader permissions) to explore the
visualization configuration.

Short list of changes:
* Edit action tooltip now changed from `Edit {name}` into `Edit {name}
configuration`
* `isEditingEnabled` takes into account now also `Managed` state of both
visualization and `parentApi`
* A new `showConfigAction` has been created to show users without write
capabilities the current Lens chart configuration
* Edit inline flyout title changed to `Configuration` no matter the
context (this has impact also on creation, i.e. ES|QL new panel)
* Within the configuration panel the `Visualization configuration`
section title has changed to `Visualization layers`
* When the panel is in read-only mode a callout is shown and no
editing/saving action is shown

## UX guidance

Here's some guidance [inherited by @MichaelMarcialis
comment](https://github.com/elastic/kibana/pull/208554#issuecomment-2666551818)
about the different flows based on user permissions.

**Read/write UX**

* No change

**Read-only UX**

* The glasses icon's tooltip shows as "View visualization
configuration"?
* Flyout title should simply be "Configuration"
* On second read, "Read only panel changes will revert after closing"
sounds a bit odd. Can we change to "Read-only: Changes will be reverted
on close"? Also, can we change the callout icon to glasses?
* Change "Visualization configuration" accordion title to "Visualization
layers".

### Screenshots

**Read-only UX**

If user has no write permissions the `glasses` icon is shown for the
action:
![Screenshot 2025-02-05 at 14 25
15](https://github.com/user-attachments/assets/64d23f00-82f7-4e90-bcef-29a18ae7116a)
And the panel is shown with the `read only` callout with no edit
buttons:
![Screenshot 2025-02-05 at 14 25
23](https://github.com/user-attachments/assets/39782a01-5d61-4498-9f50-4a3c7a6bf35d)

For a `Managed` dashboard the behaviour is the same as above (for the
user there's no difference between regular or managed dashboard, just
wanted to report here both cases):
![Screenshot 2025-02-05 at 14 25
34](https://github.com/user-attachments/assets/0b9aebd5-96db-4140-8e85-b08a9720ae33)
![Screenshot 2025-02-05 at 14 25
41](https://github.com/user-attachments/assets/d3487aa8-af9c-4b73-80fc-8ee2489f2f90)


### 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 <vettorello.marco@gmail.com>
Co-authored-by: Michael Marcialis <michael.l.marcialis@gmail.com>
2025-03-14 12:55:21 +01:00
Cristina Amico
2105648730
[Fleet] Tweak new SSL settings (#214060)
## Summary

Follow up of https://github.com/elastic/kibana/pull/208091,
https://github.com/elastic/kibana/pull/213211 and
https://github.com/elastic/kibana/pull/213211

Small UI enhancements to the SSL options introduced with the mentioned
PRs
- All the forms are now nested under an accordion to avoid taking too
much space

<details>
  <summary>Fleet server hosts</summary>
  
<img width="804" alt="Screenshot 2025-03-12 at 11 38 01"
src="https://github.com/user-attachments/assets/5835811a-6a22-470e-9e74-6dfc78761d8b"
/>
<img width="806" alt="Screenshot 2025-03-12 at 11 38 11"
src="https://github.com/user-attachments/assets/865f02b0-ec36-489f-904c-97c91a29ffca"
/>
<img width="787" alt="Screenshot 2025-03-12 at 11 51 39"
src="https://github.com/user-attachments/assets/494e20b7-a44b-45e9-aead-c7d51260da72"
/>
<img width="795" alt="Screenshot 2025-03-12 at 11 51 51"
src="https://github.com/user-attachments/assets/ba0abb37-0142-4ae1-ab5f-f2af96602c7a"
/>
</details>

<details>
  <summary>Agent Binary source</summary>

<img width="801" alt="Screenshot 2025-03-12 at 11 39 38"
src="https://github.com/user-attachments/assets/915b4ed9-d23d-4764-9805-aef5cce5798e"
/>
<img width="801" alt="Screenshot 2025-03-12 at 11 39 44"
src="https://github.com/user-attachments/assets/ea0347fb-a1fa-4454-b296-a132dffe6611"
/>

</details>

<details>
  <summary>ES Outputs</summary>
<img width="801" alt="Screenshot 2025-03-12 at 11 38 30"
src="https://github.com/user-attachments/assets/7ae7fdd4-f693-4d12-bb7e-79ddee2c6c3b"
/>
<img width="803" alt="Screenshot 2025-03-12 at 11 38 36"
src="https://github.com/user-attachments/assets/179463c2-9cbb-4dec-8f80-44c08a53073d"
/>

</details>

<details>
  <summary>Remote ES Outputs</summary>
<img width="802" alt="Screenshot 2025-03-12 at 11 46 39"
src="https://github.com/user-attachments/assets/b1f151a9-433a-4699-8aec-79f8174d069f"
/>
</details>
<details>
  <summary>Logstash Outputs</summary>
<img width="803" alt="Screenshot 2025-03-12 at 11 39 25"
src="https://github.com/user-attachments/assets/1f4da34c-ba2a-47e8-a258-61d943e9af7a"
/>

</details>


### Checklist

- [ ] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)
- [ ]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials

---------

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Julia Bardi <90178898+juliaElastic@users.noreply.github.com>
2025-03-14 11:34:26 +00:00
Jatin Kathuria
876a784a41
[Security Solution] Fix - Alert Table Event Rendered View + Cell actions (#212721)
## Summary

This PR fixes 2 bugs with regards to Event Rendered view.

## 1. Cell Actions of Event Rendered View
The Cell actions were not initialized in `Event Rendered View` and would
only appear once user has switched to the `Grid View`. See `Before`
section below to see the demo

|Before|After|
|---|---|
|<video
src="https://github.com/user-attachments/assets/ee02054c-828c-4b22-9364-bcba1c9c8067"/>|<video
src="https://github.com/user-attachments/assets/f7a428eb-e4d1-40c7-b2fc-deac9ef1ce30"/>|

## 2. Cell Actions in Event Renderers 
Some Event Renderers ( For example, `System Generic File`) and its
nested Event renderers had cell actions directed towards `timeline` even
though, they were rendered in Alert Table.

This was because `scopeId` was not being passed correctly to the Cell
Actions Provider. This is the case with most of the renderers and PR
adds `scopeId` prop, wherever it was needed.

|Before|After|
|---|---|
|<video
src="https://github.com/user-attachments/assets/c7511a25-a313-4e98-9370-40955d3c1d3b"/>|<video
src="https://github.com/user-attachments/assets/90aaa1be-209f-49a0-834e-c5bd5dded8c9"/>|




### 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
2025-03-14 12:29:34 +01:00
Gergő Ábrahám
b9a258723d
[EDR Workflows] Rename enforce_registry_filters advanced option (#214106)
## Summary

This PR renames the path for the following advanced option from
`windows.advanced.events.registry.enforce_registry_filters` to
`windows.advanced.events.enforce_registry_filters` in order to harmonize
with Endpoint.

migration is not added, see this comment for rationale:
https://github.com/elastic/kibana/issues/212526#issuecomment-2724023199

### Release note

Elastic Defend package policy's ineffective advanced option
`enforce_registry_filters` is replaced with a new field which now
provides the expected effect.
Manual act is needed from users to fill the new field, while the old
field is still visible in policy response.


### Checklist

Check the PR satisfies following conditions. 

Reviewers should verify this PR satisfies this list as well.

- [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)
2025-03-14 11:55:16 +01:00
Ignacio Rivas
b190747260
[UA] Make public APIs internal (#214051) 2025-03-14 09:14:27 +00:00
Francesco Fagnani
67e292e8f9
[Synthetics] Fixed bad loading state for grouped monitor cards (#214428)
Fixes #191649.

The bad loading state reported in the issue was probably caused by the
`isLoading` flag passed to the `EuiAccordion` component.

By checking the source code of the `EuiAccordion` component I found out
that that flag changes both `extraActions` and `children` into a loading
spinner.

![Screenshot 2025-03-13 at 16 29
13](https://github.com/user-attachments/assets/f5416a2a-55bf-4c66-826b-36a41317dbc4)

Also changed the number of rows passed to the `OverviewLoader` component
to match the `rowSize` set by the user.

Here the final result:



https://github.com/user-attachments/assets/215af2e2-11f7-4cec-b00d-061ec4e60ee6
2025-03-14 08:50:58 +00:00
Davis Plumlee
a2d2054148
[Security Solution] Reverts all remaining diff algorithm fields to return Target version when base version is missing (#214287)
## Summary

Originally we had intended to have the prebuilt rule diff algorithms
merge non-functional fields when the field's base version was missing
and a rule was marked as customized as described in
https://github.com/elastic/kibana/issues/210358

> - When the rule has a missing base version and is marked as
customized:
> - We should attempt to merge all non-functional mergeable fields (any
field that doesn't have consequences with how the rule runs e.g. tags)
and return them as SOLVABLE_CONFLICT

We ended up changing this logic to return the `Target` version for every
field that fit that description
(https://github.com/elastic/kibana/pull/214161 and
https://github.com/elastic/kibana/pull/213757) besides `tags` and in
order to support consistency rather than a very minor edge case, we now
just return the target version for every field with a missing base
version and let users sort it out on their end

This PR reverts the changes made to accommodate this edge case and
updates related tests to account for the new logic

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

---------

Co-authored-by: Georgii Gorbachev <georgii.gorbachev@elastic.co>
2025-03-14 07:20:37 +00:00
Stratoula Kalafateli
296aff2abb
[ES|QL] Update the definitions / docs scripts with the new paths from ES (#214321)
## Summary

Based on the changes here
https://github.com/elastic/elasticsearch/pull/124312/ changes the paths
of the ES docs and definitions
2025-03-14 08:08:20 +01:00
Kibana Machine
3cf9ec095a
[api-docs] 2025-03-14 Daily api_docs build (#214514)
Generated by
https://buildkite.com/elastic/kibana-api-docs-daily/builds/1011
2025-03-14 06:13:21 +00:00
elastic-renovate-prod[bot]
06d10090c1
Update docker.elastic.co/wolfi/chainguard-base:latest Docker digest to 3f6bcf4 (main) (#214502)
This PR contains the following updates:

| Package | Update | Change |
|---|---|---|
| docker.elastic.co/wolfi/chainguard-base | digest | `69a0542` ->
`3f6bcf4` |

---

### 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://redirect.github.com/renovatebot/renovate).

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

Co-authored-by: elastic-renovate-prod[bot] <174716857+elastic-renovate-prod[bot]@users.noreply.github.com>
2025-03-14 03:55:25 +00:00
elastic-renovate-prod[bot]
a8777749e7
Update dependency @hapi/hapi to ^21.4.0 (main) (#214209)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [@hapi/hapi](https://hapi.dev)
([source](https://redirect.github.com/hapijs/hapi)) | dependencies |
minor | [`^21.3.12` ->
`^21.4.0`](https://renovatebot.com/diffs/npm/@hapi%2fhapi/21.3.12/21.4.0)
|

---

### Release Notes

<details>
<summary>hapijs/hapi (@&#8203;hapi/hapi)</summary>

###
[`v21.4.0`](https://redirect.github.com/hapijs/hapi/compare/v21.3.12...v21.4.0)

[Compare
Source](https://redirect.github.com/hapijs/hapi/compare/v21.3.12...v21.4.0)

</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://redirect.github.com/renovatebot/renovate).

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

---------

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>
2025-03-14 00:45:59 +01:00
Shahzad
071838129c
[Synthetics] Unskip getMonitors api test !! (#214075)
## Summary

Fixes https://github.com/elastic/kibana/issues/204069 !!

Unskip getMonitors api test !!
2025-03-13 22:21:30 +01:00
Shahzad
ea40a0a38a
[SLOs Annotations] Fix rendering issue with annotations (#214157)
## Summary

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

Fix rendering issue with annotations !!

This has been done because react suspense doesn't plays nicely with
elastic/chart rendering. And we have to render annotation with charts
dynamically.
2025-03-13 22:20:43 +01:00
Viduni Wickramarachchi
d66e0b2525
[Obs AI Assistant] Forward telemetryMetadata.pluginId to the EIS use case header (#214285)
## Summary

Closes https://github.com/elastic/obs-ai-assistant-team/issues/217

This PR forwards the Obs AI Assistant use case header for EIS through
the existing `telemetryData` property.

Relates to https://github.com/elastic/search-team/issues/9424
The header is implemented in this PR -
https://github.com/elastic/kibana/pull/214269

### Checklist

- [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)
2025-03-13 15:29:37 -04:00
Jan Monschke
edbc618321
[Threat Hunting Investigations] Fix timeline column width bug (#214178)
## Summary

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

The issue above describes a bug in timeline that makes it impossible to
change the width of a timeline column. This PR fixes that issue and
makes sure that timeline column width settings are saved to
localStorage. This mimics the behaviour of the alerts table elsewhere in
security solution.


https://github.com/user-attachments/assets/8b9803a0-406d-4f2d-ada5-4c0b76cd6ab8

---------

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2025-03-13 13:49:16 -05:00
christineweng
a6ceafc891
[Security Solution] Fix session view navigation when in alert preview and add preview banner (#213455)
## Summary

Before: when in an alert preview, clicking session preview header opens
session view in details panel, but the preview persists.

This PR addressed the bug by including `isPreviewMode` as an indicator
that the panel is opened in preview. Clicking a link in preview should
opens a new flyout and preview should not appear.


https://github.com/user-attachments/assets/484daa16-adb0-48f2-b14e-a971878817c0

Added banner to session viewer in flyout

<img width="1468" alt="image"
src="https://github.com/user-attachments/assets/e228b35f-938a-4ad1-a97f-818caf36a284"
/>


### Checklist

- [x] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)
- [ ] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [ ] 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)
2025-03-13 13:43:18 -05:00
Bailey Cash
22e64dc868
[SLO]: Include spaceID in SLI documents (#214278)
## Summary

Resolves #213464 

## Release Notes

SpaceId can now be referenced in document-based access filters for roles
to restrict a user's access to SLI data for spaces where they do not
have access.
2025-03-13 18:39:38 +00:00
Maxim Palenov
aa3d5eb373
[Security Solution] UI copy for Upgrade rules confirmation modal (#213981)
## Summary

Updates texts according to the suggested UI copy ([source doc](https://docs.google.com/document/d/1qjSxs1aDHJ8AKj5xR4erPdNumLy9Jqu3AlL9oGXnfxo/edit?tab=t.0)).

## Screenshots

Update All rules:
<img width="1722" alt="image" src="https://github.com/user-attachments/assets/424d4812-6a29-4205-ab5d-df2b2024507a" />

Single rule with solvable conflicts:
<img width="1714" alt="image" src="https://github.com/user-attachments/assets/916a264f-44ba-45de-99cb-15e337ead2bd" />

Multiple rules with solvable conflicts:
<img width="1718" alt="image" src="https://github.com/user-attachments/assets/6b7684f6-978b-4511-9b8a-ccde049730b9" />

Mix of conflict-free rules and rules with solvable conflicts:
<img width="1716" alt="image" src="https://github.com/user-attachments/assets/cd2325a6-0dec-48b1-a2af-6185acf16b10" />
<img width="1714" alt="image" src="https://github.com/user-attachments/assets/ecb74497-ddbb-4407-8dfd-6902642dd9c3" />

Mix of conflict-free rules and rules with non-solvable conflicts:
<img width="1723" alt="image" src="https://github.com/user-attachments/assets/0b980dd4-4109-4b63-859f-c95cc31dd7b4" />

Only rules with conflicts:
<img width="1720" alt="image" src="https://github.com/user-attachments/assets/f66cee4e-e648-4eb5-902a-db0a4bd3a423" />
<img width="1718" alt="image" src="https://github.com/user-attachments/assets/9d42e5d9-6a62-4c60-8aea-bb5376b2d2c5" />

Mix of rules selected to update:
<img width="1717" alt="image" src="https://github.com/user-attachments/assets/e882cbd1-203d-499f-b51f-37691405a3a5" />
2025-03-13 19:36:35 +01:00
Robert Jaszczurek
482ac1ee76
[ML] Trained Models: Track model downloads and Deployment updates (#213699)
Part of https://github.com/elastic/kibana/issues/200725

This PR adds telemetry to track model downloads and deployment updates.
It also includes tracking for failed deployments, as the previous
implementation only tracked successful deployments.
2025-03-13 19:29:08 +01:00
Tiago Costa
69723619b8
skip flaky suite (#213461) 2025-03-13 18:04:43 +00:00
florent-leborgne
2e80cd19f5
[Docs] Simplify link to PRs in breaking changes and deprecation notices (#214444)
This PR simplifies the wording in breaking changes and deprecations docs
to feel less redundant, and re-adds a proper template for adding new
entries.
2025-03-13 13:50:58 -04:00
Julia Bardi
eb62a047bd
[Fleet] fix UI bug displaying default agent binary source (#214360)
## Summary

Fix UI bug when an agent policy uses the default download source
explicitly. The Agent binary download UI select was empty.

To verify:
- create a new agent binary download source
- create an agent policy with using the default download source
- check on Agent policy details UI that the Agent binary download UI
select is populated correctly

```
POST kbn:/api/fleet/agent_policies
{
  "name": "demo-policy-5",
  "description": "",
  "namespace": "default",
  "monitoring_enabled": [
    "logs",
    "metrics",
    "traces"
  ],
  "inactivity_timeout": 1209600,
  "is_protected": false,
  "download_source_id": "fleet-default-download-source"
}
```

Before:


![image](https://github.com/user-attachments/assets/6bde2652-bbf2-42af-8a2a-c893c5e80d27)

After:

<img width="1517" alt="image"
src="https://github.com/user-attachments/assets/f5d19520-317e-4df8-aaed-0e367a2e6d9b"
/>
2025-03-13 17:01:08 +00:00
Tre
1a9ad39aec
[MKI][FTR] Fixup reporting (#214392)
# Summary

Increase timeout.

Resolves: https://github.com/elastic/kibana/issues/214391
2025-03-13 16:05:11 +00:00
Nathan Reese
c886fb0f73
unskip Failing test: Chrome UI Functional Tests.test/functional/apps/dashboard/group6/view_edit·ts (#211653)
Closes https://github.com/elastic/kibana/issues/200748

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

---------

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2025-03-13 09:56:35 -06:00
Nathan Reese
165db29bdc
unskip Failing test: Chrome X-Pack UI Functional Tests.x-pack/test/functional/apps/maps/group4/file_upload/shapefile·js (#211310)
Closes https://github.com/elastic/kibana/issues/209228 and
https://github.com/elastic/kibana/issues/209848

Maps only fetch data for visible area. A smaller screen could result in
less documents getting returned. This PR resolves the flakyness by
setting the screen size before running to ensure the correct screen area
and consistent results.

Flaky test runner (25)
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/7887
Flaky test runner (100)
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/8027

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2025-03-13 09:55:41 -06:00
Elena Shostak
5d9fd46b2a
[Authz] Added reason for authorization opt-out for logstash routes (#213891)
## Summary

Added reason for authorization opt-out for logstash routes.


### Checklist

- [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)
2025-03-13 15:55:22 +00:00
Steph Milovic
13906cbb76
[Stack connector] Forward telemetryMetadata.pluginId to EIS use case header (#214269) 2025-03-13 09:44:06 -06:00