Commit graph

19428 commits

Author SHA1 Message Date
Vadim Yakhin a7fd3deb73
[Workplace Search] Fix early sources logic unmounting (#113023)
* Fix error appearing if user leaves Sources page very quickly

The issue was that the response from /sources endpoint could came after the user has left the page.
Since the user has already left the page, the Sources logic is unmounted,
and any code that was using the response couldn't update the value in that logic file and caused an error.

Fortunately Kea provides a `breakpoint` API exactly for such cases:
https://kea.js.org/docs/guide/additional#breakpoints

This commit uses that API to fix the issue.

* Fix error appearing after leaving Sources page less quickly

This commit solves the same problem, but for the /status endpoint:
1) for the first status call that saves server values to the sources_logic
2) for the subsequent status calls that poll the server for the status updates

* Increase test coverage

The new test duplicates the test below it, but it doesn't set up
initial source statuses. For some reason this case was considered to be covered before,
but after seemingly unrelated changes in this PR, the coverage started to show that this
code branch was missed.

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-10-30 20:48:18 +01:00
Walter Rafelsberger 2cfcb8caf9
[ML] Fix y axis ticks. (#116670)
Fixes the y axis ticks for chart variants where the maximum transaction count for overall buckets is only 1.
2021-10-30 14:51:55 +00:00
Caroline Horn 151968be4f
[Dev Tools] Design fixes for theme v8 (#116236)
* Fixed icon buttons in Console
* Quick cleanup of tabs and panels
2021-10-30 09:34:22 +00:00
Frank Hassanabad eaedb7863d
Follow up (#116860)
## 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
2021-10-29 23:39:36 -06:00
Devin W. Hurley 6817a02e0d
[Security Solution] [Platform] Fix critical bug when migrating action within update route (#116512)
* 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
2021-10-29 22:05:55 -04:00
Frank Hassanabad 57899a2f68
Removes isUuid and tests as they're not used anymore (#116848)
## 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
2021-10-29 19:33:59 -06:00
Esteban Beltran 107661129d
[Security Solution] Use useEndpointPrivileges instead of checking the license directly (#116142)
* Use useEndpointPrivileges instead of checking the license directly

* Use the correct privilege key

* rename variable

* Skips flaky test

* Remove skip

* Remove extra dependency

* Add back entries check

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-10-30 00:01:48 +01:00
Frank Hassanabad 347c138bc0
Fixes flake seen on CI by sorting the results (#116846)
## Summary

Sorting fix for flake test. Fixes: https://github.com/elastic/kibana/issues/116691

### 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
2021-10-29 23:08:13 +01:00
Esteban Beltran 5afa164ab9
[Security Solution] Fix edit not working due to state management overwrite in Host isolation exceptions (#116676)
* Fix edit not working due to state management overwrite

* clear the form after a succesfull update

* Preserve order after editing and adding
2021-10-29 23:01:14 +02:00
Cauê Marcondes 7130d6eb45
[APM] Api tests for Error distribution api (#116674)
* adding tests for error distribution

* addressing pr changes

* addressing pr comments

* fixing ts issues
2021-10-29 21:57:08 +01:00
Zacqary Adam Xeper 285cd009a5
Revert "[Metrics UI] Fix OR logic on redundant groupBy detection (#116695)" (#116820)
This reverts commit c0d005db62.
2021-10-29 16:48:15 -04:00
Zacqary Adam Xeper 4712c10f84
Revert "[Logs UI][Metrics UI] Remove deprecated config fields from APIs and SavedObjects (#115874)" (#116819)
This reverts commit 6693ef371f.
2021-10-29 16:47:54 -04:00
Ece Özalp f65485f997
[SecuritySolution][CTI] Fix preview matrix histogram query (#116328)
* [SecuritySolution][CTI] Fix preview matrix histogram query

* fixes mock

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-10-29 16:21:14 -04:00
Frank Hassanabad 023d668e13
[Security Solutions] Adds e2e tests for the legacy notification system (#116531)
## 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-29 14:02:52 -06:00
Chris Donaher 478d138c32
Send Endpoint Alert _id field up as insights docs track that on status changes (#116687)
* 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>
2021-10-29 13:47:31 -06:00
Marshall Main b59b132ff4
Remove validation requiring action id to be UUID (#116524)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-10-29 15:26:06 -04:00
Nathan Reese ee61368cff
[Maps] fix data-mapping switch enabled for vector tiles (#116366)
* clean up IField API

* disable switch when using MVTs for es docs

* clean up interface comment style

* implement supportsFieldMetaFromEs and supportsFieldMetaFromLocalData in all Field classes

* fix dynamic_color_property test

* fix jest tests

* mock getRangeFieldMeta instead of passing in VectorLayerMock with MockStyle

* review feedback

* clean up supportsFieldMetaFromLocalData test

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-10-29 12:47:58 -06:00
Paul Tavares d284d65ad4
[Security Solution][Endpoint] Fix and un-skip Jest UT for Policy Details remove trusted app modal (#116492)
* increase update API response delay
2021-10-29 14:46:30 -04:00
Paul Tavares ea1c3f2a09
Fix skipped test to be more robust in matching relative dates (#116474)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-10-29 14:40:35 -04:00
Kristof C 26ca3ffe05
[105264] Fix error not surfacing bug for Jira (#114800)
* [105264] Fix error not surfacing bug for Jira

* [105264] Fix ServiceNow errors not surfacing to UI

* Fix tests with updated functon

* Fix PR errors

Co-authored-by: Kristof-Pierre Cummings <kristofpierre.cummings@elastic.co>
2021-10-29 13:27:41 -05:00
Sandra G 62f807227b
[Stack Monitoring] Logstash Functional Tests (#116481)
* logstash overview functional test

* logstash nodes listing functional tests

* node detail tests

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-10-29 13:55:32 -04:00
Xavier Mouligneau 3f91556e67
[SECURITY] Copy saved object flyout should not allow copying into the active space (#116657)
* copy saved object flyout should not allow copying into the active space

* stupid me
2021-10-29 13:55:17 -04:00
Shahzad 45476dcbe6
[Uptime] Fix filters in query for fetching monitor attached rules (#115921)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-10-29 19:50:47 +02:00
Shahzad d4d470d938
Fix intermitting series state (#115747)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-10-29 19:50:14 +02:00
Shahzad 9714aac93c
[Exp view] Fix apply button equality check (#115744)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-10-29 19:49:30 +02:00
Melissa Alvarez 40fd867b65
[ML] Data Frame Analytics Wizard: ensure includes updated correctly on dependent variable change (#116381)
* ensure included fields not overwritten + reduce unnecessary renders.

* ensure editor validation works

* ensure depVar always in includes

* ensure selected runtimeField depVar option is shown
2021-10-29 13:48:42 -04:00
Shahzad 4492a107bd
[Alerting] Remove unnecessary call on every kibana load (#116572) 2021-10-29 19:48:25 +02:00
Spencer 05cfe434f0
[alerting] disable status reporting for now (#116717)
Co-authored-by: spalger <spalger@users.noreply.github.com>
2021-10-29 12:48:03 -05:00
Frank Hassanabad 29ac5583b7
[Security Solutions] Critical bug fix to make error messages about missing connections clearer for the end user. (#116490)
## 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
2021-10-29 11:44:38 -06:00
Nicolas Chaulet d384a2f508
[Fleet] Fix pipeline with id [*] does not exists (#116707) 2021-10-29 13:44:24 -04:00
Frank Hassanabad 83fe1dd90a
Changes log level from info to debug from user complaints about logs filling up (#116518)
## 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.
2021-10-29 11:40:08 -06:00
Nathan Reese 7c73e227eb
[Maps] convert EMS TMS source to typescript (#116508)
* [Maps] convert EMS TMS source to typescript

* eslint

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-10-29 11:33:12 -06:00
Nathan Reese 0a3cd8ebab
[Maps] do not allow label overlap (#116190)
* [Maps] do not allow label overlap

* split symbol labels into seperate layer

* clean up comments

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-10-29 11:31:04 -06:00
Madison Caldwell 6ba984eb03
Add support for actions on kibana.* fields and legacy signal.* fields (#116491)
* 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>
2021-10-29 11:29:38 -06:00
Spencer 30872e9063
remove all references to v7 theme (#113570)
Co-authored-by: spalger <spalger@users.noreply.github.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-10-29 12:28:42 -05:00
Vitalii Dmyterko b481bff349
[Security Solution][Detections] Fix truncated values in columns for rules table (#115825)
* Fix truncated rule name on rules table

* remove empty line

* remove truncateText for all rules table columns

* rename unit tests

* refactor unit tests

* fix ts error

* fix ts error

* remove config line

* fix types after kbn bootstrap

* CR: remove unnecesary tests

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-10-29 18:28:11 +01:00
Marshall Main a68f3ffd06
[Security Solution] Only apply field aliases to legacy .siem-signals indices (#115290)
* 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>
2021-10-29 13:19:54 -04:00
Tyler Smalley c4815d319e
Updates Github link references from master to main (#116789)
Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
2021-10-29 09:53:08 -07:00
Jen Huang 2194f2b93c
[Fleet] Fix branch conditions to check against main and add skip version check config option (#116530) 2021-10-29 12:47:36 -04:00
Brian Seeders ba367bca40
Change all references of master branch to main (#116654) 2021-10-29 12:29:48 -04:00
Zacqary Adam Xeper 6693ef371f
[Logs UI][Metrics UI] Remove deprecated config fields from APIs and SavedObjects (#115874)
* [Logs UI][Metrics UI] Remove deprecated config fields from APIs

* Fix typecheck

* Fix typecheck

* Fix typecheck

* Fix jest

* Fix functional test

* Remove extraneous timeField args

* Typecheck fix

* Consolidate log file changes to ResolvedLogSourceConfiguration

* Fix merge

* Revert additional logs files

* Revert inventory models

* Revert log_analysis api

* Fix timefield reference in process list

* Restore logs page files, fix typecheck on mock

* Fix functional test

* Restore inventory models index

* Fix typecheck on getFilteredMetrics

* Look CI if you don't tell me all the type errors at once I can't fix them all

* Maybe this is the last typecheck fix who knows
2021-10-29 12:12:26 -04:00
Zacqary Adam Xeper c0d005db62
[Metrics UI] Fix OR logic on redundant groupBy detection (#116695) 2021-10-29 16:07:04 +00:00
Esteban Beltran ddf092f38c
[Security Solution] Host isolation exceptions - fixes for QA issues (#116089)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-10-28 15:54:17 +00:00
Quynh Nguyen d4f4e64426
[ML] Re-enable explorer link jest test (#116324)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-10-28 15:53:05 +00:00
Xavier Mouligneau 24e5bd244c
[SECURITY] Remove flaky test on edit user page (#116467)
* no more flaky test

* fix eslint

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-10-28 11:21:53 -04:00
Cauê Marcondes 155a16ed2f
[APM] Errors api test: error_groups/main_statistics (#116337)
* use apmApiClient

* refacroting

* fixing errors groups main statistics tests

* refactoring

* fixing error group detailed stats test

* fixing ts issue

* renaming empty archiver
2021-10-28 16:20:51 +01:00
Nicolas Chaulet a23d5e29a4
[Fleet] Fix edit package policy save button (#116482) 2021-10-28 11:17:47 -04:00
Josh Dover d5963884b6
Include failure reason when packages cannot be installed during setup (#116612) 2021-10-28 15:47:26 +01:00
Gloria Hornero b102846c82
adds import Timeline test (#114703) 2021-10-28 15:34:19 +01:00
Marshall Main d280f12757
[Security Solution] Security RAC migration follow up bug fixes (#116386)
* 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>
2021-10-28 10:21:51 -04:00
Paul Tavares 2f3d4fcb48
[Security Solution][Endpoint] Fix bug where users without superuser role are not able to see Endpoint data on Host Details (#116202)
* Add `.catch()` statement to ES calls in order to get better stacktraces
* Improve efficiency of getHostEndpoint() search strategy method
* Refactor `getHostEndpoint()` to use new Metadata service as well as the internal kibana ES client
2021-10-28 15:18:50 +01:00
Paul Tavares 7c12ffffee
[Security Solution][Endpoint] Un-skip Policy Details FTR test suite and fix bug in Policy Details page when saving changes (#115662)
* unskip test suite
* Fix functional tests and some refactoring
* Refactor Policy Details test and centralize getting of Agent Policy combined input for endpoint
* Change approach for checking policy data in fleet pages
* Change Policy Settings displayed in Fleet to a) show a loader while retrieving settings and b) show loading errors if any
* Close any visible toasts before clicking on the save button
2021-10-28 15:10:32 +01:00
Oliver Gupte 2856e19db7
[APM] Adds missing legacy key for apm-server.secret_token (#116385) (#116554) 2021-10-28 09:46:41 -04:00
Frank Hassanabad b2f4c821f3
[Security Solutions] Adds console logging and relaxes the 200 checks in a 2 areas of the e2e tests (#116548)
## 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
2021-10-28 15:27:45 +02:00
Shahzad 9e7f1c8e35
[Global search] Prevent unnecessary /internal/global_search/find http call at startup (#112535)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-10-28 15:26:28 +02:00
Jean-Louis Leysens 1e88abbb31
[Reporting] Remove Boom (#116289)
* remove use of boom from info response handler; also changed unauthd response to forbidden to avoid client logging user out

* rather return 500 with err.message

* added jest tests for common cases on the info route

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-10-28 14:18:22 +01:00
Walter Rafelsberger 0f73b57cfd
[ML] Anomaly Detection: Functional tests for anomaly detection forecasts. (#116140)
Functional tests for anomaly detection forecasts.
2021-10-28 14:18:53 +02:00
Robert Oskamp 753da1ac1d
[ML] Functional tests - remove monitor cluster privilege from test role (#116581)
This PR removes the `monitor` cluster privilege from the `ft_ml_ui_extras` test role as it's no longer required by the categorization wizard and we want to stay close to the minimum set of required privileges for our test users.
2021-10-28 13:55:20 +02:00
Yulia Čech 9b14bab5dc
[ILM] Fixed skipped a11y and functional tests (#116207)
* [ILM] Fixed ILM a11y test by creating a snapshot repo that is now required in the ILM API

* [ILM] Fixed functional test by creating a snapshot repository

* [ILM] Updated the params after es client update

* [ILM] Added filtering by policy name to the a11y test to find the correct ILM policy in the list

* [ILM] Added filtering by policy name to the a11y test to find the correct ILM policy in the list

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-10-28 12:54:09 +01:00
Christos Nasikas 5338e1965f
[Cases] Fix configure cases flaky test (#116575) 2021-10-28 12:47:36 +01:00
Mark Hopkin f598c43435
[Fleet] Add missing documentation link on integrations page (#116453)
* add missing doc link

* node scripts/check_published_api_changes.js --accept
2021-10-28 12:40:33 +01:00
Quynh Nguyen 21cd11a851
[ML] Fix Transforms not retaining _meta on clone (#116206)
* [ML] Retain _meta on clone

* [ML] Fix validation on schema to only check it it's defined/not null

* [ML] Remove validation because es should handle the validation already

* Change type to unknown
2021-10-28 12:24:52 +01:00
Gloria Hornero 0e1d42d400
skips exceptions tests (#116568) 2021-10-28 12:11:36 +01:00
Dzmitry Lemechko f79b94faed
[load testing] add default package to simulation class (#116375)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-10-28 13:11:24 +02:00
Shahzad 4a92e3bc36
[Exploratory View]added loading state for metric selector (#115748)
Co-authored-by: Dominique Clarke <doclarke71@gmail.com>
2021-10-28 11:36:27 +01:00
spalger acf0426194 skip flaky suite (#89369) 2021-10-28 09:19:16 +00:00
spalger 8a34170b2f skip flaky suite (#90536) 2021-10-28 09:13:26 +00:00
spalger c760db6a01 skip flaky suite (#115307) 2021-10-28 09:08:47 +00:00
spalger 42857a4da9 skip flaky suite (#116537) 2021-10-28 09:03:16 +00:00
Frank Hassanabad 3424f94fb4
Unskips tests and fixes a few of them. (#116469)
## 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
2021-10-27 21:31:18 -06:00
Nathan L Smith cca0a082d2
e2e tests for dependencies (#116369)
Also fix a link in testing readme.

References #116290.
2021-10-27 21:07:08 -05:00
Spencer 9e6e84571f
Revert "[Canvas] By-Value Embeddables (#113827)" (#116527)
This reverts commit bacd7f91dd.

Co-authored-by: spalger <spalger@users.noreply.github.com>
2021-10-27 20:38:43 -05:00
Nicolas Chaulet ede3882e18
[Fleet] Fix back button when adding integration from multiple integrations package (#116352) 2021-10-28 01:55:23 +01:00
Joey F. Poon 4efabacd4e
[Security Solution] fix endpoint being visible after unenrolling agent (#116372)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-10-27 17:38:53 -05:00
spalger 83288af8bd skip failing suite (#72874) 2021-10-27 21:34:41 +00:00
Tiago Costa edc8f9583b
chore(NA): bump version to 8.1.0 (#116429)
* chore(NA): bump version to 8.1.0

* chore(NA): update non supported plugins

* chore(NA): update non supported plugins

* chore(NA): skip failing tests

* chore(NA): update jest snapshots

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-10-27 21:24:48 +01:00
Frank Hassanabad ae7b5a9be9
[Security Solutions] Adds bsearch service to FTR e2e tests to reduce flake, boilerplate, and technique choices (#116211)
## 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
2021-10-27 14:22:45 -06:00
Byron Hulcher c3f207a071
Revert "[App Search] Load curation settings at root /curations/ path (#115690)" (#116462) 2021-10-27 21:18:19 +01: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
Gloria Hornero 9330ea7d97
[Security Solution] Skips EQL test (#116456) 2021-10-27 09:44:03 -05:00
Gloria Hornero 6fbda831b5
unskips exceptions tests (#116149) 2021-10-27 10:04:28 -04:00
Tiago Costa bed54a9d45
skip flaky suite (#109943) 2021-10-27 14:43:03 +01:00
Felix Stürmer 34b22578d6
[Logs UI] [Metrics UI] Remove deprecated alias config entries (#115974)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-10-27 15:20:19 +02:00
Paul Tavares c566e048e8
make EndpointPrivileges object immutable (#116299) 2021-10-27 09:07:19 -04:00
Paul Tavares 8998655fcb
Fix driver to the policy details loading state (#116208) 2021-10-27 09:05:40 -04:00
Byron Hulcher 0381326ede
Retrieve search results on Relevance Tuning page whenever precision or query is changed (#116316) 2021-10-27 08:52:14 -04:00
Nathan Reese 3b3c4b2f4a
[maps] Use desaturated map tiles instead of bright map tiles by default (#116179)
* [maps] default to desaturated tiles in light mode

* fix jest and functional tests

* eslint

* update migrations version expect

* review feedback

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-10-27 06:34:07 -06:00
Dima Arnautov 37632f1798
[ML] Nodes overview for the Model Management page (#116361)
* [ML] Nodes overview for the Model Management page  (#115772)

* [ML] trained models tab

* [ML] wip nodes list

* [ML] add types

* [ML] add types

* [ML] node expanded row

* [ML] wip show memory usage

* [ML] refactor, use model_memory_limit for dfa jobs

* [ML] fix refresh button

* [ML] add process memory overhead

* [ML] trained models memory overview

* [ML] add jvm size, remove node props from the response

* [ML] fix tab name

* [ML] custom colors for the bar chart

* [ML] sub jvm size

* [ML] updates for the model list

* [ML] apply native process overhead

* [ML]add adjusted_total_in_bytes

* [ML] start and stop deployment

* [ML] fix default sorting

* [ML] fix types issues

* [ML] fix const

* [ML] remove unused i18n strings

* [ML] fix lint

* [ML] extra custom URLs test

* [ML] update tests for model provider

* [ML] add node routing state info

* [ML] fix functional tests

* [ML] update for es response

* [ML] GetTrainedModelDeploymentStats

* [ML] add deployment stats

* [ML] add spacer

* [ML] disable stop allocation for models with pipelines

* [ML] fix type

* [ML] add beta label

* [ML] move beta label

* [ML] rename model_size prop

* [ML] update tooltip header

* [ML] update text

* [ML] remove ts ignore

* [ML] update types

* remove commented code

* replace toast notification service

* remove ts-ignore

* remove empty panel

* add comments, update test subjects

* fix ts error

* update comment

* fix applying memory overhead

* Revert "fix applying memory overhead"

This reverts commit 0cf38fbead.

* fix type, remove ts-ignore

* add todo comment

(cherry picked from commit 605e9e2d3d)

* updates for the latest elasticsearch client

* hide allocated models when missing

* [ML] Update jest test mock

Co-authored-by: Quynh Nguyen <quynh.nguyen@elastic.co>
2021-10-27 11:29:57 +02:00
Shahzad 98231f45ac
[Uptime] Uptime index config using kibana.yml (#115775)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-10-27 10:15:21 +02:00
Devon Thomson 0b2dcdf408
[Controls] Dashboard Integration (#115991)
Create filters when controls change. Integrated controls on dashboard behind lab
2021-10-27 03:55:55 -04:00
Tyler Smalley 910a5cae5f skip flaky suite (#104260) 2021-10-26 22:30:55 -07:00
Chenhui Wang 306a7cb0f4
Include Files in GitHub UI (#115956) 2021-10-27 12:16:05 +08:00
Catherine Liu bacd7f91dd
[Canvas] By-Value Embeddables (#113827)
* [Canvas] Generic embeddable function (#104499)

* Created generic embeddable function

    Fixed telemetry

    Updates expression on input change

    Fixed ts errors

Store embeddable input to expression

Added lib functions

Added comments

Fixed type errors

Fixed ts errors

Clean up

Removed extraneous import

Added context type to embeddable function def

Fix import

Update encode/decode fns

Moved embeddable data url lib file

Added embeddable test

Updated comment

* Fix reference extract/inject in embeddable fn

* Simplify embeddable toExpression

* Moved labsService to flyout.tsx

* Added comment

* [Canvas] Adds Save and Return Workflow (#111411)

* [Canvas] Adds editor menu to Canvas (#113194)

* Merge existing embeddable input with incoming embeddable input (#116026)

* [Canvas] Extract and inject references for by-value embeddables (#115124)

* Extract/inject references for by-value embeddables in embeddable function

Fixed server interpreter setup

Register external functions in canvas_plugin_src plugin def

* Fixed ref name in embeddable.inject

* Fixed ts errors

* Fix missing type error

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-10-26 17:25:06 -07:00
Tyler Smalley 01292cec67 Skip failing test (#115366)
https://github.com/elastic/kibana/issues/115366

Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
2021-10-26 17:23:24 -07:00
Patryk Kopyciński 82caede4fa
[Osquery] Fix live query search doesn't return relevant results for agents (#116332) 2021-10-27 01:04:26 +01:00
Yuliia Naumenko fac628623e
[Actions] Extended ActionTypeRegistry with connector validation to validate config with secrets (#116079)
* [Actions] Extended ActionTypeRegistry with connector validation to validate config with secrets

* fixed typecheck

* added tests

* more tests

* email validation fix

* fixed typecheck

* fixed typecheck

* added tests

* fixed typecheck

* fixed test

* fixed due to comments

* fixed test

* fixed test

* fixed typecheck
2021-10-26 16:06:05 -07:00
Tiago Costa ebcc0070ba skip flaky suite (#109329)
(cherry picked from commit 21973b58a8)
2021-10-26 22:23:06 +00:00
Xavier Mouligneau 852a728229
Grant access to machine learning features when base privileges are used (#115444) 2021-10-26 18:15:44 -04:00
Tyler Smalley 1827cf2479 Skipping failing test (#84957)
Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
2021-10-26 13:58:13 -07:00