Commit graph

21 commits

Author SHA1 Message Date
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