Commit graph

1518 commits

Author SHA1 Message Date
Antonio
08d0717d46
[ResponseOps][MaintenanceWindow] Public maintenance window API (#216756)
Closes #198685

## Summary

This PR creates a public Maintenance Window API.

The work was done on a feature branch over multiple separate PRs. Here
we will merge the feature branch into `main`.
- https://github.com/elastic/kibana/pull/209734
- https://github.com/elastic/kibana/pull/213694
- https://github.com/elastic/kibana/pull/214747
- https://github.com/elastic/kibana/pull/213771

The [documentation PR](https://github.com/elastic/kibana/pull/212377)
still needs to be merged.

## Release Notes

Publish new public APIs for the Maintenance Window.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: lcawl <lcawley@elastic.co>
2025-04-16 11:39:38 +02:00
Alejandro Fernández Haro
4cd9376422
[Config stripUnknowns] Skip compatible mode when running in CI (#217536) 2025-04-14 17:52:51 +02:00
Alex Szabo
a3766fd1ef
[CI] Also download FIPS artifacts before validating (#217986)
## Summary
Attempts to fix:
https://buildkite.com/elastic/kibana-artifacts-snapshot/builds/5949#01962428-99a7-4481-8b8b-95685d1d4d79

The step was trying to validate cloud fips artifacts (after:
https://github.com/elastic/infra/pull/42268) but these were never
downloaded in that step.
2025-04-11 08:19:28 -06:00
Tiago Vila Verde
1bf39845da
[Entity Analytics][Privilege Monitoring] Engine initialization API (#215663)
## Summary 

This PR introduces the first building blocks for the [Entity Analytics
Privileged
Monitoring](https://github.com/elastic/security-team/issues/9971).
We follow the approach used in the Entity Store and add a new "Engine",
which consists of the following components:
* Public API
  * INIT and HEALTH routes
* Kibana task 
* Privilege Monitoring Data Client
* Engine Saved Object
* API key manager
* Related storage indices
* Feature Flag: `privilegeMonitoringEnabled` set to `false` by default.
* API integration test configuration
  * only tests that the health endpoint is available
* Auditing and Telemetry 


## Testing steps

1. Make sure to add `privilegeMonitoringEnabled` to your
`kibana.dev.yaml`
2. In devtools, ensure the API is working with `GET
kbn:/api/entity_analytics/monitoring/privileges/health`
3. Start the engine with: `POST
kbn:/api/entity_analytics/monitoring/engine/init`
4. Look for `DEBUG` logs mentioning the
`entity_analytics:monitoring:privileges:engine` task

---------

Co-authored-by: CAWilson94 <charlotte.wilson@elastic.co>
Co-authored-by: Charlotte Alexandra Wilson <CAWilson94@users.noreply.github.com>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2025-04-11 13:25:24 +02:00
Brad White
b6907a54d8
[FIPS][Build] Add Cloud FIPS ARM artifacts (#217380)
## Summary

Closes #217355
[Test
run](https://buildkite.com/elastic/kibana-artifacts-snapshot/builds/5927#_)
in the artifact pipeline. Then tested the ARM Cloud FIPS on an ARM GCP
instance.
2025-04-09 09:55:03 -06:00
Robert Oskamp
e710e98fe0
[workchat] Initial FTR test setup (#216828)
## Summary

This PR adds the structure for workchat FTR tests and adds a few initial
tests as an example.

### Details about initially added tests

New test directories:
- `x-pack/test_serverless/api_integration/test_suites/chat`
  - load a few common tests (that run on all project types)
- run `platform` security tests (taken over from `search` project type)
- `x-pack/test_serverless/functional/services/svl_chat_navigation.ts`
  - load the `home page` common test
- run a simple navigation test, using the `svlChatNavigation` service
that has been introduced as an example

Note that these tests mostly serve as examples to prove things are
actually running and will have to be adjusted / removed / extended over
time. The purpose of this PR is NOT to add proper test coverage.

Closes #213469

---------

Co-authored-by: Aleh Zasypkin <aleh.zasypkin@gmail.com>
2025-04-09 10:31:12 +02:00
Dzmitry Lemechko
a234f3646c
[ftr] split feature controls tests into v1/v2 configs (#217458)
## Summary

Splitting long running config:
`x-pack/test/functional/apps/saved_query_management/config.ts` **~57
min** into

  - x-pack/test/functional/apps/saved_query_management/config.ts 35m 
- x-pack/test/functional/apps/saved_query_management/config.v2.ts 25m
17s

ideally we need to split both even more, but I will leave it for the
later (probably Data-Discovery Team have some ideas how to re-org it?)
2025-04-08 19:01:06 -03:00
Dzmitry Lemechko
9c560e5444
[ftr] split discover group3 config (#217486)
## Summary

Split long running config
`src/platform/test/functional/apps/discover/group3/config.ts: 39.1
minutes` into

  - src/platform/test/functional/apps/discover/group3/config.ts 10m
  - src/platform/test/functional/apps/discover/group9/config.ts 14m 34s
  - src/platform/test/functional/apps/discover/group10/config.ts 18m 15s
2025-04-08 18:52:13 +02:00
Dzmitry Lemechko
aa9be6a621
[ftr] split oblt DA configs to speedup CI (#217452)
## Summary

Splitting the following config:

-
x-pack/test/api_integration/deployment_agnostic/configs/serverless/oblt.serverless.config.ts
**~61 min**

by moving `ai_assistant`, `synthetics` and `streams` tests in its own
configs

-
x-pack/test/api_integration/deployment_agnostic/configs/serverless/oblt.ai_assistant.serverless.config.ts
~11m 30s
-
x-pack/test/api_integration/deployment_agnostic/configs/serverless/oblt.synthetics.serverless.config.ts
~21m 30s
-
x-pack/test/api_integration/deployment_agnostic/configs/serverless/oblt.streams.serverless.config.ts
~21m 43s

original config with less tests:
-
x-pack/test/api_integration/deployment_agnostic/configs/serverless/oblt.serverless.config.ts
~17 min
2025-04-08 08:14:58 -05:00
Dzmitry Lemechko
8c08db126c
[scout] support tests run against Cloud / MKI (#216705)
## Summary

closes #203588

This PR extends `kbn-scout` to run UI tests against Cloud deployment or
MKI project.

It it required by design to define `cloud_ech.json` or `cloud_mki.json`
with Cloud enviroment details:

**ECH config**

```json
{
  "serverless": false,
  "isCloud": true,
  "cloudHostName": "console.qa.cld.elstc.co",
  "cloudUsersFilePath": "/path_to_your_cloud_users/role_users.json",
  "hosts": {
    "kibana": "https://my.cloud.deployment.kb.co",
    "elasticsearch": "https://my.cloud.deployment.es.co"
  },
  "auth": {
    "username": "deployment_username",
    "password": "deployment_password"
  }
}
```

How to run:

1. Create stateful deployment on QA env
2. Add `cloud_ech.json` (see above) in `KIBANA_REPO_ROOT/.scout/servers`
dir
3. Run tests

Scout: 
```bash
node scripts/scout.js run-tests \
--stateful \
--testTarget=cloud \
--config x-pack/platform/plugins/private/discover_enhanced/ui_tests/parallel.playwright.config.ts \
--headed
```
PW: 
```
npx playwright test \
--project=ech \
--config=x-pack/platform/plugins/private/discover_enhanced/ui_tests/parallel.playwright.config.ts \
--grep=@ess
```

**Serverless config**

```json
{
  "serverless": true
  "projectType": "es",
  "isCloud": true,
  "cloudHostName": "console.qa.cld.elstc.co",
  "cloudUsersFilePath": "/path_to_your_cloud_users/role_users.json",
  "hosts": {
    "kibana": "https://my.es.project.kb.co",
    "elasticsearch": "https://my.es.project.es.co"
  },
  "auth": {
    "username": "deployment_username",
    "password": "deployment_password"
  }
}
```

How to run:

1. Create stateful deployment on QA env
2. Add `cloud_mki.json` (see above) in `KIBANA_REPO_ROOT/.scout/servers`
dir
3. Run tests

Scout: 
```bash
node scripts/scout.js run-tests \
--serverless=es \
--testTarget=cloud \
--config x-pack/platform/plugins/private/discover_enhanced/ui_tests/parallel.playwright.config.ts \
```
PW: 
```
npx playwright test \
--project=mki \
--config=x-pack/platform/plugins/private/discover_enhanced/ui_tests/parallel.playwright.config.ts \
--grep=@svlSearch
```
2025-04-08 13:03:48 +02:00
Alex Szabo
08c5f0799d
[ci] Minor quick-checks updates (#215856)
## Summary
1 - `node scripts/prettier_topology_check` occasionally breaks with
`.gitignore` not being available, it's required for a globby call.
(https://buildkite.com/elastic/kibana-on-merge/builds/64944#0195c874-c2b0-436c-9752-91a6118dde9d)

2 - some scripts are run together by `yarn kbn run-in-packages` - this
script only logs AFTER a script finished successfully; when a script
like this fails, the failing script is not logged. This change logs
before to see what the error is. (ref:
https://elastic.slack.com/archives/C5UDAFZQU/p1742824259264329)
2025-04-08 09:26:14 +02:00
Brad White
dcb4242843
[FIPS][Build] Add Wolfi tag to FIPS image (#217247)
## Summary

Adjusts the Docker tag for the Wolfi FIPS image from `kibana-fips` to
`kibana-wolfi-fips` to avoid confusion in the future. The other products
use `<product>-fips` naming for released Cloud artifacts but our
artifact is `kibana-cloud-fips`.


### Considerations

This changeset could be further reaching, but unsure if it's necessary
and would like other opinions. If we want to change it now is the time
while adoption is low. For example, we're using `--skip-docker-fips` in
build scripts or GH label `ci:build-docker-fips`. We could align these
better, adding `wolfi` but don't think it is necessary.
2025-04-07 10:27:18 -07:00
Jean-Louis Leysens
135b57bbac
[OAS] Migrate _export and _import APIs to code-first OAS (#217146)
## Summary

* Removes manually maintained OAS for Core's `_export` and `_import`
Saved Object APIs
* seeks to remove some code duplication and move our OAS descriptions
closer to the code definitions.
2025-04-07 11:45:47 +02:00
Dzmitry Lemechko
64142047fb
[scout] fix flaky flyout test (#217153)
## Summary

```
TimeoutError: page.waitForSelector: Timeout 10000ms exceeded.
Call log:
  - waiting for locator('[data-test-subj="globalLoadingIndicator-hidden"]')

    at Object.waitForSelector (src/platform/packages/shared/kbn-scout/src/playwright/fixtures/test/scout_page/single_thread.ts:47:27)
    at Page.waitForLoadingIndicatorHidden (src/platform/packages/shared/kbn-scout/src/playwright/fixtures/test/scout_page/single_thread.ts:91:27)
    at x-pack/solutions/security/plugins/security_solution/ui_tests/parallel_tests/flyout/alert_details_url_sync.spec.ts:40:16
```

Failure rate before changes: 60%

<img width="487" alt="image"
src="https://github.com/user-attachments/assets/9331f973-9337-48cf-9131-c3acbf611d9c"
/>

For some reason specifically in serverless Security project loading
indicator is not hidden on page reload after 10 seconds.

To unblock Teams this PR changes tests to wait for
`detectionsAlertsPage` to be visible instead. The follow-up is to set
loading status directly in Alerting Table component and wait for
`alertsTable-loaded` data-test-subj in UI tests before interacting with
table.

Failure rate with changes: 0%
<img width="1592" alt="Screenshot 2025-04-04 at 17 08 32"
src="https://github.com/user-attachments/assets/c955ed94-bc92-4328-a3b5-0194806d31b1"
/>
2025-04-04 12:21:30 -05:00
Alex Szabo
9f8503e0b3
[CI] Allow using elastic-images-qa through PR label or env var (#216878)
## Summary
Currently, if you'd like to test something on Kibana's VM image, you'd
have to build a VM image to -qa, then rewrite all references to
`elastic-images-qa` for the PR jobs; once done with testing, we'd undo
the changes to `elastic-images-prod`.

This is a helpful tool for us to test with WIP VM images, we'd be able
to add a label to the PR, and it would automatically grab the QA images,
without any temporary commits.

Jobs in https://buildkite.com/elastic/kibana-pull-request/builds/289599
have ran with an elastic-qa image. 
2025-04-04 10:05:30 +02:00
Alex Szabo
3cab3547b1
Revert "[ci] Disable chrome forward testing until 2025-03-28 (#214947)" (#214950)
This reverts commit 1c6f8bed0b.

## Summary

Merge by 2025-03-28, or if
https://github.com/elastic/kibana/issues/213919 is done.

See for context: #214947
2025-03-28 22:14:33 +01:00
Brad White
8601ec3072
[FIPS][Cloud][Build] Add FIPS cloud image. Convert base image to Wolfi. (#213163)
## Summary

- Closes elastic/kibana-operations#245
- Convert FIPS base image from UBI to `chainguard-base-fips`
- Add FIPS base image updates to Renovate
- Adjust naming scheme for FIPS image from `kibana-ubi-fips` to
`kibana-fips`
- Adds new image flavor `kibana-cloud-fips`
- Adds support for `ci:build-cloud-fips-image` label
- Move Cloud image building to its own step instead of being part of
`Build Kibana Distribution` step so it will be triggered when the build
is reused and the `build` step is skipped.
2025-03-27 08:01:08 -07:00
Alex Szabo
115ec32eec
Upgrade axios 1.8.3 in buildkite (#215656)
## Summary
According to:

https://buildkite.com/elastic/kibana-on-merge/builds/65027#0195ca29-b10a-4e20-b00f-c4fbe43689fa

```

Annotate test failures error Request failed with status code 404 AxiosError: Request failed with status code 404
--
  | at settle (/opt/buildkite-agent/builds/bk-agent-prod-gcp-1742853500882456889/elastic/kibana-on-merge/kibana/.buildkite/node_modules/axios/lib/core/settle.js:19:12)
...
  | at async /opt/buildkite-agent/builds/bk-agent-prod-gcp-1742853500882456889/elastic/kibana-on-merge/kibana/.buildkite/scripts/lifecycle/annotate_test_failures.ts:14:5
  | HTTP Error 404/Not Found (https://api.buildkite.com/v2/organizations/elastic/pipelines/kibana-on-merge/builds/65027/artifacts?page=2&per_page=100) { message: 'Not Found' }

```
This points to the client collecting all artifacts through traversing
the `next` links from Buildkite's API responses. It appears, Axios is
not happy about these absolute paths, even if the origin is the same.

This PR adjusts the next link parsing to relativize compared to a base
url.
2025-03-25 15:05:37 +01:00
Alex Szabo
7120074ec3
[ci] More info to test annotation failure logging (#215515)
## Summary
While annotating test failures, we're seeing increased amount of errors
like this:
```
2025-03-21 13:52:32 INFO   Artifact uploads completed successfully
--
  | Annotate test failures error Request failed with status code 404
  | HTTP Error Response Status 404
  | HTTP Error Response Body { message: 'Not Found' }
  | user command error: exit status 10
```

It would be nicer to show a bit more from the error to help debugging.
2025-03-24 19:01:32 +01:00
Gerard Soldevila
366a0da35c
Fix plugin-list script (#215648)
## Summary

A [recent PR](https://github.com/elastic/kibana/pull/212558/files) (3
weeks ago) migrated docs under `/docs` folder, from `.asciidoc` to
`.md`.

Unfortunately, some of these docs (well, at least one) were generated
automatically using a script:

`node scripts/build_plugin_list_docs.js` was updating the
`docs/developer/plugin-list.asciidoc`

As a result of the migration:

The CI pipeline step fails, and the list of plugins is no longer
updated.
Besides:
* The https://www.elastic.co/guide/en/kibana/current/plugin-list.html is
currently broken.
* This page is (or should be) built from
https://github.com/elastic/kibana/blob/main/docs/extend/plugin-list.md,
which is also broken.

They are broken cause some plugins' descriptions use the pipe `|`
character, which breaks the Markdown layout.

This PR updates the logic that generates the plugin-list, switching from
`.asciidoc` to `.md`, and escaping `\n` and `|` characters to allow for
better descriptions.
2025-03-24 15:53:17 +02:00
Alex Szabo
415d672d31
[ci] Flaky test runner respect labels (#215167)
## Summary
Extracts `collectEnvFromLabels` to a separate module, so it can be used
in the flaky test runner. With this, the label `ci:use-chrome-beta` will
be passed along to the flaky test runner, allowing for flaky testing on
chrome beta.

Other labels we treat as modifiers for PR behavior through setting env
variables should also be added to this set of mapping.
2025-03-24 12:01:06 +01:00
Alex Szabo
621aa5e782
Revert "Upgrade axios 1.8.3 in buildkite (#215203)" (#215530)
This reverts commit d8f6bd694b.

## Summary

Since this upgrade, we're getting 404 on failed test annotation.
Reverting this while we figure out what's causing it.
2025-03-21 17:09:02 +01:00
Jeramy Soucy
605651259e
[FIPS] Skip basic license cases list view test for FIPS pipeline (#215182)
## Summary

Skips the basic license cases list view test since it is expecting the
cases list to not to be present for a basic/essentials tier license, but
the FIPS pipeline always runs with a platinum license override.
2025-03-21 15:57:44 +02:00
Gloria Hornero
d5a0501fb8
initial @kbn/scout-security plugin (#210433)
## Summary

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

In this PR we are adding the initial structure for the
@kibana/scout-security package, note that this is not ready to be used
and any new test using this package, is not going to be executed as part
of the regular pipelines, meaning, you are not going to add coverage to
the application.


@kibana/scout-security package is a test package that extends @kbn/scout
with test helpers specifically designed to test Security Solution
functionalities in Kibana. All tests under Security plugins should only
import from @kbn/scout-security, not from @kbn/scout.



This PR is a POC to start testing development by providing custom
Playwright fixtures, page objects, and utilities tailored for
Security-related testing scenarios.

Things to follow-up:



- CustomQueryRule interface is already declared in
`x-pack/solutions/security/plugins/security_solution/common/api/detection_engine/model/rule_schema/rule_schemas.gen.ts`
as `QueryRuleCreateProps`

- DETECTION_ENGINE_RULES_URL and DETECTION_ENGINE_RULES_BULK_ACTION are
already declared in `@kbn/security-solution-plugin/common/constants`

It would be great if all of that is extracted from the plugin to a
package so it can be reused instead of having to duplicate the code.

Until the package is not ready to be used and has not been introduced to
the different teams, appex-qa and myself will be the owners of it to
make sure that best practices are followed

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Dzmitry Lemechko <dzmitry.lemechko@elastic.co>
2025-03-21 12:59:30 +02:00
Gloria Hornero
91cf7b4266
[Security Solution] API tests for AI4DSOC effort (#215318)
## Summary  
This PR establishes the foundation for executing API tests in the new
`search_ai_lake` tier, following the existing API integration test
structure and guidelines.

## Adding a New Test  
To add a new test, follow these guidelines:  

- Inside the `AI4DSOC` folder, create subfolders representing different
AI4DSOC functionalities.
- Each subfolder should be owned by an area team or the developers
actively working on it.
- The functionality folder must include a `search_ai_lake_tier`
subfolder.
- The `search_ai_lake_tier` subfolder should contain a `configs`
directory with a `serverless.config.ts` file that imports
`createTestConfig` from `config.base.ai4dsoc`.
- Add the test inside the `search_ai_lake_tier` subfolder.  
- Ensure the test has the `@serverless` label and uses
`supertestWithoutAuth` instead of `supertest`, as `supertest` provides
basic authentication, whereas serverless environments require API key
authentication. See the `dummy_test.ts` for reference.
- The `search_ai_lake_tier` folder should have an `index.ts` file
referencing the tests to be executed, as demonstrated in this PR.
- Update the
`x-pack/test/security_solution_api_integration/package.json` file with
the necessary scripts to enable test execution locally.
- When adding a new `serverless.config.ts` file, ensure it is included
in `.buildkite/ftr_security_serverless_configs.yml`. Otherwise, the new
test(s) will not be executed as part of the PR process.

## Running Tests Locally  
Execute the tests using the following Yarn scripts from
`x-pack/test/security_solution_api_integration`:

1. Start the server with the required configuration:  
   ```sh
   yarn ai4dsoc_cases:server:serverless
   ```
2. Run the tests using the started server:
  ```sh
  yarn ai4dsoc_cases🏃serverless
  ```
  
## Key Considerations
- `Supertest` should not be used, as it provides basic authentication.
Instead, use supertestWithoutAuth for API key authentication.
- All tests must include the `@serverless` label.
- MKI is not yet supported for test execution.
- Temporary Ownership: The Security Engineering Productivity team will
initially own the AI4DSOC testing folder to ensure proper structure and
best practices. Once teams are familiar with the workflow, this
ownership will be removed.
   
## Security Engineering Productivity Code Ownership Responsibilities
The Security Engineering Productivity team should ensure:

- All tests are placed inside a functionality-specific subfolder.
- Each functionality subfolder has designated code owners.
- Tests include the `@serverless` label.
- `Supertest` is not used.
- The correct configuration is applied.
- Scripts are added to enable local execution.
- New configurations are added to
`.buildkite/ftr_security_serverless_configs.yml`.

## Follow-Up tasks
- Remove the existing dummy test.
- Integrate tests into the periodic pipeline.
- Add tests to the Kibana QA quality gate.
2025-03-20 21:11:04 +02:00
Alex Szabo
d8f6bd694b
Upgrade axios 1.8.3 in buildkite (#215203)
## Summary
Upgrade `axios` to 1.8.3 in Kibana's `.buildkite` subproject; disallow
absolute URLs in axios clients.
2025-03-20 10:58:41 +01:00
Gerard Soldevila
adb4bdf8d8
SKA: Extract list of Kibana solutions into a dedicated package (#213353)
## Summary

The intent is to have a centralised place to store the list of Kibana
solutions and serverless project types.
To that end, this PR creates a `@kbn/projects-solutions-groups` package.
It also adds the new solution type `'chat'`.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2025-03-20 10:20:07 +01:00
Drew Tate
4e03cf0d97
[ES|QL] Fix grammar sync (#215230)
## Summary

I wasn't copying the lib files right. 😞 

Successful run:
https://buildkite.com/elastic/kibana-es-ql-grammar-sync/builds/118#0195af98-3e96-4ef4-8417-7b8391ca5396
2025-03-20 08:36:48 +01:00
Gloria Hornero
c6b594cfee
[Security Solution] Enable Cypress Tests for AI4DSOC effort (#214776)
## Summary  
This PR establishes the baseline to execute Cypress tests in the new
`search_ai_lake` tier.

## Changes Introduced  
- All tests under
`x-pack/test/security_solution_cypress/cypress/e2e/ai4dsoc` will be
executed using the new tier by default.
- These tests will run as part of the PR process within the `Serverless
AI4DSOC - Security Solution Cypress Tests` execution.

## Adding a New Test  
To add a new test, follow these guidelines:  

- Read the
[README](x-pack/test/security_solution_cypress/cypress/e2e/ai4dsoc/README.md).
- Inside the `AI4DSOC` folder, we should have different subfolders
representing the various AI4DSOC functionalities.
- Each subfolder should have ownership by either an area team or the
developers actively working on it.
- Make sure that any functionality you want to be tested in the new tier
is added inside the `AI4DSOC` folder; otherwise, that functionality will
be tested using the complete tier.

## Running Tests Locally  
Run the tests with the following Yarn scripts from
`x-pack/test/security_solution_cypress`:

```sh
yarn cypress:open:ai4dsoc:serverless
```

Opens the Cypress UI with all tests in the `e2e/ai4dsoc` directory. This
also runs a mocked serverless environment using the `ai_soc` product
line and `search_ai_lake` tier by default.

```sh
yarn cypress:run:ai4dsoc:serverless
```

Runs all tests tagged as @serverless in the e2e/ai4dsoc directory in
headless mode using the ai_soc product line and search_ai_lake tier by
default.

## Key Considerations  
- All tests must have the `@serverless` tag to be executed as part of
the PR process.
- MKI is not yet supported for test execution.  
- The AI4DSOC Cypress tests will be executed each time there is a change
in one of its
[dependencies](https://github.com/elastic/kibana/blob/main/.buildkite/scripts/pipelines/pull_request/pipeline.ts).
- All tests are executed by default using the `platform_engineer` role.
- Temporary Ownership: The Security Engineering Productivity team will
own the entire AI4DSOC testing folder initially to ensure structure and
best practices. Once all teams understand the workflow, this ownership
will be removed.
- Execution Time: If test execution in a PR takes more than 45 minutes,
parallelism should be increased in the new
`.buildkite/pipelines/pull_request/security_solution/ai4dsoc.yml` file.

## Security Engineering Productivity Codeownership Responsibilities  
The Security Engineering Productivity team should ensure:  

- Best practices are followed.  
- All tests are placed inside a functionality subfolder.  
- Each functionality subfolder has designated code owners.  
- Tests include the `@serverless` label.  
- The execution of AI4DSOC tests does not exceed 45 minutes.    

## Follow-Up Tasks 
- Remove the dummy test (@tomsonpl feel free to delete it when you need
to add new tests to the navigation).
- Integrate tests into the periodic pipeline.  
- Add tests to the Kibana QA quality gate.  
- Update the README with MKI instructions once tests are added to the
periodic pipeline and Kibana QA quality gate.
- Clarify which roles will be used for the AI4DSOC effort and update the
tests accordingly.
2025-03-19 10:50:07 +01:00
Jon
ca04dbafd2
[package testing] Skip FTR (#215070)
The functional test run during package testing is currently erroring
post folder migration, but after fixing the path it's still not going to
match on any tests.

This temporarily disables the step while alternatives are considered.

Related to https://github.com/elastic/kibana/pull/214730 and
https://github.com/elastic/kibana/pull/210956
2025-03-18 16:33:50 -05:00
Dzmitry Lemechko
05447fe978
[scout] extend config-discovery with CI validator (#214403)
## Summary

More teams are adding Scout tests in their plugins, often as a PoC and
not stable yet for continuous execution.
We don't want to block it, but need a way to manage the scope of Scout
pipeline and be able to disable it quickly to unblock the Scout
development.

Since Scout is in active development and we need it to be simple and
quick as possible (we can iterate and improve later), we agreed with
Robert to disable tests by plugin:

```
ui_tests:
  enabled:
    - apm
    - discover_enhanced
    - maps
    - observability_onboarding
  disabled:
    - *skipped_plugin*
```

When scout configuration is added to the new plugin, it will require to
update `.buildkite/scout_ci_config.yml` that is owned by `appex-qa`
team. If there is no intention to run Scout tests on CI, plugin name
should be added under `disabled` section.

**How to test locally:**

- Scout tests were added in `observability_onboarding` plugin, pipeline
will throw error

modify locally `.buildkite/scout_ci_config.yml`
```
ui_tests:
  enabled:
    - apm
    - discover_enhanced
    - maps
  disabled:
```

run `node scripts/scout discover-playwright-configs --validate --save`

```
ERROR The following plugins are not registered in Scout CI config '.buildkite/scout_ci_config.yml'
      - observability_onboarding
```

~~On CI annotation will be added to clarify the failure:~~

we decided to move validation to "Quick Checks", no need to annotate.

<img width="1583" alt="image"
src="https://github.com/user-attachments/assets/ed6b5778-74cb-4473-8218-b96239aab067"
/>


- `observability_onboarding` plugin is disabled, pipeline won't include
it (excluded in `scout_playwright_configs.json`)

modify locally `.buildkite/scout_ci_config.yml`
```
ui_tests:
  enabled:
    - apm
    - discover_enhanced
    - maps
  disabled:
   - observability_onboarding
```

run `node scripts/scout discover-playwright-configs --validate --save`

```
 warn The following plugins are disabled in '.buildkite/scout_ci_config.yml' and will be excluded from CI run
      - observability_onboarding
 info Found Playwright config files in '4' plugins.
      Saved '3' plugins to '/Users/dmle/github/kibana/.scout/test_configs/scout_playwright_configs.json'
```
2025-03-18 21:24:54 +01:00
Kibana Machine
681295ff9e
[ES|QL] Update grammars (#213006)
This PR updates the ES|QL grammars (lexer and parser) to match the
latest version in Elasticsearch.

---------

Co-authored-by: drewdaemon <drew.tate@elastic.co>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: Stratoula Kalafateli <efstratia.kalafateli@elastic.co>
2025-03-18 21:25:57 +02:00
Ellie
23bc38679b
Update kibana-chrome-forward-testing.yml (#214961)
Fix format (see
[error](https://buildkite.com/elastic/detect-invalid-rre-pipeline/builds/684#0195a90e-29c0-42bc-a2f8-39febedf462c/83-177))
2025-03-18 13:02:41 +01:00
Alex Szabo
1c6f8bed0b
[ci] Disable chrome forward testing until 2025-03-28 (#214947)
## Summary
The chrome forward-testing pipeline highlights upcoming errors in next
chrome versions:
https://buildkite.com/elastic/kibana-chrome-forward-testing

It's currently broken since chrome-beta was updated to 135. Chrome 135
will drop to main line on [April 1st.
](https://chromiumdash.appspot.com/schedule)

Revert this by 2025-03-28, or if
https://github.com/elastic/kibana/issues/213919 is finished.
2025-03-18 11:59:18 +01:00
Alex Szabo
8f0cd7366d
update package testing script after /test was moved to src/platform/test (#214730)
## Summary
After https://github.com/elastic/kibana/pull/210956 - the artifact
snapshot testing code is broken because a path reference wasn't updated.
This PR updates that.

Fixes:
https://buildkite.com/elastic/kibana-artifacts-snapshot/builds/5745

The checks started
(https://buildkite.com/elastic/kibana-artifacts-snapshot/builds/5764)
but it failed for a different reason. Probably some real errors?
2025-03-17 17:27:47 +01: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
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
Shahzad
005124a9ed
[Synthetics] Fix broken tests !! (#214357)
## Summary

Fix broken tests !!

These got broken due to changes on alerts overview page, i am also
expanding the scope to run on all observability plugin changes !!
2025-03-13 15:11:32 +01:00
Joe Reuter
4681b6c562
🌊 Streams: Prepare API for publishing (#213127)
Add streams API to documentation as an experimental feature

<img width="2555" alt="Screenshot 2025-03-07 at 11 44 54"
src="https://github.com/user-attachments/assets/f54e5e6e-0c20-4bad-9cff-27747d0f76e2"
/>

There are a couple of changes in here:
* Split streams API in internal and public and mark the public parts as
experimental
* Add the public parts to the Kibana documentation
* Add description and summary
* Adjust the server repository wrapper to pass through summary and
description

# To test

* Generate OAS bundle: `node scripts/capture_oas_snapshot --include-path
/api/streams --update`
* Apply overlays `cd oas_docs && make api-docs`
* Make sure bump.sh is installed (`npm install -g bump-cli`)
* Run for preview: `cd oas_docs && bump preview output/kibana.yaml`

# Open questions

* Does the split into public and internal make sense?
* Is it a problem if this is visible in the user-facing documentation
page before we actually release streams? Or would it be OK if the API is
marked as experimental? (mostly a question for @LucaWintergerst )

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2025-03-13 13:41:05 +00:00
Shahzad
82a6be9016
[SLOs] Fix path for slo e2e test scope !! (#214137)
## Summary

Since observability plugins have been moved, needed to fix the path to
scope tests !!
2025-03-12 16:52:42 +01:00
Dzmitry Lemechko
36c3409a67
[ci] remove diskSize definition in scout_tests.yml (#214122)
## Summary

Trying to fix pipeline failure due to not enough disk space:

```

  | 2025-03-12 10:47:33 UTC | Copying cached snapshots from /opt/buildkite-agent/.es-snapshot-cache/cache to .es/cache
  | 2025-03-12 10:47:48 UTC | cp: error writing '.es/cache/elasticsearch-9.0.0-SNAPSHOT-linux-x86_64.tar.gz': No space left on device
  | 2025-03-12 10:47:48 UTC | cp: error writing '.es/cache/elasticsearch-9.0.0-SNAPSHOT-linux-x86_64.tar.gz.meta': No space left on device
  | 2025-03-12 10:47:48 UTC | cp: error writing '.es/cache/elasticsearch-9.1.0-SNAPSHOT-linux-x86_64.tar.gz': No space left on device
  | 2025-03-12 10:47:48 UTC | cp: error writing '.es/cache/elasticsearch-9.1.0-SNAPSHOT-linux-x86_64.tar.gz.meta': No space left on device
```
2025-03-12 13:53:01 +01:00
Achyut Jhunjhunwala
591c5b73c0
[Discover] Added context aware logic for logs view in discover to show Load More… (#211176)
## Summary

Closes - https://github.com/elastic/kibana/issues/166679

## What's included ?

- The PR adds a feature in Logs View of Observability (to start with) to
hide the regular pagination toolbar from the footer and show Load More
only when the user has scrolled to the bottom of the page.
- The table would always load the items in batches of default set 500 
- This PR also add 2 helper functions `useThrottleFn` and
`useDebounceFn`. Current React help library which KIbana uses called
-`react-use` does not have these and we cannot use Lodash variant of
these. We need such hooks which are React safe. Hence added these 2


## What's pending ?

- [x] Unit tests for the 2 new helper React hooks
- [x] Unit tests for data table footer component
- [x] Unit tests for Profile Resolution
- [x] Functional Serverless Tests
- [x] Functional Stateful Tests


![Feb-14-2025
15-25-18](https://github.com/user-attachments/assets/fa66de6e-b3bd-46b4-a0ed-e30c4209a695)

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Davis McPhee <davismcphee@hotmail.com>
Co-authored-by: Felix Stürmer <weltenwort@users.noreply.github.com>
Co-authored-by: Davis McPhee <davis.mcphee@elastic.co>
2025-03-12 13:39:27 +01:00
Dzmitry Lemechko
2eb9dcdd68
[ci] use default worker in on-merge-unsupported-ftrs scout step (#213993)
## Summary

related to https://github.com/elastic/kibana/pull/211797

Fixing bootstrap failure in
https://buildkite.com/elastic/kibana-on-merge-unsupported-ftrs/builds/34167

```
yarn install and bootstrap, attempt 2
2025-03-11 18:13:27 UTC	yarn run v1.22.22
2025-03-11 18:13:27 UTC	$ node scripts/kbn bootstrap --force-install
2025-03-11 18:13:27 UTC	Kibana should not be run as root.  Use --allow-root to continue.
2025-03-11 18:13:27 UTC	error Command failed with exit code 1.
2025-03-11 18:13:27 UTC	info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
2025-03-11 18:13:28 UTC	🚨 Error: The command exited with status 1
```
2025-03-12 01:24:08 +01:00
Maxim Palenov
f7d4f19096
[Security Solution] Enable prebuilt rules customization feature flag (#212761)
**Addresses:** https://github.com/elastic/kibana/issues/180267

## Summary

This PR enables `prebuiltRulesCustomizationEnabled` feature flag.

## Details

Besides simply enabling `prebuiltRulesCustomizationEnabled` feature flag the following required changes were done

- failed tests due enabling the FF were fixed
- FF setting was removed from test configurations (integrations and Cypress tests)
- FF logic was removed from the codebase. Disabling the FF would require roll back test changes as well. So just in case we have to disable the FF it's simpler to roll back the PR's commit.
2025-03-11 22:45:49 +01:00
Dzmitry Lemechko
697d604870
[scout] add dynamic ci pipeline to run tests (#211797)
## Summary

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

This PR improves the way we run scout tests by discovering all the
plugins that have the scout tests and run tests in multiple workers:

<img width="1586" alt="image"
src="https://github.com/user-attachments/assets/4936ab50-fefb-470c-af3a-21263b58143f"
/>

How it works:

1. Run search script to find _all existing_ scout playwright config
files across kibana repo
2. Save results into `.scout/scout_playwright_configs.json` file, that
will be used as source to run configs in individual jobs per plugin.
Upload it as BK artifact.
3. Spin up job for each plugin mentioned in
`scout_playwright_configs.json`
4. In each individual job use `scout_playwright_configs.json` and get
configs for specific plugin, use worker with 8 vcpus where tests are run
in parallel (`usesParallelWorkers` prop)
While running configs 1 by 1 collect command exit code with the
following rules:
- configs run passed => exit code `0` , final status remains `0`
- config has no tests => exit code `2`, put config name into
`configsWithoutTests` group to push BK annotation later, change exit
status to `0` - we accept configs without tests at current stage
- config run fails => exit code `1`, final status changed to `1` and job
will fail in the end; put config name into `failedConfigs` group to push
BK annotation later

<img width="1564" alt="Screenshot 2025-02-21 at 14 34 16"
src="https://github.com/user-attachments/assets/06e9298d-466c-46bb-8e85-3d691a40850a"
/>

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2025-03-11 18:15:08 +01:00
Jon
f56e658f0b
[ci/ build_pr_and_deploy_cloud] Wait for pre-build (#210202)
before building the distribution. CI stats depends on environment setup
from the pre-build step.
2025-03-11 09:43:37 -05:00
Alex Szabo
1e1fc8011e
[CI] remove 8.15 es snapshot build schedule (#213607)
## Summary
Removes schedule that triggers daily builds on
https://buildkite.com/elastic/kibana-elasticsearch-snapshot-build (8.15
won't be released any more)
2025-03-10 10:57:54 +01:00
Alex Szabo
830dbd4ed7
[ci] Trigger VM image rebuild for cache rebuild only (#213497)
## Summary
When VM image rebuild is triggered after ES promotion, only the cache
warmup should be built.

This PR also separates the daily full build to a daily base + cache
build (in case ES promotions are failing for some reason, we should
still have a daily cache refresh).

Requires: https://github.com/elastic/ci-agent-images/pull/1295

With this, we'd run a daily base image build and cache build (~40m +
25m) + cache warmups for every promotion (~4x 25m) instead of a full
build and promotion per build (~4x 55m). Ultimately not that much of a
gain 🤷 (4*55=220m => 40+5x25=165m)
2025-03-10 10:56:15 +01:00
Nikita Indik
ebe90e5c80
[Security Solution] Allow prebuilt rules import and export (#212509)
**Resolves: https://github.com/elastic/security-team/issues/11502**
(internal)

This PR implements following changes and adds API integration tests for
them:
- [x] Users with any license can export prebuilt rules (with enabled
feature flag)
- [x] Users with Basic/Essentials license can import prebuilt rules only
if they are non-customized and the feature flag is enabled
- [x] Users with Enterprise/Complete license can import prebuilt rules
without restrictions

Flaky test runner (had to create 4 separate runs to test all configs):
-
[1](https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/7987)
-
[2](https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/7986)
-
[3](https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/7988)
-
[4](https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/7989)
2025-03-06 16:58:33 +01:00
Drew Tate
2435a17cfe
[ES|QL] pull in multi-file grammars (#212430)
## Summary

Resolve https://github.com/elastic/kibana/issues/210518

Successful grammar update PR!
https://github.com/elastic/kibana/pull/212442
2025-02-26 16:43:18 +00:00