Commit graph

47678 commits

Author SHA1 Message Date
Kibana Machine 8ab0d9df04
[ci] Temporarily stop writing to Bazel remote cache (#116866) (#116879)
Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>

Co-authored-by: Tyler Smalley <tyler.smalley@elastic.co>
2021-10-30 10:07:25 +01:00
Kibana Machine 1377a7ffce
Follow up (#116860) (#116884)
## Summary

One line follow up from #116490 from @dhurley14 here: https://github.com/elastic/kibana/pull/116490#discussion_r739314768


### Checklist

- [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios

Co-authored-by: Frank Hassanabad <frank.hassanabad@elastic.co>
2021-10-30 09:28:14 +01:00
Kibana Machine b125273fce
Add support for actions on kibana.* fields and legacy signal.* fields (#116491) (#116797)
* Add support for actions on kibana.* fields and legacy signal.* fields

* Improve types and add scheduleNotificationActions test

* Unnecessary cast

* Was accidentally returning all alerts in map, instead of single alert

* Cleanup

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

Co-authored-by: Madison Caldwell <madison.rey.caldwell@gmail.com>
2021-10-30 08:03:26 +01:00
Kibana Machine 68c6c252af
[Security Solution] Host isolation exceptions - fixes for QA issues (#116089) (#116678)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

Co-authored-by: Esteban Beltran <academo@users.noreply.github.com>
2021-10-30 08:33:03 +02:00
Kibana Machine 003ad4cf0b
[Security Solution] [Platform] Fix critical bug when migrating action within update route (#116512) (#116875)
* WIP - need to figure out how to delete old siem-detection action SO's after each test

* WIP - adds some fixes for the update rules utility that differ from patch rules utility

* fix type checks

* cleanup

* remove commented out code

* rename const to use capital snake case

* naming integration tests, adds expect for disabled rules that get migrated, adds expect for pre-migrated rules

Co-authored-by: Devin W. Hurley <devin.hurley@elastic.co>
2021-10-30 05:58:30 +01:00
Kibana Machine 81608279ea
Removes isUuid and tests as they're not used anymore (#116848) (#116873)
## Summary

Removes isUuid and tests as they're not used anymore

### Checklist

Delete any items that are not applicable to this PR.
- [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios

Co-authored-by: Frank Hassanabad <frank.hassanabad@elastic.co>
2021-10-30 05:23:25 +01:00
Kibana Machine 59ce3c0cd0
Changes log level from info to debug from user complaints about logs filling up (#116518) (#116799)
## Summary

Changes detections log level from info to debug within the detection engine. Users have been complaining about their log files filling up in excessive size from when they have noisy rules or if they have a large amount of rules enabled.

Co-authored-by: Frank Hassanabad <frank.hassanabad@elastic.co>
2021-10-30 05:04:56 +01:00
Melissa Alvarez cfb6b80aea
[ML] Data Frame Analytics Wizard: ensure includes updated correctly on dependent variable change (#116381) (#116805)
* ensure included fields not overwritten + reduce unnecessary renders.

* ensure editor validation works

* ensure depVar always in includes

* ensure selected runtimeField depVar option is shown

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-10-30 03:04:34 +01:00
Frank Hassanabad 26870b7647
[Security Solutions] Adds e2e tests for the legacy notification system (#116531) (#116870)
## Summary

Adds e2e tests for the legacy notification system for:
* Exporting rules
* Reading rules
* Finding rules

Also adds missing e2e tests for the non-legacy actions where they previously did not have e2e tests.

These tests ensure that the legacy notifications system will run for a while.

- [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
2021-10-30 03:02:37 +01:00
Kibana Machine 4600dbc5d2
Send Endpoint Alert _id field up as insights docs track that on status changes (#116687) (#116842)
* Send Endpoint Alert _id field up as insights docs track that on status changes

* Added test to make sure top-level underscore-prefixed fields are allowed

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

Co-authored-by: Chris Donaher <christopher.donaher@elastic.co>
2021-10-30 02:14:19 +01:00
Kibana Machine ad33c8739d
Upgrade cheerio dependency (1.0.0-rc.91.0.0-rc.10). (#116737) (#116826)
Co-authored-by: Aleh Zasypkin <aleh.zasypkin@gmail.com>
2021-10-30 02:10:22 +01:00
Kibana Machine 539f376bcc
Remove validation requiring action id to be UUID (#116524) (#116836)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

Co-authored-by: Marshall Main <55718608+marshallmain@users.noreply.github.com>
2021-10-30 01:54:05 +01:00
Kibana Machine 07e4ff5994
[Security Solution] Security RAC migration follow up bug fixes (#116386) (#116651)
* Add compatibility aliases to alerts as data indices

* Fix dupe mitigation, allow more fields in mapping

* Remove legacy signals fields from new RAC alerts

* Fix cypress test

* Remove outdated comment

* Reduce flakiness in time based test

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

Co-authored-by: Marshall Main <55718608+marshallmain@users.noreply.github.com>
2021-10-29 20:52:21 -04:00
Marshall Main af7bfa222e
[Security Solution] Only apply field aliases to legacy .siem-signals indices (#115290) (#116838)
* Only apply field aliases to legacy .siem-signals indices

* Fix unit test mocks

* Add new function for special index existence check

* Actually add new function for special index existence check

* Undo getIndexVersion change

* Add basic integration tests for field alias logic

* Add back create_index to test list

* Add missing markdown to readme

* Revert change to delete_index_route

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-10-30 01:51:51 +01:00
Andrea Del Rio 7f472f4dbc
[Controls] Post integration design cleanup (#116511) (#116857) 2021-10-30 01:22:49 +01:00
Kibana Machine 3911490502
[saved objects] Strip version qualifier in SO service to fix unknown type deprecations. (#116480) (#116858)
Co-authored-by: Luke Elmers <luke.elmers@elastic.co>
2021-10-30 01:13:19 +01:00
Kibana Machine 91b28f3351
[SECURITY] Copy saved object flyout should not allow copying into the active space (#116657) (#116817)
* copy saved object flyout should not allow copying into the active space

* stupid me

Co-authored-by: Xavier Mouligneau <189600+XavierM@users.noreply.github.com>
2021-10-30 00:46:30 +01:00
Kibana Machine ddc85d95b1
[Security Solution] Fix edit not working due to state management overwrite in Host isolation exceptions (#116676) (#116855)
* Fix edit not working due to state management overwrite

* clear the form after a succesfull update

* Preserve order after editing and adding

Co-authored-by: Esteban Beltran <academo@users.noreply.github.com>
2021-10-30 00:40:59 +01:00
Kibana Machine e4c93a87a0
[Security Solutions] Critical bug fix to make error messages about missing connections clearer for the end user. (#116490) (#116803)
## Summary

Fixes issue see on this comment:
https://github.com/elastic/kibana/issues/116336#issuecomment-952159636

* Removes legacy toaster component
* Adds newer toaster component
* Removes issue with the deps array within ReactJS
* Adds utility to give a better network error message to the end user.
* This does effect the timeline component since it shares the same import common component.
* Adds a count of how many rules/timeline items have failed imports
* These error toasters mimic Kibana core's error toaster error message and UI/UX
* Adds e2e tests for imports with actions and error messages for them.

## Rules import error messages now

Before for small toaster:
<img width="417" alt="Screen Shot 2021-10-26 at 6 03 25 PM" src="https://user-images.githubusercontent.com/1151048/139132586-3cf77c73-53ac-4066-b01f-2e91ef2da111.png">

After for small toaster for different error conditions:
<img width="358" alt="Screen Shot 2021-10-26 at 6 00 24 PM" src="https://user-images.githubusercontent.com/1151048/139132679-2eeb1ed3-9f6e-4766-a8ed-8804ce3e6963.png">

<img width="396" alt="Screen Shot 2021-10-26 at 6 01 00 PM" src="https://user-images.githubusercontent.com/1151048/139132742-750cd937-f401-44e8-9a10-c21410073b5d.png">

<img width="379" alt="Screen Shot 2021-10-26 at 6 02 29 PM" src="https://user-images.githubusercontent.com/1151048/139132766-21b58bea-7f46-43a6-a0e9-f01632958eab.png">

Before for when you click "See the full error":
<img width="817" alt="Screen Shot 2021-10-26 at 5 58 47 PM" src="https://user-images.githubusercontent.com/1151048/139132980-de1942d6-7b03-4c08-b34a-1fc4a22d5207.png">

After for when you click "See the full error":
<img width="838" alt="Screen Shot 2021-10-27 at 1 48 16 PM" src="https://user-images.githubusercontent.com/1151048/139136581-af1e331e-ed77-4338-8fb0-c2457acd135f.png">

<img width="802" alt="Screen Shot 2021-10-27 at 1 26 31 PM" src="https://user-images.githubusercontent.com/1151048/139135083-9ca56940-30a8-4f83-9355-312307172834.png">

## timeline

Before:
<img width="441" alt="Screen Shot 2021-10-27 at 1 19 00 PM" src="https://user-images.githubusercontent.com/1151048/139136614-8360d6a6-d182-413e-b5d9-b18e3d70dc24.png">

<img width="827" alt="Screen Shot 2021-10-27 at 1 19 08 PM" src="https://user-images.githubusercontent.com/1151048/139136637-f9203ac2-0eea-4a77-9c53-ac2c20ab32e0.png">

After:
<img width="408" alt="Screen Shot 2021-10-27 at 1 49 45 PM" src="https://user-images.githubusercontent.com/1151048/139136758-7532a8ba-6d73-45e2-adbb-6756ee997289.png">

<img width="820" alt="Screen Shot 2021-10-27 at 1 49 50 PM" src="https://user-images.githubusercontent.com/1151048/139136774-26d4a8a2-caf0-4c6f-94d3-a6cd92b79f5f.png">

### Checklist

- [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios

Co-authored-by: Frank Hassanabad <frank.hassanabad@elastic.co>
2021-10-29 23:57:09 +01:00
Kibana Machine 4e9b77906c
[Fleet] Fix branch conditions to check against main and add skip version check config option (#116530) (#116787) 2021-10-29 15:32:25 -04:00
Tyler Smalley 69cb2d3e2c
Updates Github link references from master to main (#116789) (#116791)
Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
# Conflicts:
#	.github/ISSUE_TEMPLATE/v8_breaking_change.md
#	.github/PULL_REQUEST_TEMPLATE.md
2021-10-29 10:07:44 -07:00
Kibana Machine 1cf36dc757
[docs] Fix anchor link to saved objects migrations testing (#116427) (#116570)
Co-authored-by: Rudolf Meijering <skaapgif@gmail.com>
2021-10-29 19:07:15 +02:00
Kibana Machine 596a27027b
Add stale bot for APM issues (#116432) (#116569)
* Add stale bot for APM issues

* Update stale.yml

* Update stale.yml

Co-authored-by: Søren Louv-Jansen <soren.louv@elastic.co>
2021-10-29 07:16:05 +02:00
Lisa Cawley 2424ff2879
Reverts client URLs in doc link service (#116712) 2021-10-28 15:29:57 -07:00
Lisa Cawley 05367cbea4
Fixes client URLs in doc link service (#116525) 2021-10-28 12:07:37 -07:00
Frank Hassanabad 2add12fa65
[Security Solutions] Adds bsearch service to FTR e2e tests to reduce flake, boilerplate, and technique choices (#116211) (#116514)
## Summary

Fixes flake tests of:
https://github.com/elastic/kibana/issues/115918
https://github.com/elastic/kibana/issues/103273
https://github.com/elastic/kibana/issues/108640
https://github.com/elastic/kibana/issues/109447
https://github.com/elastic/kibana/issues/100630
https://github.com/elastic/kibana/issues/94535
https://github.com/elastic/kibana/issues/104260

Security solution has been using `bsearch` and has encountered flake in various forms. Different developers have been fixing the flake in a few odd ways (myself included) which aren't 100%. This PR introduces a once-in-for-all REST API retry service called `bsearch` which will query `bsearch` and if `bsearch` is not completed because of async occurring due to slower CI runtimes it will continuously call into the `bsearch` with the correct API to ensure it gets a complete response before returning.


## Usage

Anyone can use this service like so:
```ts
const bsearch = getService('bsearch');
const response = await bsearch.send<MyType>({
 supertest,
 options: {
   defaultIndex: ['large_volume_dns_data'],
}
  strategy: 'securitySolutionSearchStrategy',
});
```

If you're using a custom auth then you can set that beforehand like so:
```ts
const bsearch = getService('bsearch');
const supertestWithoutAuth = getService('supertestWithoutAuth');
const supertest supertestWithoutAuth.auth(username, password);
const response = await bsearch.send<MyType>({
 supertest,
 options: {
   defaultIndex: ['large_volume_dns_data'],
  }
  strategy: 'securitySolutionSearchStrategy',
});
```

## Misconceptions in the tests leading to flake
* Can you just call the bsearch REST API and it will always return data first time? Not always true, as when CI slows down or data increases `bsearch` will give you back an async reference and then your test will blow up.
* Can we wrap the REST API in `retry` to fix the flake? Not always but mostly true, as when CI slows down or data increases `bsearch` could return the async version continuously which could then fail your test. It's also tedious to tell everyone in code reviews to wrap everything in `retry` instead of just fixing it with a service as well as inform new people why we are constantly wrapping these tests in `retry`.
* Can we manually parse the `bsearch` if it has `async` for each test? This is true but is error prone and I did this for one test and it's ugly and I had issues as I have to wrap 2 things in `retry` and test several conditions. Also it's harder for people to read the tests rather than just reading there is a service call. Also people in code reviews missed where I had bugs with it. Also lots of boiler plate.
* Can we just increase the timeout with `wait_for_completion_timeout` and the tests will pass for sure then? Not true today but maybe true later, as this hasn't been added as plumbing yet. See this [open ticket](https://github.com/elastic/kibana/issues/107241). Even if it is and we increase the timeout to a very large number bsearch might return with an `async` or you might want to test the `async` path. Either way, if/when we add the ability we can increase it within 1 spot which is this service for everyone rather than going to each individual test to add it. If/when it's added if people don't use the bsearch service we can remove it later if we find this is deterministic enough and no one wants to test bsearch features with their strategies down the road.

## Manual test of bsearch service
If you want to manually watch the bsearch operate as if the CI system is running slow or to cause an `async` manually you manually modify this setting here:
https://github.com/elastic/kibana/blob/master/src/plugins/data/server/search/strategies/ese_search/request_utils.ts#L61

To be of a lower number such as `1ms` and then you will see it enter the `async` code within `bsearch` consistently

## Reference PRs
We cannot set the wait_for_complete just yet
https://github.com/elastic/kibana/issues/107241 so we decided this was the best way to reduce flake for testing for now. 

### Checklist

- [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-10-28 12:09:42 -06:00
Kibana Machine 649f467aa3
Unskips tests and fixes a few of them. (#116469) (#116551)
## Summary

* For the test of `create_endpoint_exceptions.ts` code was changed to try to reduce/remove flake. I put the code back to where it was and with the sorting introduced it all should pass
* Added `await waitForSignalsToBePresent(supertest, 1, [id]);` to areas of code that were missing.
* The `.flat` should be an added layer of protection for flakes.


### Checklist

- [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios

Co-authored-by: Frank Hassanabad <frank.hassanabad@elastic.co>
2021-10-28 12:09:30 -06:00
Kibana Machine a4e92ad770
[Security Solutions] Adds console logging and relaxes the 200 checks in a 2 areas of the e2e tests (#116548) (#116629)
## Summary

Adds console logging and relaxes a few 200 checks in the end to end tests in two areas of:
* createExceptionListItem
* importFile

As recently the tests are failing around these parts and possibly we can get information on the next failures if it is from these two areas or if it's from somewhere else we are not expecting.

Also outputs the body message so if it fails in these areas we can see the message with the conflict that might help us see where the issue is arising.

### Checklist

- [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios

Co-authored-by: Frank Hassanabad <frank.hassanabad@elastic.co>
2021-10-28 12:09:09 -06:00
Jonathan Budzenski 9e2bda7450 skip failing suite. #116522 2021-10-28 12:16:07 -05:00
Jonathan Budzenski 714b007247 skip failing suite. #102283 2021-10-28 12:13:18 -05:00
Jonathan Budzenski 234692fa51 skip failing suite. #116510 2021-10-28 12:08:41 -05:00
Kibana Machine b27ef965b4
[SECURITY] Remove flaky test on edit user page (#116467) (#116672)
* no more flaky test

* fix eslint

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

Co-authored-by: Xavier Mouligneau <189600+XavierM@users.noreply.github.com>
2021-10-28 12:32:50 -04:00
Gloria Hornero 3e388b42c9
skips exceptions tests (#116568) (#116614) 2021-10-28 14:53:44 +02:00
spalger 68be5c2e6d skip flaky suite (#89369)
(cherry picked from commit acf0426194)
2021-10-28 09:19:47 +00:00
Jonathan Budzenski c4dd10165f
[8.0] Remove .github folder (#116550)
This is only used on main
2021-10-27 21:15:08 -07:00
Jonathan Budzenski b30e126e76
[8.0] Remove renovate.json5 (#116549) 2021-10-27 21:37:50 -05:00
Tiago Costa 5cec00ed91
skip flaky suite (#116059) 2021-10-28 03:14:38 +01:00
Tyler Smalley 8f11ce8c7c Remove CODEOWNERS
Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
2021-10-27 15:58:20 -07:00
Kibana Machine e25d8a403e
[8.0] [ci] bump timeout for cigroups until we figure out the slowdown (#116506) (#116507)
Co-authored-by: spalger <spalger@users.noreply.github.com>
Co-authored-by: Spencer <email@spalger.com>
2021-10-27 17:08:20 -05:00
spalger 94ac24692f skip failing suite (#72874)
(cherry picked from commit 83288af8bd)
2021-10-27 21:36:46 +00:00
Kibana Machine ea5d0de514
chore(NA): adds backport config for 8.1.0 bump (#116431) (#116498)
Co-authored-by: Tiago Costa <tiagoffcc@hotmail.com>
2021-10-27 21:35:52 +01:00
Tiago Costa 8ef85def71
chore(NA): change branch from master to 8.0 2021-10-27 21:23:54 +01:00
Byron Hulcher c3f207a071
Revert "[App Search] Load curation settings at root /curations/ path (#115690)" (#116462) 2021-10-27 21:18:19 +01:00
Gloria Hornero 136d322bdd
adds lists plugin to security solution cypress tests execution (#116442) 2021-10-27 20:55:55 +01:00
Kaarina Tungseth bd2a7cefa5
[DOCS] Fixes monitoring setting (#116309) 2021-10-27 13:42:11 -05:00
Tyler Smalley 017fcac4b9
Removes functional tests using freeze API (#116373)
Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
2021-10-27 10:53:07 -07:00
Nick Partridge 6b4d9dd1a9
[Charts] Multi-layer time axis (#115853)
This commit introduces the multi-layer time axis in Discover, Lens, Visualize, TSVB.
It adds visualization:useLegacyTimeAxis advanced settings under charts plugin to toggle legacy time axis.

The new multi-layer time axis is introduced in @elastic/charts https://elastic.github.io/elastic-charts/?path=/story/area-chart--timeslip and was demoed as part of the Kibana Demo Days.

It is the outcome of the research done in elastic/elastic-charts#1310 related to improving the time axis solving the following problems:
- sparse time labels that can be far apart
- unclear where time point is on the label (the middle)
- difficult / tedious to read due to redundant information and small fonts
- resolution is not explicit (is it hours of days or days themselves)
2021-10-27 19:22:35 +02:00
Rudolf Meijering e0fe09607f
Unskip migrations actions integration tests (#116285) 2021-10-27 19:11:08 +02:00
spalger d6f9adf73a skip flaky suite (#116463) 2021-10-27 16:29:41 +00:00
Luke Elmers 4be1d8f438
[docs] Re-add experimental label to dashboard import/export API docs. (#116348) 2021-10-27 08:46:53 -06:00