Commit graph

578 commits

Author SHA1 Message Date
Dario Gieselaar
62c04bf977 Remove basic config 2023-07-24 09:36:32 +02:00
Dario Gieselaar
f1bf9894b5 Add API tests 2023-07-24 09:29:01 +02:00
Dario Gieselaar
739b116fa6 Add observability_ai_assistant storybook to CI step 2023-07-23 16:07:09 +02:00
Gloria Hornero
621401ed6a
[Security Solution][Serverless] Integrating Cypress with the parallel script (#162160) 2023-07-20 09:03:58 -05:00
Tiago Costa
dde020e611
chore(NA): use a n2-8-spot instance to build storybooks (#162200)
Lately the build storybooks ci step is getting closer to 60 minutes
running time. For now, instead of splitting the job into multiple ones,
I think we can go with a bigger machine.
2023-07-20 09:45:56 +02:00
Juan Pablo Djeredjian
887b3bde05
[Security Solution] Extend Prebuilt rules install and update workflow test coverage (#161687)
## Summary

- Implement test plan as described in
`x-pack/plugins/security_solution/docs/testing/test_plans/detection_response/prebuilt_rules/installation_and_upgrade.md`

### For maintainers

- [ ] This was checked for breaking API changes and was [labeled
appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-07-19 17:53:15 +02:00
Stavros Kroustouris
a980eda198
add quotes in yaml to ensure commit has integrity (#161934)
## Summary

We received an alert on GPCTL that a kibana commit (9509425349) did
not exist, because it was being parsed as e4 (scientific representation)
which is not what we want 😅

So, in this PR i am making sure the hash is not being parsed in any
funny way.

Relevant slack thread:
https://elastic.slack.com/archives/C03PAKL2KLK/p1689264633036939
2023-07-14 23:09:00 +02:00
Jon
9ab807796c
[ci] Add support for label ci:build-serverless-image (#161583)
Adding the label `ci:build-serverless-image` will build and push the
serverless image to our registry. The url will be available as an
annotation at the top of Buildkite

Closes https://github.com/elastic/kibana/issues/161562
2023-07-11 07:58:24 -07:00
Patryk Kopyciński
ba539d7a39
[Defend Workflows] Use Vagrant for real agent Cypress e2e (#160050)
## Summary

Run Real Endpoint Cypress E2E on CI using Vagrant

---------

Co-authored-by: Tomasz Ciecierski <ciecierskitomek@gmail.com>
Co-authored-by: Ashokaditya <am.struktr@gmail.com>
2023-07-11 03:02:51 -07:00
Katerina Patticha
8e80f192e3
Cypress for observability serverless (#160674)
Created a separated PR in order setup a basic setup for cypress and test
https://github.com/elastic/kibana/pull/160620 for serverless.


 Basic setup to run cypress for serverless-oblt

#### How to  run it 

from
`x-pack/test_serverless/functional/test_suites/observability/cypress`
```
yarn cypress:serverless:open
```


![image](8ba7dd80-a9a4-4777-898b-4d9f39bee118)
2023-07-11 09:43:06 +02:00
Katerina Patticha
bfaf5e063f
[APM] Run cypress record on merge (#161068)
## Summary

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

Run cypress record on merge when `Team:APM` label in applied

I need to run `add_gh_labels_to_bk_metadata` script because labels are
not available on merge pipeline.


Tested here:
https://buildkite.com/elastic/kibana-pull-request/builds/141233#01893fd7-e2f9-432b-86a3-f80515f343c4
2023-07-10 21:32:04 +02:00
Stavros Kroustouris
bf148fb35f
[TLS-446] Remove old pipeline; new one handles all envs (#161459)
## Summary

All environments are handled by the gpctl pipeline for kibana, once
elastic/serverless-gitops#340 gets merged.
2023-07-10 10:06:07 -05:00
Xavier Mouligneau
bed184b829
[RAM] Alert table all column fix 2 (#161054)
https://github.com/elastic/kibana/pull/160455

---------

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2023-07-07 09:57:22 -06:00
Stavros Kroustouris
3cfbf24190
Revert "Revert "[TLS-446] Update pipeline to use gpctl"" (#161452)
Reverts elastic/kibana#160900 to re-enable the pipeline that updates the
version on the single tenant service, we have checked everything, no
dying pods anymore, since we have changed the functionality to avoid
cloning kibana 😬
2023-07-07 14:29:18 +02:00
Charlie Pichette
2049683cf0
Add Cypress tests to Security Solution Serverless (#161264)
## Summary

Add the Security Solutions serverless Cypress tests to the Buildkite job
for the Security Solution serverless environment.
2023-07-05 10:43:05 -07:00
Jatin Kathuria
54e613b1d9
[Security Solution][Fix] Alert Page Filter Controls should not ignore Invalid Selections (#160374)
This PR changes how Alert Page Filter Controls Work. 

## Before

1. Filter Controls use to ignore invalid Selections. For example, if
User has selected `Open` as the filter, but there is actually no alert
with Status `Open`, filters would ignore that selection and would
proceed to show other alerts ( which are NOT `Open`) .

- It seemed it was confusing users. [This
bug](https://github.com/elastic/kibana/issues/159606) and [messages in
community
slack](https://elasticstack.slack.com/archives/CNRTGB9A4/p1686937708085629?thread_ts=1686841414.978319&cid=CNRTGB9A4)
are the examples. @paulewing also emphasized this.

   - Below video shows what I mean.
  

01771587-e4e8-4331-9535-4ffa09877c02






## After

1. With this Change Control Filters no longer ignore invalid selection.
So if user has chosen to show only `Open` Alerts. Then that filter will
be taken into account even though no alert with `Open` exists and a
empty table will be show.

    - Here is a video to demonstrate it.
       

62b17762-16c0-471f-8480-e9f46e2ca5ef
2023-07-04 05:13:54 -07:00
Juan Pablo Djeredjian
d6d4c6495f
[Security Solution] Expand prebuilt rules install/update workflow test coverage (#155241)
## Summary

Extends test coverage for the current Prebuilt Rules installation and
update workflows, in the Rules Management area.

Follows the test plan:
https://docs.google.com/document/d/1d_1DYnHlnCaPznWTjeCxhoaRUwxc2O_V0LToAPG0xLE/edit#heading=h.y4vywfmfu3ef

Other changes besides the new tests:
- Integration tests related to prebuilt rules were moved to a new
`prebuilt_rules` dir from their old `group1` dir.
- Existing Cypress tests related to prebuilt rules were renamed to
`prebuilt_rules_management.cy.ts` to differentiate those tests to the
new tests related to notifications, installation and updates.
- Prevented the installation of the +700 prebuilt rules in test suites
where it is not necessary. Replaced that with installing a low number of
mock prebuilt rules, which enables to test the same functionality.
- Unskipping tests in
[rules_selection.cy.ts](3d146298a4/x-pack/plugins/security_solution/cypress/e2e/detection_rules/rules_selection.cy.ts (L34)).
See
[explanation](https://github.com/elastic/kibana/issues/154694#issuecomment-1607265120).



### 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: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-07-03 19:22:40 +02:00
Robert Oskamp
09df093735
[ftr/test_serverless] Remove common tests from serverless pipeline (#161065)
This PR removes the common tests from the serverless buildkite pipeline.
2023-07-03 12:13:56 +02:00
Walter Rafelsberger
a8e07e8709
[ML] Transforms: Add performance journey for transform wizard source index loading. (#160837)
Add a performance journey for transform wizard source index loading.
2023-06-30 13:03:22 +02:00
Ignacio Rivas
ec620e7fb3
[Deployment Management] Add cards navigation in management landing page for serverless (#160096) 2023-06-30 11:27:56 +02:00
Robert Oskamp
0a48cf26c2
[ftr/test_serverless] Run common tests as part of each project (#160783)
## Summary

This PR removes standalone `common` serverless tests and instead makes
them run as part of every serverless project's tests.

### Details

Before, the `common` tests ran on a "vanilla" Kibana serverless mode
(i.e. the `serverless` plugin was loaded but none of the
`serverless-PROJECT` plugins). With continued serverless development,
this state of Kibana doesn't work as expected anymore and since this is
not supported officially anyway, it's not worth to invest making it work
properly. So we decided to accept the extra test run time and actually
include `common` tests in every project.
2023-06-30 10:49:56 +02:00
Stavros Kroustouris
f8f712e855
Revert "[TLS-446] Update pipeline to use gpctl" (#160900)
Reverts elastic/kibana#160508 gpctl clones the repo to verify the
commit, but since cloning kibana is not trivial, ill revert for now,
until we find a better way to handle the above on gpctl.
2023-06-29 09:21:24 -07:00
Stavros Kroustouris
9b72dbb439
[TLS-446] Update pipeline to use gpctl (#160508)
## Summary
This PR enables gpctl for kibana with the config definition on
serverless gitops:
https://github.com/elastic/serverless-gitops/blob/main/gen/gpctl/kibana/config.yaml

This will enable treating kibana as a service and not as a stack
component, but this will only happen on dev and only after merging:
https://github.com/elastic/serverless-gitops/pull/306

So practically for now nothing else changes. We just need the extra step
to onboard the new worfklow. Another PR will succeed this one after
verifying that everything works as expected, that will remove the
existing (legacy) step that is using a bash script instead of gpctl for
QA and Staging.
2023-06-29 10:30:44 +02:00
Dzmitry Lemechko
51fb80a226
[ftr] split dashboard/group2/config into 2 configs (#160612)
## Summary

Splitting `test/functional/apps/dashboard/group2/config.ts` as it
getting close to 35 minutes and quite often run on its own on CI worker.

<img width="1713" alt="image"
src="ac7f5dc6-2a12-4057-af98-81ff53bac1c4">`

This PR splits config into 2 almost run time equal groups:

- test/functional/apps/dashboard/group2/config.ts 18m 31s
- test/functional/apps/dashboard/group6/config.ts 16m 53s

Flaky-test-runner for both configs:
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/2522
2023-06-28 18:27:24 +02:00
Dzmitry Lemechko
599bbacab0
[ftr] split dashboard_elements/config to speedup CI run (#160550)
## Summary

Splitting FTR config as it consistently takes over 37 minutes to run.

This PR splits it into 5 smaller configs:

- test/functional/apps/dashboard_elements/controls/common/config.ts 15m
24s
-
test/functional/apps/dashboard_elements/controls/options_list/config.ts
17m 38s
- test/functional/apps/dashboard_elements/image_embeddable/config.ts 2m
14s
- test/functional/apps/dashboard_elements/input_control_vis/config.ts 4m
41s
- test/functional/apps/dashboard_elements/markdown/config.ts 1m 24s
2023-06-28 17:00:34 +02:00
Marco Antonio Ghiani
6a0d6deaa6
[Logs+] Implement Logs Dataset selector (#159907)
## 📓  Summary

Closes https://github.com/elastic/observability-dev/issues/2655

This PR introduces a customized log consumption experience in the
Discover plugin. By leveraging the new `discover_log_explorer` plugin
and utilizing the `discover.customize` functionality, we have curated a
more tailored user experience.

The key feature of this implementation is the `DatasetSelector`
component, which replaces the original Discover `DataViewPicker`. It
handles the retrieval, rendering, and navigation of integrations and
data streams related to logs, providing an improved user interface.

This PR involves significant development efforts, including the creation
of the `discover_log_explorer` plugin, implementation of services, state
machines, custom hooks, and enhancements to presentational components.
The following overview will help reviewers understand the
responsibilities of each component in this implementation.


d725b699-452e-4718-8189-8dc1fab4d044

## DatasetsService & DatasetsClient

The DatasetsService is introduced, a crucial component that mediates
access to the newly implemented DatasetsClient. During the plugin's
lifecycle, the DatasetsService exposes a client property through its
start() method, providing convenient access to a DatasetsClient
instance.

The DatasetsClient is responsible for abstracting the data fetching
process for two endpoints: the integrations endpoint and the data
streams listing endpoint. These endpoints are utilized to populate the
selector options in the user interface. To facilitate this, the
DatasetsClient exposes the findIntegrations and findDatasets methods,
which handle the respective data fetching.

## Discover Customization

The critical part of this work consists of where the customization is
applied.
Inside the `public/plugin.tsx`, we lazy load and create, injecting the
required dependencies, the `CustomDatasetSelector`, which already
encapsulates all the logic required to make the selector work with the
external APIs.
We kept separating the data fetching logic from how the selector works,
and all the data and events are passed into the UI component with
properties.

```ts
discover.customize(
  DISCOVER_LOG_EXPLORER_PROFILE_ID,
  ({ customizations, stateContainer }) => {

    customizations.set({
      id: 'search_bar',
      CustomDataViewPicker: createLazyCustomDatasetSelector({
        datasetsClient: datasetsService.client,
        stateContainer,
      }),
    });
    ...
```

## Data fetching state machines & custom hooks

To handle the data fetching of integrations and unmanaged data streams,
we created two different state machines to separately handle the related
action for each dataset, such as remote search, in-memory search, error
handling etc.

### Integration machine and useIntegrations

The integrations state machine handles automatic data fetching of the
resources and additionally provides transitions for loading more
integrations, searching integrations by HTTP request, searching locally
into integration streams, and all the related loading and error handling
states.

It is then interpreted inside the `useIntegrations` custom hook, which
exposes the fetched data and handlers for all the above-mentioned
actions.

<img width="1975" alt="Screenshot 2023-05-30 at 09 44 42"
src="6daeca9f-826d-4a0f-bd90-eb4826ed1bde">


### Datasets machine and useDatasets

Similar to the integrations state machine, but simplified since the data
streams search can only happen with HTTP requests and there is no
pagination that requires to handle the load of more entries.

It is interpreted inside the `useDatasets` custom hook, which also
exposes the fetched data and handlers for the available actions.

<img width="1692" alt="Screenshot 2023-05-30 at 09 45 11"
src="5f9690e2-4e8f-439e-9ffd-f3b34cf3eaf5">

## DatasetSelector

The `DatasetSelector` component contains all the logic that manages the
navigation and searches across the different panels that render
integrations, integrations' streams or unmanaged streams.
As the datasets come from different APIs or are performed in-memory, the
search work follow this logic:
- When listing the integrations list (first level of the
`EuiContextMenu`), the search is done with an HTTP request.
- When listing the data streams list for a specific integration (second
level of the `EuiContextMenu`), the search is done in-memory, filtering
and sorting directly in the client.
- When listing the unmanaged data streams list (second level of the
`EuiContextMenu`), the search is done again with an HTTP request.

To handle these possible user journeys correctly without side effects,
we created another state machine and exposed its actions with an
internal `useDatasetSelector` custom hook.

<img width="1978" alt="Screenshot 2023-05-30 at 09 46 04"
src="84aa4247-c65d-40de-9eb6-6117bee731f8">

## Next steps

This component will change quite a lot until we won't get to a final
design. As soon as a first solid mvp is defined for production, a
complete test for the component will be implemented, among with a more
generic functional test for the core customization features.

---------

Co-authored-by: Marco Antonio Ghiani <marcoantonio.ghiani@elastic.co>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Stratoula Kalafateli <efstratia.kalafateli@elastic.co>
Co-authored-by: Felix Stürmer <weltenwort@users.noreply.github.com>
2023-06-28 15:20:44 +02:00
Pierre Gayvallet
7fb8f6be8d
[stats] fix error when requesting extended stats by unauth users (#160520)
## Summary

Fix https://github.com/elastic/kibana/issues/160385

Use the internal client instead of the scoped one for the extended stats
ES requests to avoid an error with unauthenticated users (when anonymous
access is allowed)

---------

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2023-06-27 02:01:55 -07:00
Sergi Massaneda
a3a3dbbe4a
[Security Solution] Add packages storybook to CI (#160501)
## Summary

Adds the `security_solution_package` alias to the CI storybook list.
It was already added to the Storybook aliases:


423ea73504/src/dev/storybook/aliases.ts (L50)
2023-06-27 01:55:47 +01:00
Shahzad
1ca19ce2c7
[Synthetics/Uptime] Better code separation (#160245)
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-06-26 17:47:04 +02:00
Yngrid Coello
39ddf4d96b
[Logs Onboarding] Added api integration tests (#160165)
Relates to https://github.com/elastic/kibana/issues/159451.


This PR adds api integration tests to:

- [x] GET /internal/observability_onboarding/custom_logs/privileges
- [x] GET
/internal/observability_onboarding/custom_logs/install_shipper_setup
- [x] POST /internal/observability_onboarding/custom_logs/save

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-06-26 12:55:51 +02:00
Cauê Marcondes
4ddb96f9e3
[Profiling] creating API tests (#159984)
As part of the actions for making Profiling production ready, this PR
adds basic API tests on the Profiling APIs checking if only users with
`access:profiling` are allowed to call our APIs, other users must be
forbidden.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-06-24 09:47:28 +01:00
Alex Szabo
7c170bc0f8
fix: partial matching on suite name found incorrect group names (#160264)
## Summary
Context: https://elastic.slack.com/archives/C0D8P2XK5/p1687424169737829
The flaky test runner was displaying incorrect name on the tasks on
Buildkite.

The reason was a partial match (cypress/security_solution_investigations
"includes" `security_solution`), now changed to a full match on the
keys.
2023-06-23 00:30:45 +02:00
Patryk Kopyciński
9c70d9737e
[Osquery] Update Cypress tests (#159889)
## Summary

Update Osquery tests to changes done in
https://github.com/elastic/kibana/pull/159733
Add Osquery Cypress to `on_merge_unsupported_ftrs.yml` to get
notifications once tests are failing

---------

Co-authored-by: Tomasz Ciecierski <ciecierskitomek@gmail.com>
Co-authored-by: Tomasz Ciecierski <tomasz.ciecierski@elastic.co>
2023-06-20 16:18:29 +02:00
Pierre Gayvallet
9e0c9a7ad5
/api/status - always return a consistent status code (#159768)
## Summary

Fix https://github.com/elastic/kibana/issues/158910

Changes the behavior of the `/api/status` endpoint to always returns a
consistent http status code, and in particular:
- during the preboot stage 
- when accessed by unauthenticated users and `status.allowAnonymous` is
`false`.

That way, `/api/status` can properly be used for readiness checks. 

Please refer to https://github.com/elastic/kibana/issues/158910 for more
details.

---------

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2023-06-20 02:06:40 -07:00
Robert Austin
048bbb5421
[Security Solution] Create new explore team cypress config (#158747)
## Summary

[This PR copies off of this one which adds a config for Investigations,
but instead adds one for
Explore.](https://github.com/elastic/kibana/pull/158236)

In this PR following this issue:
https://github.com/elastic/kibana/issues/153661 we are creating a
Cypress execution just for the `Explore` team. That would help the teams
to improve their ownership of the tests.

- This PR moves one Explore test to the new directory. We plan to move
them all in a follow up PR.
- We are updating the codeowners file to reflect this new change.
- We are creating a new script that runs just the explore team.
- We are doing all the necessary changes to have all the tests inside
the new explore folder executed on the CI
- We are adding this new execution to the unsupported ftrs execution


### For maintainers

- [ ] This was checked for breaking API changes and was [labeled
appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-06-14 14:16:16 -07:00
Robert Austin
66323e05d8
Run Defend Workflows cypress e2e tests on the "on merge unsupported ftrs" pipeline (#159512)
## Summary

Run Defend Workflows cypress e2e tests on the "on merge unsupported
ftrs" pipeline.

These tests are failing on `main` right now, but this isn't being
reported.

### For maintainers

- [ ] This was checked for breaking API changes and was [labeled
appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
2023-06-14 15:15:20 -04:00
Jon
ddf46001e2
[ci] Run serverless test suites on merge (#158685)
After a pull request has been merged, the `kibana-on-merge` pipeline
will
trigger a new pipeline, `kibana-serverless`.  This pipeline contains our
serverless tests and will initially be non-blocking.

These tests will be merged into `kibana-on-merge` when proven stable.

https://buildkite.com/elastic/kibana-serverless
2023-06-13 11:31:46 -05:00
Jon
fa1ef3cfeb
[ci] Support for serverless ftr tests on pull requests (#159310)
Adds four pipeline steps for running serverless common, observability,
search, and security suites on pull requests.

While tests go through a stabilization period, configs will need to be
added `serverless_ftr.sh` in addition to `ftr_configs.yml`. These tests
will be allowed to fail without causing a build failure. After
stabilization and integration with the primary test pipeline, we can
revert these changes.
2023-06-13 10:20:46 -05:00
Gloria Hornero
0565bc9788
[Security Solution] [Serverless] Initial setup for security serverless Cypress (#158707) 2023-06-12 09:21:23 -07:00
Robert Austin
da1a7a38d4
[Security] Fix Cypress e2e in flaky test runner (#159297)
# Prevent Security Solution Cypress tests from parallelizing when run by
the flaky test runner

In pull request and other pipelines, the Cypress security solution
runner is expected to support parallel jobs runs. Several jobs are
spawned with the same command, but with different environment variables.
Each jobs runs a subset of the tests based on the environment variables.
These variables are BUILDKITE_PARALLEL_JOB_COUNT and
BUILDKITE_PARALLEL_JOB.

The Flaky Test Runner is an app that runs many instances of the same
config concurrently in order to determine if any of the tests in the
config are flaky. When the Flaky Test Runner runs our cypress tests,
each job should run all tests instead of a subset.

The flaky test runner sets the following environment variables to
prevent jobs from running a subset of tests:

```
 // by setting chunks vars to value 1, which means all test will run in one job
 CLI_NUMBER: 1,
 CLI_COUNT: 1,
```

These environment variables aren't respected by the Security Solution
Cypress tests. This is also true for other Cypress tests that use the
same code:
* cypress/security_solution_investigations
* cypress/osquery_cypress

This PR introduces a new environment variable: RUN_ALL_TESTS, which
explicitly tells the runner to run all tests instead of a subset. This
causes the runner to ignore BUILDKITE_PARALLEL_JOB_COUNT and
BUILDKITE_PARALLEL_JOB

### Note about other cypress tests
This environment variable will be passed to other Cypress runners that
aren't used or maintained by Security. Specifically:

* cypress/fleet_cypress
* cypress/apm_cypress

Fleet does not appear to support parallelism, while APM does. In the APM
script, a IS_FLAKY_TEST_RUNNER environment variable is created by
reading CLI_COUNT:


09902b1055/.buildkite/scripts/steps/functional/apm_cypress.sh (L13)

```
IS_FLAKY_TEST_RUNNER=${CLI_COUNT:-0}
```

The CLI_COUNT variable isnt affected by this PR, so this should still
work, but it would be possible to use the same variable for both
scripts.

### Other Ways we could do this

We could also modify the our cypress runner to respect CLI_COUNT and
CLI_NUMBER instead of the buildkite parameters. We cannot override the
buildkite parameters via the step definition as that is not supported.


### Validation

When running our Cypress tests via the test runner, it may not be
immediately apparent that there is an issue.

This PR is equivalent to main except a change to a README:
https://github.com/elastic/kibana/pull/159301

Here is a flaky test runner build using that PR. It runs 25 jobs of the
Investigation cypress e2e tests:

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

Each job should run the same tests (so we can check if they are flaky.)
However job 1 runs these:
* alert_table_action_column.cy.ts
* alerts_cell_actions.cy.ts  

<img width="747" alt="image"
src="2090cf9b-0a88-4b28-b7fa-13ce77aa26a3">

And job 2 runs these:

* building_block_alerts.cy.ts   

<img width="733" alt="image"
src="bc2f672f-ac48-4f8f-8b8b-0997c2aff874">

#### With the fix
Here is a flaky test runner build, also 25 jobs of the Investigation
cypress e2e tests, but using this PR:
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/2369

We have some failing tests, as our suite is currently flaky, however you
can see that each job runs all of the tests.

### For maintainers

- [ ] This was checked for breaking API changes and was [labeled
appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-06-12 08:36:42 +02:00
Jon
e82005e0d6
[ci/on-merge-unsupported-ftrs] Reuse the on-merge build (#159162)
Passing `KIBANA_BUILD_ID` to a triggered pipeline will let us reuse the
Kibana distribution from the parent pipeline, instead of requiring a
distribution rebuild. This will also be useful for triggering the
serverless tests in a separate pipeine.

Before:
https://buildkite.com/elastic/kibana-on-merge-unsupported-ftrs/builds/2899
After:
https://buildkite.com/elastic/kibana-on-merge-unsupported-ftrs/builds/2900

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-06-09 13:52:31 -05:00
David Sánchez
414e96bef3
[Security solution] [Endpoint] Split endpoint FTR config (#159014)
## Summary

Split our current FTR config in two so each one runs in a separated
config.
Moved all endpoint config related FTR tests to a new FTR config.


### For maintainers

- [ ] This was checked for breaking API changes and was [labeled
appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)

---------

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2023-06-08 14:54:08 +02:00
Robert Austin
a25c3cd4fd
[Security] Add Investigations Cypress config to the flaky test runner (#159247)
## Summary

The Flaky Test Runner is a feature of the CI stats server that creates a
buildkite job to run a test suite lots of times. This can help debug
flaky tests. Currently Investigations Cypress e2e tests cannot be run in
the flaky test runner. With this PR, the Investigations e2e tests can be
run in the flaky build runner.

See https://ci-stats.kibana.dev/trigger_flaky_test_runner


![image](1f07b6f5-6b87-4bc3-8a93-a2cdd503c3fa)

### Developer validation
In order to validate this, you'll need to create your own PR with all
the changes in this PR. You can do that like so:

```
gh pr checkout https://github.com/elastic/kibana/pull/159247
git checkout -b my-branch
git push -u fork # where fork is the git remote for your own fork
```
Then follow the link to create a PR.
Next, navigate to https://ci-stats.kibana.dev/trigger_flaky_test_runner
and select your PR. Then in the second step, you should be able to type
'investigations' and see the Investigations Cypress tests.


### For maintainers

- [ ] This was checked for breaking API changes and was [labeled
appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
2023-06-07 12:36:00 -07:00
Shahzad
0ea97e2e8c
[Synthetics/Uptime] Separate e2e tests by app (#152197)
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-06-07 17:33:56 +02:00
Konrad Szwarc
627b3547a1
[Threat Intelligence] Switch to parallel cypress (#158801)
This pull request introduces parallel functionality to the TI Cypress
tests, which was recently implemented in the Security Solution. In
essence, this allows us to run multiple test files simultaneously, each
within its own Kibana/ES environment. The PR is here
https://github.com/elastic/kibana/pull/157387

The changes in the scope of the TI Cypress e2es include:

- Modified `package.json` scripts; `:run` is now being used both locally
and in CI. Note that Firefox is currently not supported.
- Removed all `{testIsolation: false}` flags, as no test should depend
on non-pure state.
- All actions required to set up the test environment (archiver, login)
have been moved to beforeEach blocks to ensure that each test starts
with a fresh state.
- Introduced ESLint configuration to help us keep up with the best
practices when writing tests.

TODO:
- The `timeline.cy.ts` test is flaky and requires refactoring. There are
too many actions being fired against elements that are not visible to
the user (`{force: true}`). I've added some waits to address race
conditions in the UI, but this should be considered a temporary
solution.

---------

Co-authored-by: Patryk Kopyciński <contact@patrykkopycinski.com>
Co-authored-by: PhilippeOberti <philippe.oberti@elastic.co>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2023-06-07 15:58:26 +02:00
Jon
f8071b5ee6
[build] Rename serverless image from kibana to kibana-serverless (#158785)
In #155284 we created a new image type containing several serverless
specific configuration files. The previous distribution name was
preserved to keep the changeset limited. This is the followup for
renaming the image prefix from kibana to kibana-serverless.
2023-06-05 16:40:28 -05:00
Patryk Kopyciński
291f3994bf
[Security Solution] Adjust Cypress buildkite job config (#159000)
## Summary

Due to https://github.com/elastic/kibana/pull/158236 there is no need to
run Security Solution Cypress tests on 15 buildkite agents anymore
2023-06-05 21:14:17 +02:00
Patryk Kopyciński
0e3e902c27
[Osquery] Switch Osquery Cypress to run in parallel (#158692)
## Summary

Adjust Osquery Cypress tests to latest and greatest CI parallelization

---------

Co-authored-by: konrad.szwarc <konrad.szwarc@elastic.co>
2023-06-05 19:46:27 +02:00
Konrad Szwarc
c9658bf238
[Security Solution] ~200 ways to decrease flakiness in Cypress (#157387)
This PR addresses Cypress parallelisation in Security Solution scope. It
is a first step in improving e2e tests reliability and gives us a solid
foundation for further work on flakiness and run times. With this PR
each CI job starts 3 instances of ES, kibana and Cypress runner in
isolation.

Other issues addressed in this PR: 
- Use click() instead of trigger('click') in all Cypress tests.
- Use testIsolation in all Cypress tests.
- login before each test to ensure that the correct user is always
logged in. Also, with test isolation enabled, login should be required
before each test.
- use visit() instead of cy.visit() in some cases so that tests wait for
the page to fully load before executing.
- Cypress e2e tests are no longer compatible with Firefox (or any
non-Chromium based browser) due to using cypress-real-events
- Removes uses of cypress-pipe. Tests that used cypress-pipe in order to
retry click events will no longer retry click events.
- Fixes an error related to test files being overwritten by Webpack file
processing

---------

Co-authored-by: Patryk Kopycinski <contact@patrykkopycinski.com>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-05-30 17:40:18 +02:00
Kevin Delemme
50e113dc42
feat(composite_slo): implement create route (#158474) 2023-05-26 10:40:14 -04:00