Commit graph

36703 commits

Author SHA1 Message Date
Spencer
66ad3b4ad2
[dev/watching] upgrade chokidar and remove missing source dirs (#78723)
Co-authored-by: spalger <spalger@users.noreply.github.com>
2020-09-29 08:14:20 -07:00
Brent Kimmel
f19cc7790c
[Security Solution][Resolver]Add test subj to crumb (#78683)
* [Security Solution][Resolver]Add test subj to crumb

* J Buttner review: camel case name

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-09-29 11:11:55 -04:00
Shahzad
8375c02465
[UX]Remove duplicate legend string (#78763) 2020-09-29 16:55:09 +02:00
Andrew Wilkins
9ea4984016
update apm index pattern (#78732) 2020-09-29 22:38:31 +08:00
nnamdifrankie
9e9a48be62
78024: move transform out of dataset (#78216)
* 78024: move transform out of dataset

* Change index prefix

* 78024: fix tests, remove vestiges

* 78024: remove index defined in the transform when transform is removed.

* 78024: clean up

* 78024: fix build

* 78024: add comment

* 78024: remove test I added

* 78024: more removal, will add in next PR

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-09-29 10:30:04 -04:00
Tre
f73bc48b3b
[QA][Code Coverage] Upload the coverage static site before ingestion (#78695) 2020-09-29 08:29:22 -06:00
Wylie Conlon
e66d8ff35d
[Discover] Make _source field not clickable (#78698) 2020-09-29 10:24:21 -04:00
Nicolas Chaulet
cfa50747e7
[Fleet] Rename Ingest Manager => Fleet, Fleet => Agents in the UI (#78685) 2020-09-29 10:06:20 -04:00
Dario Gieselaar
cd8d512617
[APM] Review feedback from distribution + transaction metrics (#78752) 2020-09-29 16:00:38 +02:00
Alison Goryachev
6f3301232c
[Ingest pipelines] Add ability to stop pipeline simulation (#78183) 2020-09-29 09:29:07 -04:00
Shahzad
fdee5e59a7
[CSM] Fix core vital legend background (#78273)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-09-29 13:54:43 +02:00
Alejandro Fernández Haro
406c47af46
[Usage Collection] [schema] Support spreads + canvas definition (#78481) 2020-09-29 12:42:13 +01:00
Mikhail Shustov
a3b3a4d2f3
fix lodash imports (#78456) 2020-09-29 13:22:55 +02:00
Elizabet Oliveira
895eb09c92
[Maps] Add layer type preview icons (#78650)
* Added layer type preview icons

* Added margin tops
2020-09-29 12:05:24 +01:00
Dario Gieselaar
87ad564b59
[APM] Use transaction metrics for distribution charts (#78484)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-09-29 13:00:32 +02:00
Shahzad
2fbf9b947a
[Uptime] Ml anomaly alert edit (#76909)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-09-29 12:23:39 +02:00
Walter Rafelsberger
61aac716b3
[ML] Limit exposing shared static code through ml/public/index.ts. (#77745)
- Clean up lodash imports.
- Import types only where applicable.
- Reduce page load bundle size by fetching more code asynchronously.
2020-09-29 11:57:53 +02:00
Peter Pisljar
bddf8ed64a
making expression debug info serializable (#78727) 2020-09-29 11:42:21 +02:00
Anton Dosov
69ac94c4bd
fix lodahs imports in app-arch code (#78582)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-09-29 11:01:02 +02:00
Tim Roes
119da5903c
Make Field a React.lazy export (#78483)
* Make Field a React.lazy export

* Fix broken types

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-09-29 10:57:24 +02:00
MadameSheema
728502646e
[Security Solution] Improves detections tests (#77295)
* improves 'Creates and activates a new custom rule' test

* fixes constant problem

* improves 'Creates and activates a new custom rule with override option' test

* improves 'Creates and activates a new threshold rule' test

* refactor

* fixes type check issue

* improves assertions

* removes unused code

* changes variables for constants

* improves 'waitForTheRuleToBeExecuted' test

* improves readability

* fixes jenkins error

* refactor

* refactor

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-09-29 10:35:06 +02:00
Diana Derevyankina
6f2fd54c67
[TSVB] Different field format on different series is ignored (#78138)
* [TSVB] Different field format on different series is ignored

Closes #74951

* Replace formatter of Y axis with simple value instead of formatter of the first series

* Add a condition to Y-axis tickFormatter to display formatted value if there's only one series

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-09-29 11:07:06 +03:00
Rudolf Meijering
d7d96d9864
RFC: Improve saved object migrations (#66056)
* RFC: Improve saved object migrations

* Added rolling upgrades as alternative

* Clarify advantage of re-using index for avoiding max shards open errors

* Add more detail about how dry run migrations and invalid document exports will be exposed to users

* Add separate section to highlight assumptions and tradeoffs

* Apply nits from code review

Co-authored-by: Josh Dover <me@joshdover.com>

* Move 'Single node migrations coordinated through a lease/lock' under alternatives

* Fix 5.2.2 document lock algorithm step 3.2

* Minor clarificiations

* Minimizing data loss with mixed Kibana versions: move 7.x algorithm into alternatives and clarify 8.x algorithm

* Adds impact idempotent restrictions have on upcoming/requested migration features

* nit: clarify 4.3.1.2.3

Clarify that if documents already exist, they aren't overwritten.

Co-authored-by: Brandon Kobel <brandon.kobel@gmail.com>

* Update 4.5.2: we need only one version-specific alias, not separate read/write aliases

* Add 4.0.4 the assumption that a saved object type will only ever be registered by one plugin

* Updates 4.3.1.2: Adds mappings compatibility check, adds soft deletes to prevent lost deletes, add note about data loss with mixed plugins on the same kibana version

* Don't try to minimize data loss for unsupported configurations, update index mappings during 8.x migration

 - Move "4.5.2 Minimizing data loss with mixed Kibana versions (9.0)" to
 alternatives section. Expand this section with a more detailed algorithm as
 well as enumerating some data loss scenarios that could still occur.
 - Add the supported upgrade procedure which guarantees no undetected data loss.
 - Update "4.5.1 Migration algorithm (8.0)"
   - Added a step to update index mappings
   - If there's update version mismatch errors, complete all batches before
     restarting the migration to improve performance.

* Flesh out upgrade and rollback procedure with gracefull shutdown

* New migration algorithm, upgrade procedure based on index cloning and new ES features

* Minor: clarify that index cloning algorithm solves (2.6) but (2.7) is out of scope

* Move 'Tag objects as invalid if their transformation fails' to the alternatives section

* Don't migrate when there's orphan documents so that rollback is always possible. Updates: 4.2.1.2 Migration algorithm: Cloned index per version & 4.2.1.4 Handling documents that belong to a disabled plugin

* Link to new Elasticsearch features required for the implementation

* 4.2.1.2 Clarify the purpose of the target index postfix

* Add open questions around mappings growing over time. Fix rollback index example

* minor: fix formatting

* Update assumptions and tradeoffs to match latest algorithm

* Review feedback
 - Remove 4.0.2 since the latest algorithm resolves the tradeoff
 - 4.2.1.2 should handle v6 `.kibana` indexes

* More alternatives for 4.2.1.4 Handling documents that belong to a disabled plugin. Don't introduce breaking changes in 7.x

* Handle new ES cluster without any indices. Fix clone API parameters

* Update 4.2.1.2: transform outdated documents on every startup, only fail for unknown types in 8.x

Co-authored-by: Josh Dover <me@joshdover.com>
Co-authored-by: Brandon Kobel <brandon.kobel@gmail.com>
2020-09-29 09:34:54 +02:00
MadameSheema
19a8fa4d10
[Security Solution] Fixes url timeline flaky test (#78556)
* fixes url timeline flaky test

* fixes type check issue

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-09-29 08:58:40 +02:00
MadameSheema
87b25d5a8f
adds retryability feature (#78611) 2020-09-29 08:58:20 +02:00
Tyler Smalley
da134f3a8f
Aligns several module versions across the repository (#78327)
Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-09-28 16:08:22 -07:00
Nathan L Smith
a740f7d502
Empty prompt and loading spinner for service map (#78382)
* Empty prompt for service map

To be shown when fetching returns no elements. Match the style of the license prompt.

* Add loading spinner
2020-09-28 17:09:44 -05:00
Ryan Keairns
3094ca1409
Change progress bar to spinner (#78460)
* Change progress bar to spinner

* Add progress bar option for full screen mode

* Update snapshots for router test

* Update snapshots for loading indicator test

* Update header snapshot

* Change progress bar position to fix full screen
2020-09-28 16:27:15 -05:00
Tre
3a73e0b2ac
[QA][Code Coverage] Coverage teams lookup w/o Additional Config (#77111)
* [QA][Code Coverage] Coverage teams lookup

* Fix test per cr.

* Drop unused fn's.

* Add integration test to prove that the sys does indeed
strip the CC prefix and still walks the fs.

* Cleanup "todo" list.

* Use import, like Dima's previous suggestion.

* Add coverage teams only definitions to CODEOWNERS per Lee.

* Add coverage teams for logstash, reporting and security.

* Update description.

* Update names per Lee.

* Drop mutation.

* Fix dupes.

* Add the file check, per Dima

* Add more teams

* Update regex to only match on "build/" and add test.

* More teams

* More teams

* Add print statement of the canonical timestamp,
so we can lookup stuff in gcp during errors.

* CR fixups
2020-09-28 15:27:02 -06:00
Josh Dover
085cac13f2
Slim down core bundle (#75912)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-09-28 15:24:23 -06:00
Patrick Mueller
feab3e3b02
[Alerting] retry internal OCC calls within alertsClient (#77838)
During development of https://github.com/elastic/kibana/pull/75553,
some issues came up with the optimistic concurrency control (OCC) we
were using internally within the alertsClient, via the `version`
option/property of the saved object. The referenced PR updates new
fields in the alert from the taskManager task after the alertType
executor runs. In some alertsClient methods, OCC is used to update
the alert which are requested via user requests. And so in some
cases, version conflict errors were coming up when the alert was
updated by task manager, in the middle of one of these methods. Note:
the SIEM function test cases stress test this REALLY well.

In this PR, we wrap all the methods using OCC with a function that
will retry them, a short number of times, with a short delay in
between. If the original method STILL has a conflict error, it
will get thrown after the retry limit.  In practice, this eliminated
the version conflict calls that were occurring with the SIEM tests,
once we started updating the saved object in the executor.

For cases where we know only attributes not contributing to AAD are
being updated, a new function is provided that does a partial update
on just those attributes, making partial updates for those attributes
a bit safer. That will be also used by PR #75553.
2020-09-28 16:42:13 -04:00
Spencer
f5ca7d82d5
[kbn/optimizer] only build xpack examples when building xpack plugins (#78656)
Co-authored-by: spalger <spalger@users.noreply.github.com>
2020-09-28 13:25:15 -07:00
Jonathan Buttner
e75b36a68d
[Ingest Manager] Ingest setup upgrade (#78081)
* Adding bulk upgrade api

* Addressing comments

* Removing todo

* Changing body field

* Adding helper for getting the bulk install route

* Adding request spec

* Pulling in Johns changes

* Removing test for same package upgraded multiple times

* Adding upgrade to setup route

* Adding setup integration test

* Clean up error handling

* Beginning to add tests

* Failing jest mock tests

* Break up tests & modules for easier testing.

Deal with issue described in https://github.com/facebook/jest/issues/1075#issuecomment-221771095

epm/packages/install has functions a, b, c which are independent but a can also call b and c

function a() {
  b();
  c();
}

The linked FB issue describes the cause and rationale (Jest works on "module" boundary) but TL;DR: it's easier if you split up your files

Some related links I found during this journey

 * https://medium.com/@qjli/how-to-mock-specific-module-function-in-jest-715e39a391f4
  * https://stackoverflow.com/questions/52650367/jestjs-how-to-test-function-being-called-inside-another-function
   * https://stackoverflow.com/questions/50854440/spying-on-an-imported-function-that-calls-another-function-in-jest/50855968#50855968

* Add test confirming update error result will throw

* Keep orig error. Add status code in http handler

* Leave error as-is

* Removing accidental code changes. File rename.

* Missed a function when moving to a new file

* Add missing type imports

* Lift .map lambda into named outer function

* Adding additional test

* Fixing type error

Co-authored-by: John Schulz <john.schulz@elastic.co>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-09-28 16:12:34 -04:00
Jen Huang
26f2bd204d
[Ingest Manager] Surface saved object client 10,000 limitation to bulk actions UI (#78520)
* Surface saved object client 10,000 limitation to UI

* Update x-pack/plugins/ingest_manager/server/services/saved_object.ts

Co-authored-by: John Schulz <github.com@jfsiii.org>

Co-authored-by: John Schulz <github.com@jfsiii.org>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-09-28 13:01:27 -07:00
Xavier Mouligneau
9017d50ffe
fix name without a category or if field end with .text (#78655) 2020-09-28 15:38:16 -04:00
Devin W. Hurley
3f4e9f4bc1
[Security Solution] [Detections] Log message enhancements (#78429)
* adds missing buildRuleMessage to debug logs to display rule id, name, etc. in logs

* add buildRuleMessage fn to params

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-09-28 15:24:58 -04:00
Melissa Alvarez
25682bf7ce
[ML]DF Analytics exploration: default filter of results page by defaultIsTraining value in url (#78303)
* df exploration page: handle default isTraining filter in url

* default training query updated to match what the searchBar would produce. fixes evaluate panel dataset label

* clear defaultIsTraining filter from url once applied
2020-09-28 15:13:20 -04:00
Constance
3e426a0eab
[Enterprise Search] Remove all instances of KibanaContext to Kea store (#78513)
* Add KibanaLogic store/mount

* Update usage of setBreadcrumbs/setDocTitle to KibanaLogic

* Update usage of Kibana config context to KibanaLogic

* Update usage of navigateToUrl context to KibanaLogic

* 🔥 Remove unused shallow_usecontext mocks, repurpose file to shallow_useeffect

- The file is now no longer used to mock useContext, only unseEffect, hence the rename

* 🔥 Delete/repurpose mount with context helpers

- Remove mountWithKibanaContext completely
- Change mountWithContext to mountWithIntl, since that's the only context remaining, and move it to its own file
- Change mountWithAsyncContext to just mountAsync and move it to its own file
  + add an option to pair it w/ mountWithIntl for formatted date/number support

* 🔥 Delete KibanaContext and mockKibanaContext

+ minor newline linting/grouping tweaks

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-09-28 12:04:05 -07:00
Melissa Alvarez
ac8b8516a6
[ML] DF Analytics creation: ensure job did not fail to start before showing results link (#78200)
* ensure job did not fail to start before showing results link

* simplify job started check

* update job finished check
2020-09-28 14:37:34 -04:00
Pierre Gayvallet
6f1b6907ba
fix createAppNavigationHandler to use navigateToUrl (#78583) 2020-09-28 20:31:44 +02:00
Bhavya RM
9c959947a8
Fixing a11y test failure on discover app (https://github.com/elastic/kibana/issues/59975) (#77614) 2020-09-28 14:21:54 -04:00
Jonathan Buttner
768ae211b5
[Security Solution] Initiate endpoint package upgrade from security app (#77498)
* Working on package update functionality

* Correctly installing package

* Moving upgrade component and working upgrade

* Doing permissions check

* Cleaning up imports

* Adding bulk upgrade api

* Addressing comments

* Removing todo

* Changing body field

* Adding helper for getting the bulk install route

* Adding request spec

* Using bulk install endpoint from ingest

* Moving component to a hook

* Addressing feedback
2020-09-28 14:18:40 -04:00
Spencer
3c85d3d2af
[kbn/es] use a basic build process (#78090)
Co-authored-by: spalger <spalger@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-09-28 11:14:17 -07:00
Spencer
c8731205d7
[kbn/optimizer] fix .json extension handling (#78524)
Co-authored-by: spalger <spalger@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-09-28 11:13:58 -07:00
Nathan L Smith
33e3aa2563
Fix APM lodash imports (#78438)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-09-28 12:37:33 -05:00
Nathan Reese
54a2c75097
Add deprecated message to tile_map and region_map visualizations. (#77683)
* Add deprecation message to coordinate map and region map

* clean up text

* add default distro link and view in maps link

* move url generation into onClick handler

* create tile map layer descritor

* set metrics and color and scaling

* lazy load createTileMapLayerDescriptor

* tslint fixes

* tslint cleanup for OSS code

* add region map deprecation message

* tslint cleanup

* consolidate logic into LegacyMapDeprecationMessage

* fix jest test

* fix tile-map and region_map in OSS distro

* tslint fixes

* assert urlGenerator exists

* update message text

* ensure legacy-ids get correctly evaluated (#37)

* handle 6.x region map saved objects

* turn off field meta

* fix type

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: Thomas Neirynck <thomas@elastic.co>
2020-09-28 11:31:53 -06:00
Marco Liberati
c285287da3
Fix Lens smokescreen flaky tests (#78566)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-09-28 18:50:48 +02:00
ncheckin
37d49b0052
updated discover with alt text (#77660)
* Update context.asciidoc

* Update document-data.asciidoc

* Update field-filter.asciidoc

* Update search.asciidoc

* Update set-time-filter.asciidoc

* Update viewing-field-stats.asciidoc

* Update canvas-edit-workpads.asciidoc

* Update canvas-expression-lifecycle.asciidoc

* Update canvas-present-workpad.asciidoc

* Update canvas-share-workpad.asciidoc

* Update canvas-tutorial.asciidoc

* Update docs/canvas/canvas-share-workpad.asciidoc

* Update docs/canvas/canvas-share-workpad.asciidoc

* Update docs/canvas/canvas-tutorial.asciidoc

* Update docs/canvas/canvas-tutorial.asciidoc

* Update docs/canvas/canvas-tutorial.asciidoc

* Update docs/canvas/canvas-tutorial.asciidoc

* Update docs/discover/search.asciidoc

* Update docs/discover/set-time-filter.asciidoc

* Update docs/discover/viewing-field-stats.asciidoc

* Update docs/discover/field-filter.asciidoc

* Update docs/discover/document-data.asciidoc

Co-authored-by: Kaarina Tungseth <kaarina.tungseth@elastic.co>
2020-09-28 10:53:38 -05:00
Daniil Suleiman
93248808b3
Fix types (#78619) 2020-09-28 16:47:53 +01:00
ncheckin
68912875c4
Update tutorial-visualizing.asciidoc (#76977)
* Update tutorial-visualizing.asciidoc

adds alt text to images

* Update docs/getting-started/tutorial-visualizing.asciidoc

* Update docs/getting-started/tutorial-visualizing.asciidoc

* Update docs/getting-started/tutorial-visualizing.asciidoc

* Update docs/getting-started/tutorial-visualizing.asciidoc

* Update docs/getting-started/tutorial-visualizing.asciidoc

* Update docs/getting-started/tutorial-visualizing.asciidoc

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: Kaarina Tungseth <kaarina.tungseth@elastic.co>
2020-09-28 10:41:03 -05:00