Commit graph

48077 commits

Author SHA1 Message Date
Jonathan Budzenski eb9c8692aa
[dev docs] Add WSL setup guide (#109670)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-11-09 20:12:35 -05:00
Lukas Olson ed19a9c1a9
[data.search] Remove warning toast (#117252)
* [data.search] Remove toast notification for warnings

* Update docs

* Review feedback

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-11-09 16:31:01 -07:00
Tyler Smalley 5ffec0bd2c Skip failing test
Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
2021-11-09 14:17:23 -08:00
Tyler Smalley 21ba17d801
[docs] Use inspect-brk instead of debug-brk (#118108)
Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
2021-11-09 13:56:06 -08:00
Nathan L Smith 14f6d23922
API test for upstream services and service dependencies (#116722) 2021-11-09 15:28:00 -06:00
Candace Park 7d27afeabd
[Security Solution][Endpoint][Admin] Update empty state description text (#117917) 2021-11-09 15:51:24 -05:00
Tyler Smalley d6de4b570b
[ci] Cleanup Bazel cache config (#118070)
Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
2021-11-09 20:32:29 +00:00
Tyler Smalley 994a4e44f1 [kbn/io-ts] fix direct import
Conflict between https://github.com/elastic/kibana/pull/117958 and https://github.com/elastic/kibana/pull/115145

Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
2021-11-09 12:10:19 -08:00
Tyler Smalley 139a3c9866
[ci] Run Jest tests in parallel (#117188)
Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
2021-11-09 11:25:25 -08:00
Brian Seeders 195e5bebcb
[CI] Add firefox and accessibility tasks to the flaky test suite runner (#118036) 2021-11-09 19:24:36 +00:00
Vitalii Dmyterko d1d5e79398
[Security Solution][Detections] Improves Table UI (consistent dates) (#117643)
[Security Solution][Detections] Improves Table UI (consistent dates) (#117643)

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-11-09 19:04:54 +00:00
Thomas Neirynck b122a23d04
[Fleet] Show callout when EPR unavailable (#117598) 2021-11-09 14:00:27 -05:00
Spencer 4e443cca4f
[kbn/io-ts] export and require importing individual functions (#117958) 2021-11-09 11:42:39 -07:00
Esteban Beltran 29148d3ed7
[Security Solution] Fix/host isolation exceptions header (#118041)
* Copy changes for host isolation exceptions form

* Fix hasDataToShow condition to show search bar and header

* Remove copy changes from other branch
2021-11-09 19:35:37 +01:00
Gloria Hornero 92e462c5e1
adds 'sec-eng-prod' as owners from some of the security solution cypress tests (#118055)
Co-authored-by: Gloria Hornero <gloria.hornero@elastic.co>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-11-09 12:28:15 -06:00
Tiago Costa 27f5ff326d
chore(NA): moves disk_cache and repository_cache bazel flags from common to specific commands (#118037) 2021-11-09 18:24:43 +00:00
Esteban Beltran 13d651bf62
[Security Solution] Copy changes for host isolation exceptions form (#118021) 2021-11-09 18:13:53 +00:00
Nicolas Chaulet 54fe3c580e
[Fleet] Move settings to their own tab (#117919) 2021-11-09 13:09:00 -05:00
Marco Liberati 2f171fbd00
[Lens] Reference line: fix overlapping areas (#117722)
* 🐛 Fix bug with overlap

*  Add tests

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-11-09 19:01:39 +01:00
Anton Dosov 3789b4ba54
unskip copy to space test (#118005) 2021-11-09 19:01:11 +01:00
Pete Hampton d1ebdf17de
Update telemetry filter list for Security Solution (#117995)
* Add failing test condition.

* implement filter list condition.
2021-11-09 12:42:47 -05:00
Marco Vettorello 687b97b7e4
[heatmap] Fix x time scale with calendar intervals (#117619)
The commit fixes the Lens heatmap time axis when used with calendars time intervals in date_histogram aggs
2021-11-09 18:41:48 +01:00
Candace Park f343870495
[Security Solution][Endpoint][Policy] Automate policy tests (#117741) 2021-11-09 12:14:58 -05:00
Madison Caldwell c44dd6e701
[Security Solution][RAC] Threshold Rule Fixes (#117571)
* Remove unused code

* Fix threshold field refs

* Fix import

* UI fixes for Rules

* Threshold Cypress test fixes

* Type fixes

* Threshold signal test fixes

* Handle legacy schema optionally

* Fix threshold integration test

* More test fixes
2021-11-09 11:58:20 -05:00
Devon Thomson 56bfd0e53d
[Dashboard] [Functional Tests] Unskip by value Example (#116513)
* Unskip dashboard by value example tests
2021-11-09 11:43:09 -05:00
Garrett Spong 32f75a47ab
[SecuritySolution][Detections] Fixes rule status migration when alertId is not a string (#117962)
## Summary

Resolves https://github.com/elastic/kibana/issues/116423, and adds an e2e test catching this behavior as we can't test via the migration test harness since the `siem-detection-engine-rule-status` SO isn't exposed within the SO Manager UI.

Also adds note with regards to changes necessary once core issue https://github.com/elastic/kibana/issues/115153 is resolved. See https://github.com/elastic/kibana/pull/114585/files#r729620927. Note: existing `find_statuses`/`find_rules` integration tests will fail once fixed, so no additional tests necessary. 



### 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-11-09 09:24:06 -07:00
CJ Cenizal 69c0e6c601
Improve Clean Repository error message. (#117947) 2021-11-09 08:00:39 -08:00
Marco Liberati 90395c5589
[Lens] Improve outside label placement for pie/donut charts (#115966)
* 🐛 Shrink pie/donut chart to allow more space for tiny slices

*  Add unit tests

*  Handler for small slices in Visualize pie

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-11-09 16:58:55 +01:00
Xavier Mouligneau c32191007d
[SECURITY] Remove flakiness on SpacesPopoverList renders a search box (#117888)
* wip to figure out flakyness

* clean up

* fix types

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-11-09 10:53:12 -05:00
Xavier Mouligneau 09523079c1
fix flaky test + bug (#117953) 2021-11-09 10:52:38 -05:00
Sébastien Loix 4bedc1cd93
[Runtime field editor] Improve error handling (#109233) 2021-11-09 15:51:52 +00:00
Yuliia Naumenko 903df6d80e
[Alerting][Telemetry] Reverted type changes for throttle_time and schedule_time with adding a proper new number fields (#117805)
* [Alerting][Telemetry] Rverted type changes for throttle_time and schedule_time with adding a new number fields

* fixed types

* fixed types

* fixed due to comments

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-11-09 07:50:44 -08:00
Brian Seeders 55b4944109 skip flaky suite (#100570) 2021-11-09 10:47:34 -05:00
Jonathan Budzenski c7c759f2f8
[build] Add download cloud dependencies task (#117227)
* [build] Add download cloud dependencies task

This adds a task to download filebeat and metricbeat for use in building
our cloud image.  Previously, these were run using local artifacts added
by the release manager.  As we transition towards building our own releasable
artifacts, we need to be able to fetch these dependencies at build time.

This includes argument changes to the build command:

- Docker cloud images are built by default, to skip add
`--skip-docker-cloud`.  `--docker-cloud` has been removed to be
consistent with other arguments.
- Artifacts are downloaded by default, to use local artifacts add
`--skip-cloud-dependencies-download`

* fix checks

* build cloud image with ci:deploy-cloud

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-11-09 08:55:09 -06:00
Kaarina Tungseth df71a4e872
[DOCS] Removes coming tag from 8.0.0-beta1 release notes (#117045) 2021-11-09 08:41:19 -06:00
Dominique Clarke 502db21a3d
[Uptime] Ping redirects - add retry logic (#117363)
* add retry logic and focus test

* unfocus tests

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-11-09 09:16:29 -05:00
Cauê Marcondes df0d9a6959
[APM] Trace waterfall is visually broken (#117589)
* fixing accordion

* fixing trace waterfall

* removing import

* fixing test

* addressing pr changes

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-11-09 09:03:14 -05:00
Dominique Clarke a815bd271a
[User Experience] add title to UX data view (#117859)
* add title to UX data view

* update useDataView
2021-11-09 09:03:00 -05:00
Diana Derevyankina c48ef8a0ab
[Vega] Debounce duplicate error messages (#116408)
* [Vega] Debounce duplicate error messages

* Update filter logic to avoid errors

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-11-09 16:59:00 +03:00
Ignacio Rivas 8819bd8fae
[Upgrade Assistant] Forwardport from 7.x (#114966)
* Fix link to Cloud deployment URL in upgrade step. (#109528)

* [Upgrade Assistant] Refactor CITs

* Rename UA steps to fix_issues_step and fix_logs_step. (#109526)

* Rename tests accordingly.

* [Upgrade Assistant] Cleanup scss (#109524)

* [Upgrade Assistant] Update readme (#109502)

* Add "Back up data" step to UA (#109543)

* Add backup step with static content and link to Snapshot and Restore.
* Add snapshot_restore locator.
* Remove unnecessary describe block from Upgrade Step tests.
* Remove unused render_app.tsx.

* Change copy references of 'deprecation issues' to 'deprecation warnings'. (#109963)

* [Upgrade Assistant] Address design feedback for ES deprecations page (#109726)

* [Upgrade Assistant] Add checkpoint feature to Overview page (#109449)

* Add on-Cloud state to Upgrade Assistant 'Back up data' step (#109956)

* [Upgrade Assistant] Refactor external links to use locators (#110435)

* [Upgrade Assistant] Use AppContext for services instead of KibanaContext (#109801)

* Remove kibana context dependency in favour of app context

* Add missing type to ContextValue

* Fix mock type

* Refactor app mount flow and types

* Refactor to use useServices hook

* Fix linter issues

* Keep mount_management_section and initialize breadcrumbs and api there

* Remove useServices and usePlugins in favour of just useAppContext

* Remove unnecessary mocks

* [Upgrade Assistant] Enable functional and a11y tests (#109909)

* [Upgrade Assistant] Remove version from UA nav title (#110739)

* [Upgrade Assistant] New Kibana deprecations page (#110101)

* Use injected lib.handleEsError instead of importing it in Upgrade Assistant API route handlers. (#111067)

* Add tests for UA back up data step on Cloud (#111066)

* Update UA to consume snapshotsUrl as provided by the Cloud plugin. (#111239)

* Skip flaky UA Backup step polling test.

* [Upgrade Assistant] Refactor kibana deprecation service mocks (#111168)

* [Upgrade Assistant] Remove unnecessary EuiScreenReaderOnly from stat panels (#111518)

* Remove EuiScreenReaderOnly implementations

* Remove unused translations

* Remove extra string after merge conflict

* Use consistent 'issues' and 'critical' vs. 'warning' terminology in UA. (#111221)

* Refactor UA Overview to support step-completion (#111243)

* Refactor UA Overview to store step-completion state at the root and delegate step-completion logic to each step component.
* Add completion status to logs and issues steps

* [Upgrade Assistant] External links with checkpoint time-range applied (#111252)

* Bound query around last checkpoint date

* Fix tests

* Also test discover url contains search params

* Small refactor

* Keep state about lastCheckpoint in parent component

* Remove space

* Address CR changes

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

* [Upgrade Assistant] Tests for updating step state accordingly if API poll receives count followed by error (#111701)

* Add test for logs count polling

* Test when count api fails

* [Upgrade Assistant] Add a11y tests for es deprecation flyouts (#110843)

* [Upgrade Assistant] Set fix_logs step as incomplete if log collection is not enabled (#111827)

* set step as incomplete if toggle is disabled

* Fix test names

* Remove unnecessary mocks

* [Upgrade Assistant] Update copy to use "issues" instead of "warnings" (#111817)

* Create common deprecation issues panel component in UA (#111231)

* Refine success state behavior and add tests.
* Refactor components into a components directory.
* Refactor SCSS to colocate styles with their components.
* Refactor tests to reduce boilerplate and clarify conditions under test.

* [Upgrade Assistant] Fix Kibana deprecations warning message

* [Upgrade Assistant] Add support for API keys when reindexing (#111451)

* [Upgrade Assistant] Update readme (#112154)

* [Upgrade Assistant] Make infra plugin optional (#111960)

* Make infra plugin optional

* Fix CR requests

* [Upgrade Assistant] Improve flyout information architecture (#111713)

* Make sure longstrings inside flyout body are text-wrap

* Show resolved badge for reindex flyout and row

* Finish off rest of ES deprecation flyouts

* Refactor deprecation badge into its own component

* Add tests for kibana deprecations

* Add tests for es deprecations

* Also check that we have status=error before rendering error callout

* Check for non-complete states instead of just error

* Small refactor

* Default deprecation is not resolvable

* Add a bit more spacing between title and badge

* Address CR changes

* Use EuiSpacer instead of flexitems

* [Upgrade Assistant] Update readme (#112195)

* [Upgrade Assistant] Add integration tests for Overview page (#111370)

* Add a11y tests for when overview page has toggle enabled

* Add functional and accessibility tests for overview page

* Load test files

* Fix linter error

* Navigate before asserting

* Steps have now completion state

* Remove duped word

* Run setup only once, not per test

* Address CR changes

* No need to renavigate to the page

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

* [Upgrade Assistant] Add note about compatibility headers (#110469)

* Improve error states for Upgrade Assistant deprecation issues (#112457)

* Simplify error state for deprecation issues panels. Remove <EsStatsError />.

* Rename components from stats -> panel.

* Create common error-reporting component for use in both Kibana and ES deprecations pages.
* Align order of loading, error, and success states between these pages.
* Change references to 'deprecations' -> 'deprecation issues'.

* Fix tests for panels.

* Add API integration test for handling auth error.

* Fix TS errors.

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

* Change count poll time to 15s (#112669)

* [Upgrade Assistant] Add permissions check to logs step (#112420)

* [Upgrade Assistant] Refactor telemetry (#112177)

* [Upgrade Assistant] Check for ML upgrade mode before enabling flyout actions (#112555)

* Add missing error handlers for deprecation logging route (#113109)

* [Upgrade Assistant] Batch reindex docs (#112960)

* [UA] Added batch reindexing docs link to the ES deprecations page. Added a link from "batch reindexing" docs page to "start or resume reindex" docs page and from there to ES reindexing docs page. Also renamed "reindexing operation" to "reindexing task" for consistency.

* [Upgrade Assistant] Added docs build files

* Update x-pack/plugins/upgrade_assistant/public/application/components/es_deprecations/es_deprecations.tsx

Co-authored-by: James Rodewig <40268737+jrodewig@users.noreply.github.com>

* Update x-pack/plugins/upgrade_assistant/public/application/components/es_deprecations/es_deprecations.tsx

Co-authored-by: James Rodewig <40268737+jrodewig@users.noreply.github.com>

* [Upgrade Assistant] Added review suggestions and fixed eslint issues

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

* [Upgrade Assistant] Improve error messages for GET /api/upgrade_assistant/reindex/<index> (#112961)

* Add support for single manual steps to Upgrade Assistant. (#113344)

* Revert "[Upgrade Assistant] Refactor telemetry (#112177)" (#113665)

This reverts commit 991d24bad2.

* [Upgrade Assistant] Use skipFetchFields when creating the indexPattern in order to avoid errors if index doesn't exist (#113821)

* Use skipFetchFields when creating the indexPatter in order to avoid errors when index doesnt exist

* Address CR feedback

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

* [Upgrade Assistant] Hide system indices from es deprecations list (#113627)

* Refactor reindex routes into separate single and batch reindex files. Apply version precheck to batch routes. (#113822)

* [Upgrade Assistant] Remove ML/Watcher logic (#113224)

* Add show upgrade flag to url (#114243)

* [Upgrade Assistant] Delete deprecation log cache (#114113)

* [Upgrade Assistant] Add upgrade system indices section (#110593)

* [Upgrade Assistant] Reindexing progress (#114275)

* [Upgrade Assistant] Added reindexing progress in % to the reindex flyout and es deprecations table

* [Upgrade Assistant] Renamed first argument in `getReindexProgressLabel` to `reindexTaskPercComplete` for consistency

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

* [Upgrade Assistant] Remove Fix manually heading when there are no manual steps

* Add rolling upgrade interstitials to UA (#112907)

* Refactor FixLogsStep to be explicit in which props are passed to DeprecationLoggingToggle.

* Centralize error-handling logic in the api service, instead of handling it within each individual API request. Covers:
- Cloud backup status
- ES deprecations
- Deprecation logging
- Remove index settings
- ML
- Reindexing

Also:
- Handle 426 error state and surface in UI.
- Move ResponseError type into common/types.

* Add note about intended use case of status API route.

* Add endpoint dedicated to surfacing the cluster upgrade state, and a client-side poll.

* Merge App and AppWithRouter components.

* [Upgrade Assistant] Added "accept changes" header to the warnings list in the reindex flyout (#114798)

* Refactor kibana deprecation tests (#114763)

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

* Fix linter issues

* Remove unused translation

* Prefer master changes over 7.x for ml docs

* Prefer master changes over 7.x

* Skip tests

* Move everything to a single describe

* Fix types

* Add missing prop to mock

* [Upgrade Assistant] Removed "closed index" warning from reindex flyout (#114861)

* [Upgrade Assistant] Removed "closed index" warning that reindexing might take longer than usual, which is not the case

* [Upgrade Assistant] Also deleted i18n strings that are not needed anymore

* Add LevelIconTips to be more explicit about the difference between critical and warning issues. (#115121)

* Extract common DeprecationFlyoutLearnMoreLink component and change wording to 'Learn more'. (#115117)

* [Upgrade Assistant] Reindexing cancellation (#114636)

* [Upgrade Assistant] Updated the reindexing cancellation to look less like an error

* [Upgrade Assistant] Fixed an i18n issue and updated a jest snapshot

* [Upgrade Assistant] Updated cancelled reindexing state with a unified label and cross icon

* [Upgrade Assistant] Fixed snapshot test

* [Upgrade Assistant] Updated spacing to the reindex cancel button

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

* Fix test errors (#115183)

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

* [Upgrade Assistant] Overview page UI clean up (#115258)

- Scaling down deprecation issue panel title size to flow with typographic hierarchy.
- Removing panel around deprecation logging switch to reduce visual elements.
- Using success instead of green color for migration complete message.

* Revert "Revert "[Upgrade Assistant] Refactor telemetry (#112177)" (#113665)" (#114804)

This reverts commit c385d49887.
* Add migration to remove obsolete attributes from telemetry saved object.
* Refactor UA telemetry constants by extracting it from common/types.

* [Upgrade Assistant] Rename upgrade_status to migration_status (#114755)

* [Upgrade Assistant] Swapped reindexing flyouts order (#115046)

* [Upgrade Assistant] Changed reindexing steps order, replaced a warning callout with a text element

* [Upgrade Assistant] Fixed reindex flyout test and changed warning callout from danger color to warning color

* [Upgrade Assistant] Fixed the correct status to show warnings

* [Upgrade Assistant] Fixed i18n strings

* [Upgrade Assistant] Moved reindex with warnings logic into a function

* [Upgrade Assistant] Updated reindex flyout copy

* [Upgrade Assistant] Also added a trailing period to the reindex step 3

* [Upgrade Assistant] Fixed i18n strings and step 3 wording

* [Upgrade Assistant] Added docs changes

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

* [Upgrade Assistant] Hide features that don't need to be migrated from flyout (#115535)

* Filter out system indices that dont require migration on server side
* Rename to attrs to migration
* Update flyout snapshot.

* Refine Upgrade Assistant copy. (#115472)

* Remove unused file

* Fix kibanaVersion dep

* Updated config.ts to fix UA test

UA functional API integration test to check cloud backup status creates a snapshot repo, which fails to be created with my changes to config.ts `'path.repo=/tmp/repo,/tmp/repo_1,/tmp/repo_2,'`. Adding `/tmp/cloud-snapshots/'` to the config fixes the test.

* Address CR changes

* Add missing error handler for system indices migration (#116088)

* Fix broken tests

* Fix test

* Skip tests

* Fix linter errors and import

* [Upgrade Assistant] Fix typo in retrieval of cluster settings (#116335)

* Fix typos

* Fix typo also in server tests

* Make sure log collection remains enabled throughout the test

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

* Fix type errors

* Fix integration test types

* Fix accessibility test type errors

* Fix linter errors in shared_imports

* Fix functional test types

Co-authored-by: CJ Cenizal <cj@cenizal.com>
Co-authored-by: Alison Goryachev <alison.goryachev@elastic.co>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Yulia Čech <6585477+yuliacech@users.noreply.github.com>
Co-authored-by: James Rodewig <40268737+jrodewig@users.noreply.github.com>
Co-authored-by: Dmitry Borodyansky <dborodyansky@gmail.com>
2021-11-09 14:48:12 +01:00
Jason Stoltzfus 7f50f34358
[App Search] Use paginated API for Crawler domains (#117587) 2021-11-09 08:30:36 -05:00
Dominique Clarke b7173dd1a3
adjust yaxis mode according to field format (#117646)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-11-09 07:53:46 -05:00
Michael Olorunnisola 06ab7848ff
[Security Solution][Investigations] - Swap count and histogram order (#117878) 2021-11-09 07:39:14 -05:00
Thom Heymann 1837e4a854
Fix flaky enter spaces tests (#117510)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-11-09 12:00:54 +00:00
Michael Dokolin e6dc051b86
[Expressions] Fix expressions execution abortion to prevent performance issues (#117714) 2021-11-09 12:11:32 +01:00
Matthias Wilhelm 433ffa5876
[Discover][Context] Fix selecting another surrounding document (#117567) 2021-11-09 12:07:02 +01:00
Aleh Zasypkin a43fd6507c
Always call forceLogout first in the test cleanup code. (#117555) 2021-11-09 11:39:30 +01:00
Dima Arnautov 8978fd27f6
[ML] Update headers structure for the API docs (#117865)
* change headers level for new docs

* increase level for groups and methods, remove h2 for the project name

* bump version
2021-11-09 11:29:53 +01:00
Diana Derevyankina 90df011d9b
[TSVB] Fix reappearing of hidden series on refresh and styles loading (#117311)
* [TSVB] Fix reappearing of hidden series on refresh and styles loading

* Add functional test

* Update condition and move loading component to another file

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-11-09 13:03:01 +03:00
Walter Rafelsberger f9c982ddc2
[ML] APM Correlations: Fix usage in load balancing/HA setups. (#115145)
- The way we customized the use of search strategies caused issues with race conditions when multiple Kibana instances were used for load balancing. This PR migrates away from search strategies and uses regular APM API endpoints.
- The task that manages calling the sequence of queries to run the correlations analysis is now in a custom React hook (useFailedTransactionsCorrelations / useLatencyCorrelations) instead of a task on the Kibana server side. While they show up as new lines/files in the git diff, the code for the hooks is more or less a combination of the previous useSearchStrategy and the server side service files that managed queries and state.
- The consuming React UI components only needed minimal changes. The above mentioned hooks return the same data structure as the previously used useSearchStrategy. This also means functional UI tests didn't need any changes and should pass as is.
- API integration tests have been added for the individual new endpoints. The test files that were previously used for the search strategies are still there to simulate a full analysis run, the assertions for the resulting data have the same values, it's just the structure that had to be adapted.
- Previously all ES queries of the analysis were run sequentially. The new endpoints run ES queries in parallel where possible. Chunking is managed in the hooks on the client side.
- For now the endpoints use the standard current user's esClient. I tried to use the APM client, but it was missing a wrapper for the fieldCaps method and I ran into a problem when trying to construct a random_score query. Sticking to the esClient allowed to leave most of the functions that run the actual queries unchanged. If possible I'd like to pick this up in a follow up. All the endpoints still use withApmSpan() now though.
- The previous use of generators was also refactored away, as mentioned above, the queries are now run in parallel.
Because we might run up to hundreds of similar requests for correlation analysis, we don't want the analysis to fail if just a single query fails like we did in the previous search strategy based task. I created a util splitAllSettledPromises() to handle Promise.allSettled() and split the results and errors to make the handling easier. Better naming suggestions are welcome 😅 . A future improvement could be to not run individual queries but combine them into nested aggs or using msearch. That's out of scope for this PR though.
2021-11-09 10:26:51 +01:00