Commit graph

39 commits

Author SHA1 Message Date
Kibana Machine
31a32557eb
[8.12] [kbn/journeys] fix hanging on telemetry call & improve logging (#175194) (#175247)
# Backport

This will backport the following commits from `main` to `8.12`:
- [[kbn/journeys] fix hanging on telemetry call & improve logging
(#175194)](https://github.com/elastic/kibana/pull/175194)

<!--- Backport version: 9.4.3 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Dzmitry
Lemechko","email":"dzmitry.lemechko@elastic.co"},"sourceCommit":{"committedDate":"2024-01-22T17:18:10Z","message":"[kbn/journeys]
fix hanging on telemetry call & improve logging (#175194)\n\n##
Summary\r\n\r\nThis PR fixes the issue causing (mostly)
[login\r\njourney](https://buildkite.com/elastic/kibana-single-user-performance/builds/12398#018d1149-cc2e-4591-a61c-176768081e2c)\r\nstuck
for 14 min waiting for Telemetry call response.\r\n\r\n\r\n<img
width=\"964\" alt=\"Screenshot 2024-01-22 at 11 12
24\"\r\nsrc=\"8cadc2ec-ee84-42f6-8a0c-ad949367429c\">\r\n\r\nI
believe the issue was in how we handle the Observables for
request\r\nevents. I added extra comment in the particular code
change.\r\n\r\nI no longer can reproduce it, all the events are reported
correctly:\r\n<img width=\"964\"
alt=\"image\"\r\nsrc=\"fa2c4b27-dcf2-480b-a07f-aeb23045149a\">\r\n\r\nLogs
cleaning is to log in console only performance metrics event but\r\nnot
all EBT elements. Also not to report some browser errors that
not\r\nKibana specific.\r\n\r\n\r\nTesting:\r\n\r\nrun the following
script 3-4 times\r\n```\r\nPERFORMANCE_ENABLE_TELEMETRY=1 node
scripts/run_performance.js --journey-path
x-pack/performance/journeys/login.ts\r\n```\r\n\r\n- script is completed
without delays (e.g. doesn't hang on after hook in\r\nTEST phase)\r\n-
telemetry requests are logged with correct counter and all
finished,\r\ne.g. `Waiting for telemetry request #2 to complete` is
followed by\r\n`Telemetry request #2 complete`\r\n- only events started
with `Report event \"performance_metric\"` are in\r\nconsole
output","sha":"8be528efb3169b630f44b33912adaf63bdea2a25","branchLabelMapping":{"^v8.13.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v8.12.1","v8.13.0"],"title":"[kbn/journeys]
fix hanging on telemetry call & improve
logging","number":175194,"url":"https://github.com/elastic/kibana/pull/175194","mergeCommit":{"message":"[kbn/journeys]
fix hanging on telemetry call & improve logging (#175194)\n\n##
Summary\r\n\r\nThis PR fixes the issue causing (mostly)
[login\r\njourney](https://buildkite.com/elastic/kibana-single-user-performance/builds/12398#018d1149-cc2e-4591-a61c-176768081e2c)\r\nstuck
for 14 min waiting for Telemetry call response.\r\n\r\n\r\n<img
width=\"964\" alt=\"Screenshot 2024-01-22 at 11 12
24\"\r\nsrc=\"8cadc2ec-ee84-42f6-8a0c-ad949367429c\">\r\n\r\nI
believe the issue was in how we handle the Observables for
request\r\nevents. I added extra comment in the particular code
change.\r\n\r\nI no longer can reproduce it, all the events are reported
correctly:\r\n<img width=\"964\"
alt=\"image\"\r\nsrc=\"fa2c4b27-dcf2-480b-a07f-aeb23045149a\">\r\n\r\nLogs
cleaning is to log in console only performance metrics event but\r\nnot
all EBT elements. Also not to report some browser errors that
not\r\nKibana specific.\r\n\r\n\r\nTesting:\r\n\r\nrun the following
script 3-4 times\r\n```\r\nPERFORMANCE_ENABLE_TELEMETRY=1 node
scripts/run_performance.js --journey-path
x-pack/performance/journeys/login.ts\r\n```\r\n\r\n- script is completed
without delays (e.g. doesn't hang on after hook in\r\nTEST phase)\r\n-
telemetry requests are logged with correct counter and all
finished,\r\ne.g. `Waiting for telemetry request #2 to complete` is
followed by\r\n`Telemetry request #2 complete`\r\n- only events started
with `Report event \"performance_metric\"` are in\r\nconsole
output","sha":"8be528efb3169b630f44b33912adaf63bdea2a25"}},"sourceBranch":"main","suggestedTargetBranches":["8.12"],"targetPullRequestStates":[{"branch":"8.12","label":"v8.12.1","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.13.0","branchLabelMappingKey":"^v8.13.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/175194","number":175194,"mergeCommit":{"message":"[kbn/journeys]
fix hanging on telemetry call & improve logging (#175194)\n\n##
Summary\r\n\r\nThis PR fixes the issue causing (mostly)
[login\r\njourney](https://buildkite.com/elastic/kibana-single-user-performance/builds/12398#018d1149-cc2e-4591-a61c-176768081e2c)\r\nstuck
for 14 min waiting for Telemetry call response.\r\n\r\n\r\n<img
width=\"964\" alt=\"Screenshot 2024-01-22 at 11 12
24\"\r\nsrc=\"8cadc2ec-ee84-42f6-8a0c-ad949367429c\">\r\n\r\nI
believe the issue was in how we handle the Observables for
request\r\nevents. I added extra comment in the particular code
change.\r\n\r\nI no longer can reproduce it, all the events are reported
correctly:\r\n<img width=\"964\"
alt=\"image\"\r\nsrc=\"fa2c4b27-dcf2-480b-a07f-aeb23045149a\">\r\n\r\nLogs
cleaning is to log in console only performance metrics event but\r\nnot
all EBT elements. Also not to report some browser errors that
not\r\nKibana specific.\r\n\r\n\r\nTesting:\r\n\r\nrun the following
script 3-4 times\r\n```\r\nPERFORMANCE_ENABLE_TELEMETRY=1 node
scripts/run_performance.js --journey-path
x-pack/performance/journeys/login.ts\r\n```\r\n\r\n- script is completed
without delays (e.g. doesn't hang on after hook in\r\nTEST phase)\r\n-
telemetry requests are logged with correct counter and all
finished,\r\ne.g. `Waiting for telemetry request #2 to complete` is
followed by\r\n`Telemetry request #2 complete`\r\n- only events started
with `Report event \"performance_metric\"` are in\r\nconsole
output","sha":"8be528efb3169b630f44b33912adaf63bdea2a25"}}]}]
BACKPORT-->

Co-authored-by: Dzmitry Lemechko <dzmitry.lemechko@elastic.co>
2024-01-22 11:32:05 -07:00
Kibana Machine
8ef72a6256
[8.12] feat(slo): new slo architecture (#172224) (#173157)
# Backport

This will backport the following commits from `main` to `8.12`:
- [feat(slo): new slo architecture
(#172224)](https://github.com/elastic/kibana/pull/172224)

<!--- Backport version: 8.9.7 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Kevin
Delemme","email":"kevin.delemme@elastic.co"},"sourceCommit":{"committedDate":"2023-12-12T13:45:12Z","message":"feat(slo):
new slo architecture
(#172224)","sha":"b51304f3f3c3e8510c44a235d0fc65c44fcce225","branchLabelMapping":{"^v8.13.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:breaking","backport:prev-minor","ci:build-serverless-image","Feature:SLO","v8.12.0","Team:obs-ux-management","v8.13.0"],"number":172224,"url":"https://github.com/elastic/kibana/pull/172224","mergeCommit":{"message":"feat(slo):
new slo architecture
(#172224)","sha":"b51304f3f3c3e8510c44a235d0fc65c44fcce225"}},"sourceBranch":"main","suggestedTargetBranches":["8.12"],"targetPullRequestStates":[{"branch":"8.12","label":"v8.12.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.13.0","labelRegex":"^v8.13.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/172224","number":172224,"mergeCommit":{"message":"feat(slo):
new slo architecture
(#172224)","sha":"b51304f3f3c3e8510c44a235d0fc65c44fcce225"}}]}]
BACKPORT-->

Co-authored-by: Kevin Delemme <kevin.delemme@elastic.co>
2023-12-12 07:57:24 -07:00
Stratoula Kalafateli
40deb13458
[Lens] Show icons/titles instead of previews in suggestions panel (#166808)
## Summary

Use icons/titles for the suggestions panel instead of previews.

We decided to move forward with this for performance reasons. Some
suggestions can be very heavy and we have many sdhs from the customers
complaining about it. It is not obvious to them that the performance
problem is due to the suggestions.

<img width="1773" alt="image"
src="92816b82-b6a5-4f19-a436-52f41eae6a1a">

The FTs changes are mostly changes to the selectors.
2023-10-03 12:51:36 +02:00
Dzmitry Lemechko
46aecbee5a
unskip many_fields_lens_editor journey (#167634)
## Summary

Adding extra wait time and check for chart rendering only after the page
is loaded (relying on Chart switch popover)
I would like to merge it before #166808 so we can check metrics
stability before actual merge.

Note: it looks like a product flakiness rather than test.

Flaky test runner stats

before:
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/3258
16/50 failed

after:
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/3261
100/100 passed
2023-09-29 17:49:10 +02:00
Jonathan Budzenski
07b206748f skip failing test suite (#167496) 2023-09-28 10:02:36 -05:00
Dzmitry Lemechko
c48cc24617
[kbn/journeys] fixes to run journeys against ESS cluster (#166923)
## Summary

I had to change `waitForRender` since `page.waitForFunction` tries to
run a script on page and it is not working due to CSP settings on Cloud.
Instead of injecting a script, we use a classical API to find
elements/attributes in the DOM.

Since `PUT /internal/core/_settings` is merged in 8.11.0, journeys run
on Cloud with on-fly labels update is supported starting deployments
8.11.0+. I added error message for 404 code just in case someone runs it
on earlier version.

`many_fields_discover` journey was update since on Cloud the data view
used by scenario is not selected by default.

How it works:

Create a deployment with QAF and re-configure it for journey run:
```
export EC_DEPLOYMENT_NAME=my-run-8.11
qaf elastic-cloud deployments create --stack-version 8.11.0-SNAPSHOT --environment staging --region gcp-us-central1
qaf elastic-cloud deployments configure-for-performance-journeys
```

Run any journey, e.g. many_fields_discover
```
TEST_CLOUD=1 TEST_ES_URL=https://username:pswd@es_url:443 TEST_KIBANA_URL=https://username:pswd@kibana-ur_url node scripts/functional_test_runner --config x-pack/performance/journeys/many_fields_discover.ts
```

You should see a log about labels being updated:

```
Updating telemetry & APM labels: {"testJobId":"local-a3272047-6724-44d1-9a61-5c79781b06a1","testBuildId":"local-d8edbace-f441-4ba9-ac83-5909be3acf2a","journeyName":"many_fields_discover","ftrConfig":"x-pack/performance/journeys/many_fields_discover.ts"}
```

And then able to find APM logs for the journey in
[Ops](https://kibana-ops-e2e-perf.kb.us-central1.gcp.cloud.es.io:9243/app/apm/services?comparisonEnabled=true&environment=ENVIRONMENT_ALL&kuery=labels.testJobId%20%3A%20%22local-d79a878c-cc7a-423b-b884-c9b6b1a8d781%22&latencyAggregationType=avg&offset=1d&rangeFrom=now-24h%2Fh&rangeTo=now&serviceGroup=&transactionType=request)
cluster
2023-09-28 12:06:00 +02:00
Walter Rafelsberger
cdaa3d3851
[ML] Transforms: Enable SLO transforms installer on CI (#165470)
## Summary

This enables the installer for SLO transforms on CI.

- For the `many_fields_transform` performance journey, it will then look
for the "Create transform" on top of the table instead of the "Create
your first transform" button. Command to test the performance journey:
`node scripts/run_performance.js --journey-path
x-pack/performance/journeys/many_fields_transform.ts --skip-warmup`
- For the functional tests that assert the empty transform list, this
adds a command to delete all transforms before running those tests.
2023-09-22 17:13:38 +02:00
Quynh Nguyen (Quinn)
4eb45e67c0
[ML] Add new performance journey for Index data visualizer (#164787)
## Summary

This PR adds a performance journey test for the Index data visualizer,
using the Kibana TSDB logs.

To run test:
```
node scripts/run_performance.js --journey-path x-pack/performance/journeys/tsdb_logs_data_visualizer.ts --skip-warmup
```


### 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
- [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/))
- [ ] 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)

---------

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Walter Rafelsberger <walter.rafelsberger@elastic.co>
Co-authored-by: Dzmitry Lemechko <dzmitry.lemechko@elastic.co>
2023-09-07 14:40:42 -07:00
Dzmitry Lemechko
4552c6e3b7
[tags] add performance journey to track CRUD operations on listing page (#164537)
## Summary

This PR adds single user performance journey to track CRUD operations on
Tags listing page:
- get all tags on initial loading
- create a new tag 
- update the tag
- delete the tag
- bulk delete (first 20 tags)

flaky-test-runner 25x:
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/2966

Added visualisations to monitor metrics, most operations take <1 second
<img width="523" alt="image"
src="f4c14e49-edf6-4fff-9f31-30b8a67970e9">

Since bulk delete takes ~20 sec, I put it on the separate visualisation
<img width="523" alt="Screenshot 2023-08-23 at 18 19 46"
src="467983f8-f8eb-486a-8e27-beac0d9b1f37">


dd0473ac-826f-5621-9a10-25319700326e?_g=h@3b0c329

To run locally: `node scripts/functional_tests.js --config
x-pack/performance/journeys/tags_listing_page.ts`

Note: this journey is compatible to be executed on Serverless project

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-08-25 14:46:32 +02:00
Dzmitry Lemechko
15b118c724
[Lens] add performance journey to track rendering time for XY visualization and suggestions panel (#163412)
## Summary

Related to #163089

Adding the first performance journey for the Lens Editor. It simulated
loading existing Lens visualisation with data view having 10k fields.

We collect the following metrics:
- `fetchFieldsExistenceInfo` reports time it takes to fetch fields in
Data Panel
- `lensVisualizationRenderTime` reports both time it takes to fetch the
data (`time_to_data`) and render the main visualization
(`time_to_render`)
- `lensSuggestionsRenderTime` reports time it takes to render
suggestions panel

Metrics consistency

<img width="568" alt="image"
src="3384bb8e-6152-4bae-93dc-4f7f4167ed07">

Run locally with 
```
node scripts/functional_tests --config x-pack/performance/journeys/many_fields_lens_editor.ts
```

Metrics will be available here 

dd0473ac-826f-5621-9a10-25319700326e?_g=h@61c5ac8

---------

Co-authored-by: Drew Tate <drewctate@gmail.com>
2023-08-17 12:01:03 +02:00
Dzmitry Lemechko
4dadcbb911
[performance] enable journeys on serverless - part 1 (#162902)
## Summary

This PR is the Step 1 to enable performance journeys run for serverless
projects.
The focus is to re-design journeys to be compatible both for stateful &
serverless Kibana.

I created `KibanaPage` class to have some shared UI actions across
different journeys.
`ProjectPage` extends `KibanaPage` and allows us to override actions,
that are different (or have different locators) in Kibana Project UI
(generic project at the moment)

`kibanaPage` is available in Step context and based on TEST_SERVERLESS
env var appropriate class instance is used.


```typescript
  .step('Go to Discover Page', async ({ page, kbnUrl, kibanaPage }) => {
    await page.goto(kbnUrl.get(`/app/discover`));
    await kibanaPage.waitForHeader();
    await page.waitForSelector('[data-test-subj="discoverDocTable"][data-render-complete="true"]');
    await page.waitForSelector(subj('globalLoadingIndicator-hidden'));
  })
```

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-08-02 12:59:23 +02:00
Achyut Jhunjhunwala
9eec3aea39
[APM] Fix apm journey flakiness (#162879)
## Summary

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

Fix APM journey flakiness

Tested against Flaky Test runner - [Passed
50/50](https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/2760)
2023-08-01 05:05:56 -07:00
Jonathan Budzenski
96e6eb92f2 fix trailing comma lint error 2023-07-31 13:27:40 -05:00
Tiago Costa
a1bc199488
skip flaky suites (#162813) 2023-07-31 17:10:42 +01:00
Achyut Jhunjhunwala
6b44fff5ac
[APM] Implementing Journey for APM (#162721)
## Summary

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

As part of this PR, as its just the stepping stone, we will only cover a
basic navigation flow and analyze the result obtained from Steps
Dashboard and data collected by the APM Agents for this journey

## Scope

- Generating a data set using Synthtrace instead of Archives
- Capturing the flow from Service Inventory to Trace Waterfall loading
on Transaction page
- Capturing Event loop utilisation metrics enabled for APM Journey

## How to run it

```
node scripts/run_performance.js --journey-path x-pack/performance/journeys/apm_service_inventory.ts --skip-warmup
```

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-07-31 14:27:12 +02:00
Ido Cohen
a6a8f5b9ab
[Cloud Security] convert status api router to be versioned (#159548) 2023-07-03 13:04:17 +03: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
Dzmitry Lemechko
3a7243f9b9
Collect custom performance metrics on Discover (#158829)
## Summary


This PR adds custom performance metrics collection in Discover app
client using EBT.
[Discussed](https://elastic.slack.com/archives/CNKNE0PHN/p1685631040718719)
in slack

The following events will be collected (thanks a lot to @davismcphee for
the great code overview and suggestions)

Discover main view:
- `discoverLoadSavedSearch` will report Saved Search loading time on
opening app by calculating
[loadSavedSearch](5b784c8967/src/plugins/discover/public/application/main/discover_main_route.tsx (L131-L170))
call duration
- `discoverFetchAll`: reports Discover table loading time ("time to
data") by calculating
[fetchAll](5b784c8967/src/plugins/discover/public/application/main/services/discover_data_state_container.ts (L208-L223))
call duration
- `discoverFetchAllRequestsOnly`: reports [fetching ES
documents](5b784c8967/src/plugins/discover/public/application/main/utils/fetch_all.ts (L85-L96))
duration only (event meta contains `fetchType: fetchDocuments |
fetchSQL` ), part of "time to data" duration. It calculates
`fetchDocuments` | `fetchSQL` call duration.

Discover single doc view:
- `discoverSingleDocFetch`: reports individual document fetching time by
calculating
[requestData](5b784c8967/src/plugins/discover/public/hooks/use_es_doc_search.ts (L39-L75))
call duration

Surrounding documents view:
- `discoverSurroundingDocsFetch` reports [surrounding docs fetching
time](5b784c8967/src/plugins/discover/public/application/context/context_app.tsx (L122-L149))
and will also contain fetchType in meta, e.g. `fetchType:
'predecessors'`
**Note**: currently we won't report it, since `many_fields_discover`
journey uses esArchives with data not supporting surrounding docs. We
can add new journey with custom dataset to address it and other
performance-related areas.

Metrics can be tracked on [single user perf
dashboard](dd0473ac-826f-5621-9a10-25319700326e?_g=())
as `many_fields_discover` targeted Lens viz:
<img width="1423" alt="image"
src="aaaaa6a0-a666-4ea2-b627-fa44b4673210">

4 runs were done before `discoverFetchAllRequestsOnly` was added, so you
only see 3 data points for this metric

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-06-26 03:18:44 -07:00
Dzmitry Lemechko
e55a92eab0
[performance] enable journey run against cloud deployments (#156720)
## Summary

This PR adds changes and instructions how to run existing performance
journeys against ESS instances.

As previously discussed with @pheyos , there are few manual steps to be
done before running the actual journey:
1. Create cloud deployment and re-configure it the way APM traces are
reported the monitoring cluster
2. Check out the branch matching deployment version (main ->
8.9.0-SNAPSHOT), create user with `superuser` role (we don't test
functional features, only performance metrics)

Then you can run the journey like a regular cloud test suite:
```
export TEST_KIBANA_URL=https://<username>:<password>@<kibana_url>
export TEST_ES_URL=https://<username>:<password>@j<elasticsearch_url>:<port>
export TEST_CLOUD=1
node scripts/functional_test_runner.js --config x-pack/performance/journeys/$YOUR_JOURNEY_NAME.ts
```

<img width="1357" alt="image"
src="https://user-images.githubusercontent.com/10977896/236499836-2738fecb-a5a9-4e58-a10b-915b962af037.png">

---------

Co-authored-by: Jon <jon@budzenski.me>
2023-05-08 23:35:43 -04:00
Ido Cohen
b558ba45a5
[Cloud Security] posture dashboard page journey (#151613) 2023-02-27 12:58:53 -06:00
Tiago Costa
e38350f7f9
chore(NA): upgrades uuid to v9.0.0 (#149135)
This PR upgrades uuid into its latest version `9.0.0`.
The previous default used version `v4` was kept where it was previously
used and places using `v1` or `v5` are still using it.

In this latest version they removed the deep import feature and as we
are not using tree shaking it increased our bundles by a significant
size. As such, I've moved this dependency into the `ui-shared-deps-npm`
bundle.

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-01-19 19:48:07 +00:00
Dzmitry Lemechko
335d490cd6
[journeys] use uuid to create dashboard with unique name (#149156)
## Summary

After [148818](https://github.com/elastic/kibana/pull/148818) was merged
performance pipeline started to failed.
Since we run each journey twice (warmup & phase) with Kibana started
each time, but ES started only once, dashboard `foo dashboard` already
exist after warmup. Adding `uuid` in title to always have a unique
title.

<img width="1454" alt="Screenshot 2023-01-18 at 21 01 15"
src="https://user-images.githubusercontent.com/10977896/213284884-edf67030-95be-48af-a50a-c2eb967d1eb2.png">
2023-01-18 14:19:16 -07:00
Thomas Neirynck
dc80574a89
[Performance] Add dashboard creation to journey (#148818)
## Summary

Add a new dashboard.

Blocked by https://github.com/elastic/kibana/pull/148768

### 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~~
- [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/))~~
- ~~[ ] 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)~~


### For maintainers

- [x] 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-18 12:51:20 -05:00
Dzmitry Lemechko
c573f43663
unskip saved search dashboard journey (#148987)
## Summary

This test was skipped due to the following error:

```
Executable doesn't exist at /var/lib/buildkite-agent/.cache/ms-playwright/chromium-1028/chrome-linux/chrome
```

It is hard to say why chrome binary was missing on a worker, but test is
not a reason: I checked the reported failures and other journeys were
failing as well. If it happens again, we need to investigate how chrome
is cached, playwright dependency was updated or some other race
condition.
2023-01-17 13:38:08 +01:00
Thomas Neirynck
c5291d1b07
[Journeys] Add dashboard delete to dashboards listing (#148267)
## Summary

Adds a few more user flows to dashboard listing journeys.

Partially address https://github.com/elastic/kibana/issues/145627

### 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~~
- [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/))~~
- ~~[ ] 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)~~


### For maintainers

- [x] 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-05 10:26:44 -05:00
Tiago Costa
ed840b5351
skip flaky journey (#148221) 2023-01-03 19:08:52 +00: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
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
Andrew Tate
e2d3bb9dec
[Lens] Multi metric partition charts (#143966) 2022-11-14 16:49:39 -07:00
Dzmitry Lemechko
48ea0297d5
[performance/journeys] fix journeys (#144507) 2022-11-03 12:49:16 +01:00
Dzmitry Lemechko
6482b22d1e
Performance journeys: log how many visualisations were loaded / rendered out of expected count (#144422)
* [performance/utils] extend error message for waitForVisualizations

* revert test change

* remove new line

Co-authored-by: Liza Katz <liza.katz@elastic.co>
2022-11-03 10:30:14 +01:00
Dzmitry Lemechko
404d08f600
add gauge and saved search journeys (#144311)
Co-authored-by: Liza Katz <liza.katz@elastic.co>
2022-11-02 16:56:54 +02:00
Liza Katz
14ce15e6e8
Fix discover embeddable ready state for tests (#144243)
* notify search embeddable when data is loaded
set the embeddable as rendered only when data is loaded

* typo

* remove event

* isLoading

* fix journeys

* revert grid change

* dispatcherror

* added no data and AGGREGATED_LEVEL tests

* error

* restore deleted test

* deb
2022-11-02 15:40:33 +02:00
Dzmitry Lemechko
5ca5ef3d00
[performance/journeys] revert data_stress_test_lens.ts journey step (#144261)
* [performance/journeys] open lens dashboard from dashboard list

* revert to original test structure

* [CI] Auto-commit changed files from 'node scripts/precommit_hook.js --ref HEAD~1..HEAD --fix'

* revert step name

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2022-10-31 21:04:08 +01:00
Dzmitry Lemechko
ba227dcef5
[x-pack/performance] use es/kbn archives with sample data, load dashboard w/out map (#144100)
* [x-pack/performance] use es archives with sample data, load dashboards w/out map

* wait for chrome
map only test

* fix selector

* fix

* [journeys] open dashboard from dashboards list page

* remove waitForChrome

* fix waiting for map

* [CI] Auto-commit changed files from 'node scripts/eslint --no-cache --fix'

Co-authored-by: lizozom <liza.katz@elastic.co>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2022-10-28 15:46:41 +02:00
Joe Reuter
02c1912e51
restore old baseline (#143512) 2022-10-19 16:54:33 +02:00
Nathan Reese
999bc84c81
[Sample data] replace legacy control visualizations with dashboard controls (#141824)
* [Sample data] replace legacy control visualizations with dashboard controls

* i18n wrappings for title and description

* update screen shots

* fix functional tests

* update functional test expects

* more functional test expect updates

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2022-10-03 20:06:05 -06:00
Spencer
249b596465
[journeys] restart ES for each journey, fix flakiness (#141530) 2022-09-26 08:56:31 -07:00
Spencer
50b3b57d9e
[ftr] add first-class support for playwrite journeys (#140680)
* [ftr] add first-class support for playwrite journeys

* [CI] Auto-commit changed files from 'node scripts/generate codeowners'

* fix jest test

* remove ability to customize kibana server args, if we need it we can add it back

* remove dev dir that doesn't exist

* fix typo

* prevent duplicated array converstion logic by sharing flag reader

* remove destructuring of option

* fix scalability config and config_path import

* fix start_servers args and tests

* include simple readme

* fix jest tests and support build re-use when changes are just to jest tests

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2022-09-22 01:06:46 -07:00