Commit graph

468 commits

Author SHA1 Message Date
Dzmitry Lemechko
71a2bf9195
[ftr] split alerting_api_integration/spaces_only/config.ts into small fast configs (#149854)
## Summary

Trying to address slow config issue:

```
The following "Functional Tests" configs have durations that exceed the maximum amount of time desired for a single CI job. This is not an error, and if you don't own any of these configs then you can ignore this warning.If you own any of these configs please split them up ASAP and ask Operations if you have questions about how to do that.

x-pack/test/alerting_api_integration/spaces_only/config.ts: 41.4 minutes
```

by splitting it into multiple groups.

_1 round (splitting main index file with 3 index suites where each one
has its own setup/tearDown + alerting suite into 4 groups)_

x-pack/test/alerting_api_integration/spaces_only/tests/alerting/group1/config.ts
7m 1s

x-pack/test/alerting_api_integration/spaces_only/tests/alerting/group2/config.ts
**15m 10s**

x-pack/test/alerting_api_integration/spaces_only/tests/alerting/group3/config.ts
**21m 40s**

x-pack/test/alerting_api_integration/spaces_only/tests/alerting/group4/config.ts
5m 30s

x-pack/test/alerting_api_integration/spaces_only/tests/action_task_params/config.ts
2m 31s

x-pack/test/alerting_api_integration/spaces_only/tests/actions/config.ts
4m 22s

_2 round (rebalance groups 1-4 to be more time equal)_

x-pack/test/alerting_api_integration/spaces_only/tests/alerting/group1/config.ts
12m 46s

x-pack/test/alerting_api_integration/spaces_only/tests/alerting/group2/config.ts
8m 46s

x-pack/test/alerting_api_integration/spaces_only/tests/alerting/group3/config.ts
17m 30s

x-pack/test/alerting_api_integration/spaces_only/tests/alerting/group4/config.ts
9m 5s

Here `Alerting eventLog alerts should generate expected alert events for
normal operation` test started to fail, probably there is a dependency
on the previous tests.

_3 round (rebalance groups 1-4, to keep tests order in group 1 up until
`event_log.ts` suite)_

x-pack/test/alerting_api_integration/spaces_only/tests/alerting/group1/config.ts
17m 12s

x-pack/test/alerting_api_integration/spaces_only/tests/alerting/group2/config.ts
8m 28s

x-pack/test/alerting_api_integration/spaces_only/tests/alerting/group3/config.ts
16m 15s

x-pack/test/alerting_api_integration/spaces_only/tests/alerting/group4/config.ts
6m 21s

_4 round (rebalancing groups 3-4 to be more time equal)_

x-pack/test/alerting_api_integration/spaces_only/tests/alerting/group1/config.ts
**17m 14s**

x-pack/test/alerting_api_integration/spaces_only/tests/alerting/group2/config.ts
**8m 37s**

x-pack/test/alerting_api_integration/spaces_only/tests/alerting/group3/config.ts
**12m 40s**

x-pack/test/alerting_api_integration/spaces_only/tests/alerting/group4/config.ts
**9m 49s**

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-02-01 14:49:34 +01:00
Dzmitry Lemechko
f33568f74e
[ftr] split 'x-pack/test/functional_basic/config.ts' into small config files (#149617)
## Summary

This PR attempts to fix config duration time warning

```
The following "Functional Tests" configs have durations that exceed the maximum amount of time desired for a single CI job. This is not an error, and if you don't own any of these configs then you can ignore this warning.If you own any of these configs please split them up ASAP and ask Operations if you have questions about how to do that.

x-pack/test/functional_basic/config.ts: 38.8 minutes
```

<img width="1188" alt="image"
src="https://user-images.githubusercontent.com/10977896/214912243-800a1c80-13fa-406b-93dd-0f5ab208cda9.png">


PR initially splits original test suite into 3 config files based on
area: permission, data visualizer and transform.
- x-pack/test/functional_basic/apps/ml/data_visualizer/config.ts
duration: **19m 24s** (left for later)
- x-pack/test/functional_basic/apps/transform/config.ts duration: **18m
14s** -> let's split in 5 configs
- x-pack/test/functional_basic/apps/ml/permissions/config.ts. duration:
5m 10s


2nd split round:
-
x-pack/test/functional_basic/apps/transform/feature_controls/config.ts.
duration: 2m 4s
- x-pack/test/functional_basic/apps/transform/group1/config.ts duration:
**8m 16s** -> let's split in 2 configs
- x-pack/test/functional_basic/apps/transform/group2/config.ts.
duration: 5m 20s
- x-pack/test/functional_basic/apps/transform/group3/config.ts.
duration: 5m 12s
- x-pack/test/functional_basic/apps/ml/permissions/config.ts. duration:
5m 10s -> let's split in 3 configs (1 test file each)

3rd split round:
- x-pack/test/functional_basic/apps/ml/permissions/group1/config.ts.
duration: 3m 11s
- x-pack/test/functional_basic/apps/ml/permissions/group2/config.ts
duration: 3m 42s
- x-pack/test/functional_basic/apps/ml/permissions/group3/config.ts
duration 2m 14s
- x-pack/test/functional_basic/apps/transform/group4/config.ts duration:
4m 43s

lets split into 3 configs
- x-pack/test/functional_basic/apps/ml/data_visualizer/config.ts
duration: **19m 24s**

4th split round:

- x-pack/test/functional_basic/apps/ml/data_visualizer/group1/config.ts
duration: 4m 42s
- x-pack/test/functional_basic/apps/ml/data_visualizer/group2/config.ts
duration: 9m 27s
- x-pack/test/functional_basic/apps/ml/data_visualizer/group3/config.ts
duration: 7m 39s


[Build time
](https://buildkite.com/elastic/kibana-pull-request/builds/103355) is
49m 26sec (55 FTR groups)

Currently on-merge pipeline for
[main](https://buildkite.com/elastic/kibana-on-merge/builds?branch=main)
takes around 1h
2023-01-31 17:48:56 +01:00
Ido Cohen
d9f4039ed6
[cloud security] support telemetry for cis_aws (#148964) 2023-01-29 13:13:29 +02:00
Pablo Machado
482d1ced82
Delete CellActions from UI actions plugin (#149522)
## Summary
This PR only deletes the component from the UI action plugin.
@semd has already added the component to a new package here
https://github.com/elastic/kibana/pull/149057

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-01-27 10:37:04 +01:00
Jon
3727091344
[artifacts/container-image] Add annotation containing image metadata (#149627)
Adds a buildkite annotation with the built image tags.


https://buildkite.com/elastic/kibana-artifacts-container-image/builds/157
2023-01-26 16:34:43 -07:00
Dzmitry Lemechko
50393be0a8
[ci] retry scalability testing step on failure (#149399)
## Summary

Quite often bootstrap
[fails](https://buildkite.com/elastic/kibana-scalability-benchmarking/builds/957#0185e31d-dcc8-42f4-ac3a-e0399a175519)
on `kb-static-scalability-01` bare metal machine:

<details>
<summary>Bootstrap failure: [bazel] exited with code [1]</summary>

```
$ node scripts/kbn bootstrap
  | 2023-01-24 11:00:50 CEST | HINT
  | 2023-01-24 11:03:31 CEST | HINT If experiencing problems with node_modules try `yarn kbn bootstrap --force-install` or as last resort `yarn kbn reset && yarn kbn bootstrap`
  | 2023-01-24 11:03:31 CEST | HINT
  | 2023-01-24 11:03:31 CEST | ERROR  [bootstrap] failed: [bazel] exited with code [1]
  | 2023-01-24 11:03:31 CEST | output:
  | 2023-01-24 11:03:31 CEST | INFO: Invocation ID: 207c041d-23b8-4f07-bf56-8cb961819546
  | 2023-01-24 11:03:31 CEST |  
  | 2023-01-24 11:03:31 CEST | <--- Last few GCs --->
  | 2023-01-24 11:03:31 CEST |  
  | 2023-01-24 11:03:31 CEST | [1304562:0x74b83a0]   154462 ms: Mark-sweep 4023.8 (4130.2) -> 4011.3 (4131.0) MB, 1677.3 / 0.0 ms  (average mu = 0.149, current mu = 0.074) task; scavenge might not succeed
  | 2023-01-24 11:03:31 CEST | [1304562:0x74b83a0]   155522 ms: Mark-sweep 4024.7 (4131.0) -> 4012.0 (4131.7) MB, 924.0 / 0.0 ms  (average mu = 0.142, current mu = 0.128) task; scavenge might not succeed
  | 2023-01-24 11:03:31 CEST |  
  | 2023-01-24 11:03:31 CEST |  
  | 2023-01-24 11:03:31 CEST | <--- JS stacktrace --->
  | 2023-01-24 11:03:31 CEST |  
  | 2023-01-24 11:03:31 CEST | FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
  | 2023-01-24 11:03:31 CEST | 1: 0xb6b850 node::Abort() [/var/lib/buildkite-agent/.cache/bazel/_bazel_buildkite-agent/fbd7d220b25178fcebe6b4ba126fca45/external/nodejs_linux_amd64/bin/nodejs/bin/node]
  | 2023-01-24 11:03:31 CEST | 2: 0xa806a6  [/var/lib/buildkite-agent/.cache/bazel/_bazel_buildkite-agent/fbd7d220b25178fcebe6b4ba126fca45/external/nodejs_linux_amd64/bin/nodejs/bin/node]
  | 2023-01-24 11:03:31 CEST | 3: 0xd52140 v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, bool) [/var/lib/buildkite-agent/.cache/bazel/_bazel_buildkite-agent/fbd7d220b25178fcebe6b4ba126fca45/external/nodejs_linux_amd64/bin/nodejs/bin/node]
  | 2023-01-24 11:03:31 CEST | 4: 0xd524e7 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, bool) [/var/lib/buildkite-agent/.cache/bazel/_bazel_buildkite-agent/fbd7d220b25178fcebe6b4ba126fca45/external/nodejs_linux_amd64/bin/nodejs/bin/node]
  | 2023-01-24 11:03:31 CEST | 5: 0xf2fbe5  [/var/lib/buildkite-agent/.cache/bazel/_bazel_buildkite-agent/fbd7d220b25178fcebe6b4ba126fca45/external/nodejs_linux_amd64/bin/nodejs/bin/node]
  | 2023-01-24 11:03:31 CEST | 6: 0xf30ae8 v8::internal::Heap::RecomputeLimits(v8::internal::GarbageCollector) [/var/lib/buildkite-agent/.cache/bazel/_bazel_buildkite-agent/fbd7d220b25178fcebe6b4ba126fca45/external/nodejs_linux_amd64/bin/nodejs/bin/node]
  | 2023-01-24 11:03:31 CEST | 7: 0xf40ff3  [/var/lib/buildkite-agent/.cache/bazel/_bazel_buildkite-agent/fbd7d220b25178fcebe6b4ba126fca45/external/nodejs_linux_amd64/bin/nodejs/bin/node]
  | 2023-01-24 11:03:31 CEST | 8: 0xf41e68 v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [/var/lib/buildkite-agent/.cache/bazel/_bazel_buildkite-agent/fbd7d220b25178fcebe6b4ba126fca45/external/nodejs_linux_amd64/bin/nodejs/bin/node]
  | 2023-01-24 11:03:31 CEST | 9: 0xfb1124 v8::internal::ScavengeJob::Task::RunInternal() [/var/lib/buildkite-agent/.cache/bazel/_bazel_buildkite-agent/fbd7d220b25178fcebe6b4ba126fca45/external/nodejs_linux_amd64/bin/nodejs/bin/node]
  | 2023-01-24 11:03:31 CEST | 10: 0xe2187b non-virtual thunk to v8::internal::CancelableTask::Run() [/var/lib/buildkite-agent/.cache/bazel/_bazel_buildkite-agent/fbd7d220b25178fcebe6b4ba126fca45/external/nodejs_linux_amd64/bin/nodejs/bin/node]
  | 2023-01-24 11:03:31 CEST | 11: 0xbd6684  [/var/lib/buildkite-agent/.cache/bazel/_bazel_buildkite-agent/fbd7d220b25178fcebe6b4ba126fca45/external/nodejs_linux_amd64/bin/nodejs/bin/node]
  | 2023-01-24 11:03:31 CEST | 12: 0xbd9aee node::PerIsolatePlatformData::FlushForegroundTasksInternal() [/var/lib/buildkite-agent/.cache/bazel/_bazel_buildkite-agent/fbd7d220b25178fcebe6b4ba126fca45/external/nodejs_linux_amd64/bin/nodejs/bin/node]
  | 2023-01-24 11:03:31 CEST | 13: 0x1652906  [/var/lib/buildkite-agent/.cache/bazel/_bazel_buildkite-agent/fbd7d220b25178fcebe6b4ba126fca45/external/nodejs_linux_amd64/bin/nodejs/bin/node]
  | 2023-01-24 11:03:31 CEST | 14: 0x1664e44  [/var/lib/buildkite-agent/.cache/bazel/_bazel_buildkite-agent/fbd7d220b25178fcebe6b4ba126fca45/external/nodejs_linux_amd64/bin/nodejs/bin/node]
  | 2023-01-24 11:03:31 CEST | 15: 0x165326e uv_run [/var/lib/buildkite-agent/.cache/bazel/_bazel_buildkite-agent/fbd7d220b25178fcebe6b4ba126fca45/external/nodejs_linux_amd64/bin/nodejs/bin/node]
  | 2023-01-24 11:03:31 CEST | 16: 0xaafa2d node::SpinEventLoop(node::Environment*) [/var/lib/buildkite-agent/.cache/bazel/_bazel_buildkite-agent/fbd7d220b25178fcebe6b4ba126fca45/external/nodejs_linux_amd64/bin/nodejs/bin/node]
  | 2023-01-24 11:03:31 CEST | 17: 0xbb11f4 node::NodeMainInstance::Run() [/var/lib/buildkite-agent/.cache/bazel/_bazel_buildkite-agent/fbd7d220b25178fcebe6b4ba126fca45/external/nodejs_linux_amd64/bin/nodejs/bin/node]
  | 2023-01-24 11:03:31 CEST | 18: 0xb26c44 node::LoadSnapshotDataAndRun(node::SnapshotData const**, node::InitializationResult const*) [/var/lib/buildkite-agent/.cache/bazel/_bazel_buildkite-agent/fbd7d220b25178fcebe6b4ba126fca45/external/nodejs_linux_amd64/bin/nodejs/bin/node]
  | 2023-01-24 11:03:31 CEST | 19: 0xb2a83f node::Start(int, char**) [/var/lib/buildkite-agent/.cache/bazel/_bazel_buildkite-agent/fbd7d220b25178fcebe6b4ba126fca45/external/nodejs_linux_amd64/bin/nodejs/bin/node]
  | 2023-01-24 11:03:31 CEST | 20: 0x7fbc908be083 __libc_start_main [/lib/x86_64-linux-gnu/libc.so.6]
  | 2023-01-24 11:03:31 CEST | 21: 0xaad7ee _start [/var/lib/buildkite-agent/.cache/bazel/_bazel_buildkite-agent/fbd7d220b25178fcebe6b4ba126fca45/external/nodejs_linux_amd64/bin/nodejs/bin/node]
  | 2023-01-24 11:03:31 CEST | /var/lib/buildkite-agent/.cache/bazel/_bazel_buildkite-agent/fbd7d220b25178fcebe6b4ba126fca45/external/nodejs_linux_amd64/bin/yarn: line 19: 1304562 Aborted                 "$SCRIPT_DIR/node" "$SCRIPT_DIR/yarnpkg/bin/yarn.js" "$@"
  | 2023-01-24 11:03:31 CEST | INFO: Repository npm instantiated at:
  | 2023-01-24 11:03:31 CEST | /var/lib/buildkite-agent/builds/kb-static-scalability-01/elastic/kibana-scalability-benchmarking/kibana/WORKSPACE.bazel:47:13: in <toplevel>
  | 2023-01-24 11:03:31 CEST | /var/lib/buildkite-agent/.cache/bazel/_bazel_buildkite-agent/fbd7d220b25178fcebe6b4ba126fca45/external/build_bazel_rules_nodejs/index.bzl:83:18: in yarn_install
  | 2023-01-24 11:03:31 CEST | Repository rule yarn_install defined at:
  | 2023-01-24 11:03:31 CEST | /var/lib/buildkite-agent/.cache/bazel/_bazel_buildkite-agent/fbd7d220b25178fcebe6b4ba126fca45/external/build_bazel_rules_nodejs/internal/npm_install/npm_install.bzl:956:31: in <toplevel>
  | 2023-01-24 11:03:31 CEST | ERROR: An error occurred during the fetch of repository 'npm':
  | 2023-01-24 11:03:31 CEST | Traceback (most recent call last):
  | 2023-01-24 11:03:31 CEST | File "/var/lib/buildkite-agent/.cache/bazel/_bazel_buildkite-agent/fbd7d220b25178fcebe6b4ba126fca45/external/build_bazel_rules_nodejs/internal/npm_install/npm_install.bzl", line 949, column 13, in _yarn_install_impl
  | 2023-01-24 11:03:31 CEST | fail("yarn_install failed: %s (%s)" % (result.stdout, result.stderr))
  | 2023-01-24 11:03:31 CEST | Error in fail: yarn_install failed:  ()
  | 2023-01-24 11:03:31 CEST | ERROR: /var/lib/buildkite-agent/builds/kb-static-scalability-01/elastic/kibana-scalability-benchmarking/kibana/WORKSPACE.bazel:47:13: fetching yarn_install rule //external:npm: Traceback (most recent call last):
  | 2023-01-24 11:03:31 CEST | File "/var/lib/buildkite-agent/.cache/bazel/_bazel_buildkite-agent/fbd7d220b25178fcebe6b4ba126fca45/external/build_bazel_rules_nodejs/internal/npm_install/npm_install.bzl", line 949, column 13, in _yarn_install_impl
  | 2023-01-24 11:03:31 CEST | fail("yarn_install failed: %s (%s)" % (result.stdout, result.stderr))
  | 2023-01-24 11:03:31 CEST | Error in fail: yarn_install failed:  ()
  | 2023-01-24 11:03:31 CEST | ERROR: Skipping '//packages/kbn-ui-shared-deps-src:shared_built_assets': no such package '@npm//webpack-cli': yarn_install failed:  ()
  | 2023-01-24 11:03:31 CEST | ERROR: no such package '@npm//webpack-cli': yarn_install failed:  ()
  | 2023-01-24 11:03:31 CEST | INFO: Elapsed time: 160.951s
  | 2023-01-24 11:03:31 CEST | INFO: 0 processes.}
  | 2023-01-24 11:03:31 CEST | error Command failed with exit code 1.
```
</details>

Re-try usually helps and should minimise the failures.

I think the worker is missing some configuration since
`.buildkite/scripts/bootstrap.sh` fails on it, but works totally fine on
`kb-static-ubuntu-01`.
2023-01-26 16:02:23 +01:00
Pierre Gayvallet
cd9a53f284
Create the ftrSoApis FTR plugin (#149188)
## Summary

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

More and more SO types will not be accessible from the HTTP APIs (either
`hidden:true` or `hiddenFromHTTPApis: true`).

However, the FTR SO client (`KbnClientSavedObjects`) still needs to be
able to access and manipulate all SO types.

This PR introduces a `ftrSoApis` plugin that is loaded for all FTR
suites. This plugin exposes SO APIs that are used by the FTR client
instead of the public SO HTTP APIs. These APIs are configured to know
about all types, even hidden ones.

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-01-26 01:47:29 -07:00
Spencer
4e7560f19d
[ci-stats] move shipper to a package, validate limits in on-merge job (#149474)
We just had an issue where two PRs were merged and it caused the limit
of the `triggerActionsUi` bundle to be exceeded, breaking PR builds. The
issue is that we didn't see any indication of this in the on-merge jobs
because we don't produce the PR report for on-merge jobs or ask ci-stats
if we should fail the job. Instead, we just ship the metrics for
baseline purposes. This fixes that problem by adding a `--validate` flag
to `node scripts/ship_ci_stats`, which takes care of sending at least
some ci-stats and will verify that the bundle limits are not exceeded.

Since we didn't catch this issue in the on-merge job the limits were
incorrect for over an hour and merged into many PRs, wasting engineering
and CI time.

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-01-25 08:20:40 -07:00
Jon
4fa3cdcac6
[artifacts/container-image] Fix image tag when triggering update (#149449)
Instead of passing the entire qualified tag when triggering an update,
this sets the image tag to the abbreviated commit.
2023-01-24 16:25:46 -06:00
Jon
cfd9cd8ff9
[artifacts/container-image] Trigger image tag update (#149437)
Reopens #149143 with updates to the target file and service

After a commit is merged, tested, and images are built and pushed to the
container registry we need to send a notification that a new tag is
available.

This triggers a promotion pipeline with the latest container tag when:
1) the branch is tracked (i.e. main, and not a personal branch) 1)
~triggered from our on-merge test pipeline.~
https://github.com/elastic/kibana/pull/149350 had to remove support for
this - we're triggering via REST now which removes the from trigger
environment variable.
2023-01-24 11:49:32 -06:00
Jonathan Budzenski
ef6d48933a Revert "[artifacts/container-image] Trigger image tag update (#149143)"
This reverts commit 598843f7ca.
2023-01-23 20:07:27 -06:00
Jon
598843f7ca
[artifacts/container-image] Trigger image tag update (#149143)
After a commit is merged, tested, and images are built and pushed to the
container registry we need to send a notification that a new tag is
available.

This triggers a promotion pipeline with the latest container tag when:
1) the branch is tracked (i.e. main, and not a personal branch)
1) ~triggered from our on-merge test pipeline.~
https://github.com/elastic/kibana/pull/149350 had to remove support for
this - we're triggering via REST now which removes the from trigger
environment variable.

Co-authored-by: Tiago Costa <tiago.costa@elastic.co>
2023-01-23 17:36:26 -06:00
Jon
e8ceb4ed49
[ci/on-merge] Trigger container image build (#149350)
Reopens #148864 to trigger via REST instead of yaml. The previous
implementation did not support commit triggered builds.

This conditionally adds a pipeline trigger to
`kibana-artifacts-container-image` at the end of the on-merge pipeline
when tests are passing. The triggered pipeline will build (and
eventually push) our default docker images.
2023-01-23 13:16:56 -07:00
Jonathan Budzenski
ece7b8ffdf Revert "[ci/on-merge] Trigger container image build (#148864)"
This reverts commit 8dff4b1881.
2023-01-19 17:51:57 -06:00
Jon
8dff4b1881
[ci/on-merge] Trigger container image build (#148864)
This conditionally adds a pipeline trigger to
`kibana-artifacts-container-image` at the end of the on-merge pipeline
when tests are passing. The triggered pipeline will build (and
eventually push) our default docker images.

Tests passing -> image build:
https://buildkite.com/elastic/kibana-on-merge/builds/25854
Tests failing -> no image build:
https://buildkite.com/elastic/kibana-on-merge/builds/25849
2023-01-19 16:43:01 -06:00
Alejandro Fernández Haro
f0b5db6f70
[Cloud/Security] Fix the server-side import of the contract CloudStart (#149203)
Co-authored-by: Aleh Zasypkin <aleh.zasypkin@elastic.co>
Resolves https://github.com/elastic/kibana/issues/149204
2023-01-19 11:49:34 -06:00
Jon
2f86985c44
[artifacts/container-image] Push image (#148929)
This pushes multi-arch image artifacts to our container registry.

https://buildkite.com/elastic/kibana-artifacts-container-image/builds/10
2023-01-19 11:08:13 -06:00
Thomas Watson
b345f75634
Upgrade Node.js from v16.18.1 to v18.13.0 (#144012)
Closes #134930

Breaking changes in Node.js majors:

- `17.0.0`:
https://github.com/nodejs/node/blob/main/doc/changelogs/CHANGELOG_V17.md#17.0.0
- `18.0.0`:
https://github.com/nodejs/node/blob/main/doc/changelogs/CHANGELOG_V18.md#18.0.0
2023-01-17 21:04:23 +01:00
Aleh Zasypkin
1ef52f0311
Introduce a support for the concurrent session limit configuration. (#147442) 2023-01-17 14:26:49 +01:00
Janki Salvi
ed32d89848
[Cases] add tooltip component to kbn-cases-components package (#148561)
## Summary

This PR adds a tooltip component (High OrderComponent) to
@kbn/cases-components package. #146864

**Details of tooltip**


![image](https://user-images.githubusercontent.com/117571355/211531519-55c68e15-00ce-410d-9cd5-d23d4eb45287.png)

**status: Open, tooltip position : Top**


![image](https://user-images.githubusercontent.com/117571355/211530420-d0c96461-1ce5-4344-8fcf-17907a7efe61.png)

**status: In-progress, tooltip position: bottom, long title and
description**


![image](https://user-images.githubusercontent.com/117571355/211530905-2df9b768-3181-481b-8234-43875301cbb4.png)

### Checklist

Delete any items that are not applicable to this PR.

- [x] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)
- [x]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [x] This renders correctly on smaller devices using a responsive
layout. (You can test this [in your
browser](https://www.browserstack.com/guide/responsive-testing-on-local-server))
- [x] This was checked for [cross-browser
compatibility](https://www.elastic.co/support/matrix#matrix_browsers)


### How to Test:

- run `yarn storybook cases` and test on  http://localhost:9001/

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-01-17 14:24:50 +01:00
Dzmitry Lemechko
a94a1b620e
[performance] Disable telemetry for journey by default (#148915)
## Summary

I noticed some noise in [Performance
dashboard](dd0473ac-826f-5621-9a10-25319700326e?_g=(filters:!(),refreshInterval:(pause:!t,value:0),time:(from:now-24h%2Fh,to:now)))
and think it is better to disable Telemetry for journeys by default.

We use it to report performance events and this PR enables it in the
performance pipeline via env variable `PERFORMANCE_ENABLE_TELEMETRY`.
For other pipelines (PRs,
[performance-data-set-extraction](https://buildkite.com/elastic/kibana-performance-data-set-extraction))
running on regular workers or local troubleshooting there is no much
value to collect inconsistent values.
2023-01-13 23:50:14 +01:00
Jon
ecadc4a20a
[ci] Add build scripts for latest docker image (#148606)
This adds a new pipeline to build our default container image, using the
`kibana-ci` docker namespace and the docker version based on the first 7
digits of the commit hash.

https://buildkite.com/elastic/kibana-artifacts-container-image/builds/3

Will have followups for: 
1) on-merge trigger
2) docker push / controller pipeline trigger

need to make sure branches other than main, and manual triggers
(untested) skip publishing.
2023-01-13 13:46:40 -06:00
Dzmitry Lemechko
bc2cb5dc61
[code coverage] removing instrumentation & plugin for functional tests (#148748)
## Summary

Quite awhile ago we decided to stop collecting code coverage for our
functional (e2e, api integration) FTR tests.
This is a cleanup PR to remove the code we no longer use.


### Checklist

Delete any items that are not applicable to this PR.

- [ ] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)
- [ ]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [ ] [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
- [ ] Any UI touched in this PR is usable by keyboard only (learn more
about [keyboard accessibility](https://webaim.org/techniques/keyboard/))
- [ ] Any UI touched in this PR does not create any new axe failures
(run axe in browser:
[FF](https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/),
[Chrome](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US))
- [ ] If a plugin configuration key changed, check if it needs to be
allowlisted in the cloud and added to the [docker
list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)
- [ ] This renders correctly on smaller devices using a responsive
layout. (You can test this [in your
browser](https://www.browserstack.com/guide/responsive-testing-on-local-server))
- [ ] This was checked for [cross-browser
compatibility](https://www.elastic.co/support/matrix#matrix_browsers)


### Risk Matrix

Delete this section if it is not applicable to this PR.

Before closing this PR, invite QA, stakeholders, and other developers to
identify risks that should be tested prior to the change/feature
release.

When forming the risk matrix, consider some of the following examples
and how they may potentially impact the change:

| Risk | Probability | Severity | Mitigation/Notes |

|---------------------------|-------------|----------|-------------------------|
| Multiple Spaces&mdash;unexpected behavior in non-default Kibana Space.
| Low | High | Integration tests will verify that all features are still
supported in non-default Kibana Space and when user switches between
spaces. |
| Multiple nodes&mdash;Elasticsearch polling might have race conditions
when multiple Kibana nodes are polling for the same tasks. | High | Low
| Tasks are idempotent, so executing them multiple times will not result
in logical error, but will degrade performance. To test for this case we
add plenty of unit tests around this logic and document manual testing
procedure. |
| Code should gracefully handle cases when feature X or plugin Y are
disabled. | Medium | High | Unit tests will verify that any feature flag
or plugin combination still results in our service operational. |
| [See more potential risk
examples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx) |


### 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-01-12 16:44:48 +01:00
Jon
902f86a066
[ci] Increase FTR timeout (#148677)
FTR groups on CI target a 40 minute runtime. In situations where tests
are updated or moved, and there's no prior data, we're seeing occasional
timeouts with a 60 minute timeout. This increases the timeout to 90
minutes.
2023-01-10 15:02:04 -07:00
Jonathan Budzenski
895d9d9d70
[ci] Bump mocha to 10.2.0 (#147566)
Updates mocha to 10.2.0 and types/mocha to 10.0.1 to address an `npm
audit` warning. Verified tests still run and pass.

Re-opens https://github.com/elastic/kibana/pull/146951 with a fix added
to `package.json`. Credits to the original author, thanks for the
contribution.

Co-authored-by: Sergev ₱ <118327710+iot-defcon@users.noreply.github.com>
2023-01-10 07:40:14 -06:00
Spencer
d6be4a4b06
Implement package linter (#148496)
This PR implements a linter like the TS Project linter, except for
packages in the repo. It does this by extracting the reusable bits from
the TS Project linter and reusing them for the project linter. The only
rule that exists for packages right now is that the "name" in the
package.json file matches the "id" in Kibana.jsonc. The goal is to use a
rule to migrate kibana.json files on the future.

Additionally, a new rule for validating the indentation of tsconfig.json
files was added.

Validating and fixing violations is what has triggered review by so many
teams, but we plan to treat those review requests as notifications of
the changes and not as blockers for merging.

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-01-09 16:49:29 -07:00
Dzmitry Lemechko
5f31ebf1ce
Benchmark single apis (#146297)
## Summary

This PR adds capability to run capacity testing for single apis #143066

Currently in main we have to 2 types of performance tests:
- single user performance journey that simulates single end-user
experience in browser
- scalability journey that uses APM traces from single user performance
journey to simulate multiple end-users experience

This new type of performance tests allow to better understand how each
single server api scale under the similar load.

How to run locally:
make sure to clone the latest main branch of
[elastic/kibana-load-testing](https://github.com/elastic/kibana-load-testing)
in Kibana repo run:
`node scripts/run_scalability.js --journey-path
x-pack/test/scalability/apis/api.core.capabilities.json`

How it works:
FTR is used to start Kibana/ES and run Gatling simulation with json file
as input. After run the latest report matching journey name is parsed to
get perf metrics and report using EBT to the Telemetry cluster.

How will it run after merge:
I plan to run pipeline every 3 hours on bare metal machine and report
metrics to Telemetry staging cluster.
<img width="2023" alt="image"
src="https://user-images.githubusercontent.com/10977896/208771628-f4f5dbcb-cb73-40c6-9aa1-4ec3fbf5285b.png">


APM traces are collected and reported to Kibana stats cluster:
<img width="1520" alt="image"
src="https://user-images.githubusercontent.com/10977896/208771323-4cca531a-eeea-4941-8b01-50b890f932b1.png">


What metrics are collected:

1. warmupAvgResponseTime - average response time during warmup phase
2. rpsAtWarmup - average requests per second during warmup phase
3. warmupDuration
4. responseTimeMetric (default: 85%) Gatling has response time
25/50/75/80/85/90/95/99 percentiles, as well as min/max values
5. threshold1ResponseTime (default 3000 ms)
6. rpsAtThreshold1 requests per second when `responseTimeMetric` first
reach threshold1ResponseTime
7. threshold2ResponseTime
8. rpsAtThreshold2 (default 9000 ms)
9.  threshold3ResponseTime
10. rpsAtThreshold3 (default 15000 ms)

As long as we agree on metrics I will update indexer for telemetry.

Co-authored-by: Alejandro Fernández Haro <alejandro.haro@elastic.co>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-01-09 16:38:30 +01:00
Spencer
8e6f155e0c
support disabling kibana build download in functional/common.sh (#148461)
We need to disable downloading the Kibana build for steps which don't
need it, especially in builds which skip building Kibana completely
2023-01-05 10:41:28 -07:00
Spencer
2adf37b203
[fleet/pkgsDaily] disable CI log capture so we can see logging on success (#148459) 2023-01-05 08:21:54 -07:00
Patryk Kopyciński
c0d2a032f9
[Defend Workflows] Init Cypress (#147822)
## Summary

Add initial Cypress pipeline for Defend Workflows Team

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Ashokaditya <1849116+ashokaditya@users.noreply.github.com>
2023-01-04 17:05:13 +01:00
Shahzad
af7dd7fc56
[Synthetics] Custom reporter for e2e testing (#148251) 2023-01-04 08:25:44 +01:00
Kevin Lacabane
5c9df67e8d
[Stack Monitoring] Beats package integration tests (#147755)
### Summary

**Sets up the foundations for
https://github.com/elastic/kibana/issues/146000**
- created a new test server under
`x-pack/test/monitoring_api_integration/` that allows loading of
packages at kibana startup
- a test runner utility which is a simple for loop executing the
supplied test twice, one time with `metricbeat` data and a second time
with `package` data
- a utility that allows transformation of package data into metricbeat
data

**Adds API tests for the beats package**
- created a test case for each API exposed
- removed the duplicates from
`x-pack/test/api_integration/apis/monitoring`

-----

_See the included
[README](b55de5c1cc/x-pack/test/monitoring_api_integration/README.md)
for additional details_

This directory defines a custom test server that provides bundled
integrations
packages to the spawned test Kibana. This allows us to install those
packages at
startup, with all their assets (index templates, ingest pipelines..),
without
having to reach a remote package registry.
With the packages and their templates already installed we don't have to
provide
the static mappings in the tests archives. This has the benefit of
reducing our
disk footprint and setup time but more importantly it enables an easy
upgrade path
of the mappings so we can verify no breaking changes were introduced by
bundling
the new versions of the packages.

_Note that while Stack Monitoring currently supports 3 collection modes,
the tests
in this directory only focus on metricbeat and elastic-agent data. Tests
for legacy
data are defined under `x-pack/test/api_integration/apis/monitoring`._

Since an elastic-agent integration spawns the corresponding metricbeat
module under
the hood (ie when an agent policy defines elasticsearch metrics data
streams,
a metricbeat process with the elasticsearch module will be spawned), the
output
documents are _almost_ identical. This means that we can easily
transform documents
from a source (elastic-agent) to another (metricbeat), and have the same
tests run
against both datasets.

Note that we don't have to install anything for the metricbeat data
since the mappings
are already installed by elasticseach at startup, and available at
`.monitoring-<component>-8-mb`
patterns. So we are always running the metricbeat tests against the
latest version of
the mappings.
We could have a similar approach for packages, for example by installing
the latest
packages versions from public EPR before the test suites run, instead of
using pinned
versions. Besides the questionable reliance on remote services for
running tests,
this is also dangerous given that packages are released in a continuous
model.
This means that whenever the test suite would execute against the latest
version
of packages it would be too late, as in already available to users.

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-01-03 16:20:17 +01:00
Thomas Neirynck
0b6d3baf9d
[Performance] Add saved object load performance metric (#147324)
Adds performance metric to track saved objects load time. Also add boilerplate search journey.

Partially address https://github.com/elastic/kibana/issues/145627
2022-12-27 12:33:49 -05:00
Spencer
1b8ddc6267
Fix autocommiting from CI (#148066)
The new images have an updated gh binary which now requires setting the
`GITHUB_REPO` env var, or calling `gh repo set-default`. I opted for the
env var so that we didn't need to find a good time to execute the CLI
(after the keys are in the env, but before all other user code) or worry
about the logging. This also allows other users of our scripts to
customize as makes sense without having to dive into a bunch of
imperative shell code.

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2022-12-23 09:31:54 -07:00
Spencer
98613be316
Revert change of default minutes for unknown Jest configs 2022-12-22 21:47:54 -07:00
Spencer
afb09ccf8a
Transpile packages on demand, validate all TS projects (#146212)
## Dearest Reviewers 👋 

I've been working on this branch with @mistic and @tylersmalley and
we're really confident in these changes. Additionally, this changes code
in nearly every package in the repo so we don't plan to wait for reviews
to get in before merging this. If you'd like to have a concern
addressed, please feel free to leave a review, but assuming that nobody
raises a blocker in the next 24 hours we plan to merge this EOD pacific
tomorrow, 12/22.

We'll be paying close attention to any issues this causes after merging
and work on getting those fixed ASAP. 🚀

---

The operations team is not confident that we'll have the time to achieve
what we originally set out to accomplish by moving to Bazel with the
time and resources we have available. We have also bought ourselves some
headroom with improvements to babel-register, optimizer caching, and
typescript project structure.

In order to make sure we deliver packages as quickly as possible (many
teams really want them), with a usable and familiar developer
experience, this PR removes Bazel for building packages in favor of
using the same JIT transpilation we use for plugins.

Additionally, packages now use `kbn_references` (again, just copying the
dx from plugins to packages).

Because of the complex relationships between packages/plugins and in
order to prepare ourselves for automatic dependency detection tools we
plan to use in the future, this PR also introduces a "TS Project Linter"
which will validate that every tsconfig.json file meets a few
requirements:

1. the chain of base config files extended by each config includes
`tsconfig.base.json` and not `tsconfig.json`
1. the `include` config is used, and not `files`
2. the `exclude` config includes `target/**/*`
3. the `outDir` compiler option is specified as `target/types`
1. none of these compiler options are specified: `declaration`,
`declarationMap`, `emitDeclarationOnly`, `skipLibCheck`, `target`,
`paths`

4. all references to other packages/plugins use their pkg id, ie:
	
	```js
    // valid
    {
      "kbn_references": ["@kbn/core"]
    }
    // not valid
    {
      "kbn_references": [{ "path": "../../../src/core/tsconfig.json" }]
    }
    ```

5. only packages/plugins which are imported somewhere in the ts code are
listed in `kbn_references`

This linter is not only validating all of the tsconfig.json files, but
it also will fix these config files to deal with just about any
violation that can be produced. Just run `node scripts/ts_project_linter
--fix` locally to apply these fixes, or let CI take care of
automatically fixing things and pushing the changes to your PR.

> **Example:** [`64e93e5`
(#146212)](64e93e5806)
When I merged main into my PR it included a change which removed the
`@kbn/core-injected-metadata-browser` package. After resolving the
conflicts I missed a few tsconfig files which included references to the
now removed package. The TS Project Linter identified that these
references were removed from the code and pushed a change to the PR to
remove them from the tsconfig.json files.

## No bazel? Does that mean no packages??
Nope! We're still doing packages but we're pretty sure now that we won't
be using Bazel to accomplish the 'distributed caching' and 'change-based
tasks' portions of the packages project.

This PR actually makes packages much easier to work with and will be
followed up with the bundling benefits described by the original
packages RFC. Then we'll work on documentation and advocacy for using
packages for any and all new code.

We're pretty confident that implementing distributed caching and
change-based tasks will be necessary in the future, but because of
recent improvements in the repo we think we can live without them for
**at least** a year.

## Wait, there are still BUILD.bazel files in the repo
Yes, there are still three webpack bundles which are built by Bazel: the
`@kbn/ui-shared-deps-npm` DLL, `@kbn/ui-shared-deps-src` externals, and
the `@kbn/monaco` workers. These three webpack bundles are still created
during bootstrap and remotely cached using bazel. The next phase of this
project is to figure out how to get the package bundling features
described in the RFC with the current optimizer, and we expect these
bundles to go away then. Until then any package that is used in those
three bundles still needs to have a BUILD.bazel file so that they can be
referenced by the remaining webpack builds.

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2022-12-22 19:00:29 -06:00
Shahzad
b3ed8261e1
[Synthetics] Fixes errors overview sparklines (#147669) 2022-12-21 17:22:05 +01:00
Giorgos Bamparopoulos
042403e606
[APM] Add parallel builds for cypress tests (#142598)
- Tests runs initiated by the flaky test runner are not recorded or
parallelized
2022-12-21 15:36:08 +00:00
Pablo Machado
ed1f9650d1
[Security Solution] Add CellActions (alpha version) component to ui_actions plugin (#147434)
## Summary

Create a `CellActions` component. It hooks into a UI-Actions trigger and
displays all available actions.
It has two modes, Hover_Actions and Always_Visible. 

You can run the storybook and take a look at the component: `yarn
storybook ui_actions` or access
https://ci-artifacts.kibana.dev/storybooks/pr-147434/226993c612bbe1719de6374219009bc69b0378d8/ui_actions/index.html

*** This component is still not in use.

<img width="117" alt="Screenshot 2022-12-13 at 13 13 46"
src="https://user-images.githubusercontent.com/1490444/207316029-26c7bad8-ae39-48ba-8059-cbacf01a98aa.png">


<img width="224" alt="Screenshot 2022-12-13 at 13 13 30"
src="https://user-images.githubusercontent.com/1490444/207316024-0d7706c8-bd59-42e8-bf6d-b5648fc818fd.png">


#### Why?
The security Solution team is creating a generic UI component to allow
teams to share actions between different plugins.
Initially, only the Security solution plugin will use this component and
deprecate the Security solution custom implementation. Some actions that
will be shared are: "copy to clipboard", "filter in", "filter out" and
"add to timeline".



#### How to use it:
This package provides a uniform interface for displaying UI actions for
a cell.
For the `CellActions` component to work, it must be wrapped by
`CellActionsContextProvider`. Ideally, the wrapper should stay on the
top of the rendering tree.

Example:
```JSX
<CellActionsContextProvider
    // call uiActions.getTriggerCompatibleActions(triggerId, data)
    getCompatibleActions={getCompatibleActions}>
    ...
    <CellActions mode={CellActionsMode.HOVER_POPOVER} triggerId={MY_TRIGGER_ID} config={{ field: 'fieldName', value: 'fieldValue', fieldType: 'text' }}>
        Hover me
    </CellActions>
</CellActionsContextProvider>

```

`CellActions` component will display all compatible actions registered
for the trigger id.



### Checklist

- [x] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)
- [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
- [ ] Any UI touched in this PR is usable by keyboard only (learn more
about [keyboard accessibility](https://webaim.org/techniques/keyboard/))
- [x] Any UI touched in this PR does not create any new axe failures
(run axe in browser:
[FF](https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/),
[Chrome](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US))
- [x] This renders correctly on smaller devices using a responsive
layout. (You can test this [in your
browser](https://www.browserstack.com/guide/responsive-testing-on-local-server))
- [x] This was checked for [cross-browser
compatibility](https://www.elastic.co/support/matrix#matrix_browsers)
2022-12-20 10:00:30 +01:00
Spencer
2763af3a4e
[ftr] remove @types/mocha, define custom ambient-ftr-types (#147284)
After moving away from composite projects in the IDE we now have an
issue where projects like security solutions are getting `@types/jest`
and `@types/mocha` loaded up, even though the "types" compiler option in
security solutions focuses on jest. To fix this I've removed the
`@types/mocha` package, implemented/copied a portion of the mocha types
into a new `@kbn/ambient-ftr-types` package which can be used in ftr
packages to define the describe/it/etc. globals.

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2022-12-19 10:42:12 -07:00
Julian Gernun
058a3dafbd
[RAM] Reactivate most tests in triggers_actions_ui (#147535)
## Summary

Reactivating triggers_actions_ui tests.

Rules list tests will remain skipped until we finish its refactor in
https://github.com/elastic/kibana/pull/147014
@cnasikas will take care of this one
`x-pack/plugins/triggers_actions_ui/public/application/sections/action_connector_form/connector_form.test.tsx`

Co-authored-by: Xavier Mouligneau <xavier.mouligneau@elastic.co>
2022-12-14 12:58:12 -07:00
Uladzislau Lasitsa
a068b2ec53
[Dashboard][Lens] Add "convert to lens" action to dashboard (#146363)
## Summary

Closes https://github.com/elastic/kibana/issues/147032
Completes part of: https://github.com/elastic/kibana/issues/144605

Added `convert to lens` action for panel in dashboards.

If legacy visualization can be converted, the notification 'dot' will
shown on context menu.
<img width="828" alt="Снимок экрана 2022-12-02 в 10 50 58"
src="https://user-images.githubusercontent.com/16915480/205253599-3f3f102e-8fdc-497c-9e81-a9e1a146687c.png">

New action looks like this:
<img width="781" alt="Снимок экрана 2022-12-02 в 10 52 42"
src="https://user-images.githubusercontent.com/16915480/205253909-79d65fd8-81d8-4cce-a61a-234d3996cf84.png">

After clicking by that action user will be navigate to lens page and see
the following, where user can replace legacy visualization to lens on
dashboard:
<img width="1347" alt="Снимок экрана 2022-12-02 в 10 53 23"
src="https://user-images.githubusercontent.com/16915480/205254013-6e26b54d-6b92-4da5-be64-01b2876ea847.png">

On save user also can replace panel on dashboard:
<img width="506" alt="Снимок экрана 2022-12-02 в 10 55 22"
src="https://user-images.githubusercontent.com/16915480/205254409-163ebf51-c075-4c9a-a070-cebc7001636d.png">

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Stratoula Kalafateli <efstratia.kalafateli@elastic.co>
2022-12-13 15:36:38 +02:00
Jonathan Budzenski
26a1a926c3
[ci/cypress] Use spot instances (#147196)
This migrates the remaining ci-group-6 steps to n2-4-spot.
2022-12-12 14:28:03 -06:00
Dzmitry Lemechko
8be9ae629c
[performance] unify scripts (#147202)
## Summary

This PR is the follow-up to #147002 and #146129 and makes few changes to
make both performance scripts expose very similar cli and allow run
`run_performance` locally for debug purpose.

- to run a single test locally against source:
  - single user journey: 
`node scripts/run_performance.js --journey-path
x-pack/performance/journeys/login.ts`
  -  scalability journey (auto-generated):
`node scripts/run_scalability.js --journey-path
target/scalability_traces/kibana/login-0184f19e-0903-450d-884d-436d737a3abe.json`

`skip-warmup` flag to avoid journey warmup runs for performance data set
extraction (we don't need to run journey twice while interested in APM
traces only)

PR also updates pipeline scripts with new changes
2022-12-12 16:54:25 +01:00
Michael Dokolin
1bf581af01
[Health Gateway] Add integration tests (#146334) 2022-12-08 22:51:04 +01:00
Thomas Watson
39d27bb868
Add custom Buildkite pipeline for @kbn/handlebars (#146964)
Closes #146963
2022-12-08 18:28:33 +01:00
Dzmitry Lemechko
852299b535
[performance] add APM data set extraction pipeline (#147177)
## Summary

Part of #140828

PR for run yml file
[elastic/kibana-buildkite/pull/67](https://github.com/elastic/kibana-buildkite/pull/67)

This PR moves data set extraction step in separate pipeline, still
reporting KIbana scalability and ES Rally output in Kibana-related
bucket.

Reporting ES Rally data to required bucket will be added in the
follow-up PR.
2022-12-07 19:02:15 +01:00
Stratoula Kalafateli
405eb89f35
[Vislib] Removes the old implementation of the pie (#146990)
## Summary

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

Removes the implementation of the vislib pie. Specifically:

- Removes the `visualization:visualize:legacyPieChartsLibrary` advanced
setting which was used as a fallback to vislib pie,
- Cleanups the vislib code from the pie
2022-12-07 14:14:47 +02:00
Dzmitry Lemechko
9f7db8f615
[scalability testing] typescript runner (#147002)
## Summary

Closes #146546

This PR replaces bash script with node-based runner script.

Script can take relative path to directory with scalability journey
files or relative path to individual journey json file.

`node scripts/run_scalability.js --journey-config-path
scalability_traces/server`

`node scripts/run_scalability.js --journey-config-path
scalability_traces/server/api.core.capabilities.json`

### Checklist

Delete any items that are not applicable to this PR.

- [ ] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)
- [ ]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [ ] [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
- [ ] Any UI touched in this PR is usable by keyboard only (learn more
about [keyboard accessibility](https://webaim.org/techniques/keyboard/))
- [ ] Any UI touched in this PR does not create any new axe failures
(run axe in browser:
[FF](https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/),
[Chrome](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US))
- [ ] If a plugin configuration key changed, check if it needs to be
allowlisted in the cloud and added to the [docker
list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)
- [ ] This renders correctly on smaller devices using a responsive
layout. (You can test this [in your
browser](https://www.browserstack.com/guide/responsive-testing-on-local-server))
- [ ] This was checked for [cross-browser
compatibility](https://www.elastic.co/support/matrix#matrix_browsers)


### Risk Matrix

Delete this section if it is not applicable to this PR.

Before closing this PR, invite QA, stakeholders, and other developers to
identify risks that should be tested prior to the change/feature
release.

When forming the risk matrix, consider some of the following examples
and how they may potentially impact the change:

| Risk | Probability | Severity | Mitigation/Notes |

|---------------------------|-------------|----------|-------------------------|
| Multiple Spaces&mdash;unexpected behavior in non-default Kibana Space.
| Low | High | Integration tests will verify that all features are still
supported in non-default Kibana Space and when user switches between
spaces. |
| Multiple nodes&mdash;Elasticsearch polling might have race conditions
when multiple Kibana nodes are polling for the same tasks. | High | Low
| Tasks are idempotent, so executing them multiple times will not result
in logical error, but will degrade performance. To test for this case we
add plenty of unit tests around this logic and document manual testing
procedure. |
| Code should gracefully handle cases when feature X or plugin Y are
disabled. | Medium | High | Unit tests will verify that any feature flag
or plugin combination still results in our service operational. |
| [See more potential risk
examples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx) |


### 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)
2022-12-06 22:21:52 +01:00
Xavier Mouligneau
4bcb4c6b4f
[RAM] Bring back API integration (#146930)
Bring back API integration
2022-12-06 15:09:20 -05:00