add performance tests for Login and Home pages
- [x] Rename and reduce the number of environment variables for performance test CI job
- [x] ITERATION_COUNT_ENV => PERF_TEST_COUNT
- [x] DISABLE_CACHE, TEST_RUNNER, TEST_THROTTLE_NETWORK removed
- [x] Use c2-16 queue for performance tests
- [x] Run performance tests by running ES and Kibana separately
- [x] Add warmup phase to performance tests (Not reported to APM). APM Label: PERF_TEST_PHASE
- [x] Add playwright dependency
- [x] Throttle network speed ( downloadThroughput: 750.000 B/s, uploadThroughput: 750.000 B/s, latency: 100 ms )
- [x] Disable cache by using - page.route (‘**’, ….)
- [x] Login and Home pages performance tests.
(cherry picked from commit eeb5efcc62)
# Conflicts:
# x-pack/test/performance/config.playwright.ts
* Remove constant_keyword field mappings from ECS component template
These ECS fields are meant for specific indices (datastreams), but do
not make sense (especially as `constant_keyword`) on our alerts-as-data
indices, as they will cause errors when attempting to ingest different
values from different indices.
* Filter out constant_keyword fields from ECS fieldmap
The results of this were already applied to the fields themselves, but
this ensures that the script does not accidentally repopulate them in
the future.
Implementation-wise, it was simpler to refactor this into a reduce()
rather than explicitly using filter() and then generating a new object.
(cherry picked from commit ee34a7a694)
Co-authored-by: Ryland Herrick <ryalnd@gmail.com>
* Clone all panels by value.
* Moved removal of byReference properties to getInputAsValueType.
* Fixed handling of clone titles.
* Fixed functional and unit clone tests.
* Removed duplicate check for byReference.
* Unset title on Visualize embeddable when by value.
* Remove unused import.
* Added by reference logic for saved search embeddables.
* Re-added unit tests for cloning by reference.
* Added functional tests.
* Added Jest unit tests.
* Ignored TypeScript errors for calling private functions in Jest tests.
* Adjusted logic for generating clone titles.
* Edited unit and functional tests for clone titles.
* Fixed typo in Jest tests.
* Keep hidden panel title status.
* Fix Jest test description.
* Remove unused import.
* Fixed Jest tests after new title logic.
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
(cherry picked from commit b1d7731afa)
Co-authored-by: Hannah Mudge <Heenawter@users.noreply.github.com>
## Summary
Related and previous PR:
https://github.com/elastic/kibana/pull/122472
This removes the above structure from the PR above and instead opts to use a more finer grained level of telemetry. The new structure adds to each rule these four counters to the telemetry:
* legacy_notifications_enabled - The number of legacy notifications on rules that are enabled/active
* legacy_notifications_disabled - The number of legacy notifications on rules that are disabled/in-active
* notifications_enabled - The number of notifications on rules that are enabled/active
* notifications_disabled - The number of notifications on rules that are disabled/in-active
For pre-built rules you have these booleans:
* has_legacy_notification - True if the pre-built rule has a legacy notification attached, otherwise false.
* has_notification - True if the pre-built rule has a notification attached, otherwise false.
Note, both those booleans are `false` if the pre-built rule has no notifications attached and both can never be `true` together.
These will show up within each rule type like for example on a query rule it will look like:
```json
"detection_rule_usage": {
"query": {
"enabled": 2,
"disabled": 1,
"cases": 0,
"legacy_notifications_enabled": 1, <-- New
"legacy_notifications_disabled": 0, <-- New
"notifications_enabled": 1, <-- New
"notifications_disabled": 1 <-- New
}
```
Within the counts/total sections it will show up on both the `elastic` rules and the `custom` rules like so:
```json
"elastic_total": {
"enabled": 0,
"disabled": 0,
"alerts": 0,
"cases": 0,
"legacy_notifications_enabled": 0, <-- New
"legacy_notifications_disabled": 0, <-- New
"notifications_enabled": 0, <-- New
"notifications_disabled": 0 <-- New
},
"custom_total": {
"enabled": 2,
"disabled": 1,
"alerts": 7218,
"cases": 0,
"legacy_notifications_enabled": 1, <-- New
"legacy_notifications_disabled": 0, <-- New
"notifications_enabled": 1, <-- New
"notifications_disabled": 1 <-- New
}
```
For pre-built it will be:
```json
"detection_rule_detail": [
{
"rule_name": "Potential Evasion via Filter Manager",
"rule_id": "06dceabf-adca-48af-ac79-ffdf4c3b1e9a",
"rule_type": "eql",
"rule_version": 8,
"enabled": false,
"elastic_rule": true,
"created_on": "2022-01-19T01:29:25.540Z",
"updated_on": "2022-01-19T01:29:25.540Z",
"alert_count_daily": 0,
"cases_count_total": 0,
"has_legacy_notification": false, <-- New
"has_notification": false <-- New
},
```
Screen shot of it if you go to "Advanced settings -> cluster data":
<img width="802" alt="Screen Shot 2022-01-18 at 6 27 14 PM" src="https://user-images.githubusercontent.com/1151048/150046445-b1850b1c-bca6-41e0-b101-1bac5f67dbb3.png">
<img width="798" alt="Screen Shot 2022-01-18 at 6 30 33 PM" src="https://user-images.githubusercontent.com/1151048/150046808-1109a4c9-8a54-4da8-8b42-5f957a9d3ed5.png">
Follow the manual test instructions on https://github.com/elastic/kibana/pull/122472 for how to test this. The same manual testing applies here for seeing how these work out. You should be able to see a higher granularity with these stats.
### Checklist
- [ ] [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
(cherry picked from commit d2a8bb90be)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* Add rows per page on tables
* Set page options and default size at shared ManagedTable component
* Fixed TransactionsTable, the rows option wasn’t working, use ManagedTable
* Fix i18n
* Make hidePerPageOptions false by default
* fix snapshot
* Improvements after PR review
(cherry picked from commit ec38f00bb1)
Co-authored-by: Miriam <31922082+MiriamAparicio@users.noreply.github.com>
* updates rule indices to include indices from the enriched alert data
* quick fix for type failure
* rely on functions, not types
(cherry picked from commit 51ac9a0c89)
Co-authored-by: Devin W. Hurley <devin.hurley@elastic.co>
* Generate ECS fieldmap from ECS 8.0
This is the result of running the generate_ecs_fieldmap script against
ECS' 8.0 branch.
* Account for scaling_factor property from ECS
This is a required field for e.g. scaled_float fields, so we need to
reflect its value in our field map.
* Remove unused, unset property from FieldMap
It does not appear that this value was ever being set, nor does this
value appear in ECS' flat output, so I'm removing it for now to keep our
types as accurate as possible.
* Add path back to FieldMap definition
This is a required field for type: alias fields.
* Try upping the fields limit on our ECS component template
This now exceeds the default of 1000.
* Bump our field limit a bit more
Apparently 1300 wasn't enough, either.
* Fix type error
Makes this field optional, since the technical component template
doesn't currently use it.
* Bump the field limit of our composed template
Including the newest ECS fields, this index now exceeds 1600 fields.
This value should probably be derived from the composed template's
limits, but for now this allows the template to be created.
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
(cherry picked from commit 8737691bce)
Co-authored-by: Ryland Herrick <ryalnd@gmail.com>
* exposes additional errors when ES failures occur during the swap of old, pre-8.0 action ids with the new migrated action SO ids. Ref: https://github.com/elastic/kibana/pull/120975#discussion_r778449187 for more information
* fix test error
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
(cherry picked from commit 467d111566)
Co-authored-by: Devin W. Hurley <devin.hurley@elastic.co>
### Summary
Fix bug on rule export where toaster reports export total as being rule objects + exceptions objects, but should just be rule objects total. Adds cypress test.
(cherry picked from commit b2c9f10691)
Co-authored-by: Yara Tercero <yctercero@users.noreply.github.com>
* Fix success message to show correct language based on timeline type
* Fix translation problems
Co-authored-by: Kristof-Pierre Cummings <kristofpierre.cummings@elastic.co>
(cherry picked from commit 91a35c20ce)
Co-authored-by: Kristof C <kpac.ja@gmail.com>
* Add aliases, fix types, remove extra fields
* Update aliases version and update tests
* Update aliases version test
* Remove dangling references to fields
* Update test
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
(cherry picked from commit 886ad6fdaf)
Co-authored-by: Marshall Main <55718608+marshallmain@users.noreply.github.com>
* Move beats metadata script to timelines plugin
This is the plugin that consumes the artifacts of the script, not
security_solution.
* Remove unused beats metadata file
This file also exists in the timelines plugin, but only that one is
used.
* Update fields metadata from beats 8.0.0-rc1
This will serve as the data source for our metadata in kibana 8.0.
* Update indexFields unit tests following ECS update
8.0 introduced some textual changes to field descriptions.
* Revert "Move beats metadata script to timelines plugin"
This reverts commit cbc8e9db1a.
* Update script to modify the appropriate timelines file
This is the one used by IndexFields.
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
(cherry picked from commit 8c11be1154)
Co-authored-by: Ryland Herrick <ryalnd@gmail.com>