Commit graph

48 commits

Author SHA1 Message Date
Kibana Machine 7336717d61
chore(NA): replace babel config files by inline presets by default in the jsts_transpiler rule (#110620) (#111217)
* chore(NA): replace babel config files by inline presets by default in the js_ts_transpiler rule

* chore(NA): update @kbn/ace build to exclude worker file

* chore(NA): remove config file support

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

Co-authored-by: Tiago Costa <tiagoffcc@hotmail.com>
2021-09-03 18:41:32 -04:00
Kibana Machine af9a14a17f
chore(NA): moving @kbn/es-archiver to babel transpiler (#108370) (#108575)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

Co-authored-by: Tiago Costa <tiagoffcc@hotmail.com>
2021-08-13 16:02:12 -04:00
Kibana Machine e792ea93d6
[kbn/es-archiver] fix flaky test (#108143) (#108262)
Co-authored-by: spalger <spalger@users.noreply.github.com>

Co-authored-by: Spencer <email@spalger.com>
Co-authored-by: spalger <spalger@users.noreply.github.com>
2021-08-11 21:16:39 +00:00
spalger 3f74b6e4ab skip flaky test (#108043)
(cherry picked from commit 441fb796e2)
2021-08-11 11:09:08 -07:00
Spencer 79e45f2190
[build_ts_refs] improve caches, allow building a subset of projects (#107981) (#108139)
* [build_ts_refs] improve caches, allow building a subset of projects

* cleanup project def script and update refs in type check script

* rename browser_bazel config to avoid kebab-case

* remove execInProjects() helper

* list references for tsconfig.types.json for api-extractor workload

* disable composite features of tsconfig.types.json for api-extractor

* set declaration: true to avoid weird debug error

* fix jest tests

Co-authored-by: spalger <spalger@users.noreply.github.com>
# Conflicts:
#	.gitignore
#	examples/hello_world/tsconfig.json
#	tsconfig.json
#	tsconfig.refs.json

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-08-11 05:08:54 -04:00
Kibana Machine f288e7a2f4
chore(NA): moving @kbn/es-archiver into bazel (#103770) (#103825)
Co-authored-by: Tiago Costa <tiagoffcc@hotmail.com>
2021-06-30 01:42:53 -04:00
Kibana Machine 4695120081
[packages] Migrate @kbn/test to Bazel (#103122) (#103812)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

Co-authored-by: Jonathan Budzenski <jon@budzenski.me>
2021-06-30 03:21:22 +00:00
Tyler Smalley 6977be0140
Revert "Revert: [7.x] [FTR][CI] Use default distribution for all tests (#102019) (#102580)
* Revert "Revert: [7.x] [FTR][CI] Use default distribution for all tests (#102019)"

This reverts commit c272bdbc25.

* [FTR] Stabilize SSLP functional tests (#102553)

* Removes spaces check, since spaces should always be available
* Disables Monitoring, SecuritySolutions, and Reporting in SSPL tests
until #102552 is completed

Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-06-21 03:28:12 -04:00
Tyler Smalley c272bdbc25
Revert: [7.x] [FTR][CI] Use default distribution for all tests (#102019)
* Revert "[FTR] Use importExport for saved_object/basic archive (#100244) (#102016)"

This reverts commit 9851b7bcfa.

* Revert "[7.x] [FTR][CI] Use default distribution for all tests (#94968) (#101118)"

This reverts commit 73225daa87.
2021-06-13 23:29:03 -07:00
Tyler Smalley 73225daa87
[7.x] [FTR][CI] Use default distribution for all tests (#94968) (#101118)
* [FTR][CI] Use default distribution for all tests (#94968)
* [FTR] Use importExport for saved_object/basic archive (#100244)

Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
2021-06-12 09:53:10 -07:00
Spencer bcdeccb39b
[7.x] [esArchiver] drop support for --dir, use repo-relative paths instead (#101345) (#101676)
* [esArchiver] drop support for --dir, use repo-relative paths instead (#101345)

Co-authored-by: spalger <spalger@users.noreply.github.com>
# Conflicts:
#	test/api_integration/apis/suggestions/suggestions.js
#	test/functional/apps/discover/_large_string.ts
#	test/functional/apps/visualize/index.ts
#	x-pack/test/functional/apps/infra/feature_controls/logs_security.ts
#	x-pack/test/functional/apps/saved_objects_management/import_saved_objects_between_versions_6.x_7.x.ts
#	x-pack/test/functional/apps/upgrade_assistant/upgrade_assistant.ts

* convert references to `saved_objects/basic` archive

* adapt other `saved_objects/*` archives

* update management/saved_obejcts/relationships archives

* replace old monitoring setup() usage

* remove reference to `empty_kibana` archive

Co-authored-by: spalger <spalger@users.noreply.github.com>
2021-06-08 22:45:04 -04:00
Mikhail Shustov 100394cfb6
[7.x] Update @elastic/elasticsearch to 8.0.0-canary13 (#98266) (#101595)
* Update @elastic/elasticsearch to 8.0.0-canary13 (#98266)

* bump @elastic/elasticsearch to canary.7

* address errors in core

* address errors in data plugin

* address errors in Alerting team plugins

* remove outdated messages in Lens

* remove unnecessary comments in ML

* address errors in Observability plugin

* address errors in reporting plugin

* address errors in Rule registry plugin

* fix errors in Security plugins

* fix errors in ES-UI plugin

* remove unnecessary union.

* update core tests

* fix kbn-es-archiver

* update to canary 8

* bump to v9

* use new typings

* fix new errors in core

* fix errors in core typeings

* fix type errors in data plugin

* fix type errors in telemetray plugin

* fix data plugin tests

* fix search examples type error

* fix errors in discover plugin

* fix errors in index_pattern_management

* fix type errors in vis_type_*

* fix errors in typings/elasticsearch

* fix type errors in actions plugin

* fix type errors in alerting and apm plugins

* fix type errors in canvas and cases

* fix errors in event_log

* fix type errors in ILM and ingest_pipelines

* fix errors in lens plugin

* fix errors in lists plugin

* fix errors in logstash

* fix errors in metrics_entities

* fix errors in o11y

* fix errors in watcher

* fix errors in uptime

* fix errors in upgrade_assistant

* fix errors in task_manager

* fix errors in stack_alerts

* fix errors in security_solution

* fix errors in rule_registry

* fix errors in snapshot_restore

* fix remaining errors

* fix search intergration tests

* adjust assetion

* bump version to canary.10

* adapt code to new naming schema

* use mapping types provided by the client library

* Revert "adjust assetion"

This reverts commit 19b8fe0464.

* fix so intergration tests

* fix http integration tests

* bump version to canary 11

* fix login test

* fix http integration test

* fix apm test

* update docs

* fixing some ml types

* fix new errors in data plugin

* fix new errors in alerting plugin

* fix new errors in lists plugin

* fix new errors in reporting

* fix or mute errors in rule_registry plugin

* more ML type fixes

* bump to canary 12

* fix errors after merge conflict

* additional ML fixes

* bump to canary 13

* fix errors in apm plugin

* fix errors in fleet plugin

* fix errors in infra plugin

* fix errors in monitoring plugin

* fix errors in osquery plugin

* fix errors in security solution plugins

* fix errors in transform plugin

* Update type imports for ES

* fix errors in x-pack plugins

* fix errors in tests

* update docs

* fix errors in x-pack/test

* update error description

* fix errors after master merge

* update comment in infra plugin

* fix new errors on xpack tests/

Co-authored-by: James Gowdy <jgowdy@elastic.co>
Co-authored-by: Dario Gieselaar <dario.gieselaar@elastic.co>
# Conflicts:
#	package.json
#	src/core/server/saved_objects/migrationsv2/integration_tests/migration.test.ts
#	test/common/services/saved_object_info.ts
#	x-pack/plugins/snapshot_restore/server/routes/api/repositories.ts
#	x-pack/plugins/snapshot_restore/server/routes/api/snapshots.ts
#	yarn.lock

* revert  @ts-expect-error changes in infra plugin

* update docs
2021-06-08 12:21:59 -04:00
Tyler Smalley 52dd72e0a2 Revert "[7.x] [FTR][CI] Use default distribution for all tests (#94968) (#99980)"
This reverts commit be40e96806.
2021-05-28 17:21:51 -07:00
Tyler Smalley be40e96806
[7.x] [FTR][CI] Use default distribution for all tests (#94968) (#99980)
* [FTR][CI] Use default distribution for all tests (#94968)

Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>

* Use default output

Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>

* [FTR] Use importExport for saved_object/basic archive

Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>

* Update suggestions tests

Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>

* Fix build

Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>

* More migrations to kbnArchiver

Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
2021-05-28 15:25:52 -04:00
Kibana Machine b3fc91c6d8
chore(NA): moving @kbn/dev-utils into bazel (#98496) (#98696)
* chore(NA): moving @kbn/dev-utils into bazel

* docs(NA): updated generated plugin list

Co-authored-by: Tiago Costa <tiagoffcc@hotmail.com>
2021-04-29 00:50:19 +00:00
Kibana Machine 673c0c647f
chore(NA): chore(NA): moving @kbn/utils into bazel (#97833) (#98056)
* chore(NA): chore(NA): moving @kbn/utils into bazel

* chore(NA): run kbn-test integration test with preserve-symlinks

Co-authored-by: Tiago Costa <tiagoffcc@hotmail.com>
2021-04-22 20:25:53 +00:00
Tiago Costa 69bec3f49f
chore(NA): enable preserve symlinks for ts without breaking packages development (#95433) (#95884)
* chore(NA): move elastic-datemath into a ts package

* chore(NA): finish elastic-datemath

* chore(NA): finish elastic-datemath

* chore(NA): source folder for elastic-datemath

* chore(NA): add source-maps ace, analytics, apm-config-loader and apm-utils packages

* chore(NA): add sourcemaps to packages on typescript

* chore(NA): move test fixtures within source

* chore(NA): correct exclusions on packages

* chore(NA): correct package.json on all packages

* chore(NA): correct package.json on all packages

* chore(NA): complete kbn pm

* chore(NA): default export on elastic-datemath

* chore(NA): include logs on kbn-logging

* chore(NA): update bundle ref module to last code used in the webpack upstream

* chore(NA): update bundle ref module to last code used in the webpack upstream - refactored

* chore(NA): remove override method for exportsArgument

* fix(NA): typechecking problems by use @internal at javascript import sources on kbn-test package

* fix(NA): typescript projects check

* fix(NA): run optimizer integration tests from source

* chore(NA): fix usage from target for kbn optimizer

* chore(NA): path on tsconfig

* chore(NA): move tsignore into ts-expect-error

* chore(NA): include souce maps on kbn cli dev

* chore(NA): include souce maps on kbn-crypto, kbn-server-http-tools and kbn-telemetry-tools

* chore(NA): add issue links into the ts-expect-error comments
# Conflicts:
#	packages/elastic-datemath/README.md
#	packages/kbn-optimizer/src/integration_tests/basic_optimization.test.ts
2021-03-30 23:54:44 -04:00
Mikhail Shustov a15178a1b0
[7.x] ES client : use the new type definitions (#83808) (#95391)
* ES client : use the new type definitions (#83808)

* Use client from branch

* Get type checking working in core

* Fix types in other plugins

* Update client types + remove type errors from core

* migrate Task Manager Elasticsearch typing from legacy library to client library

* use SortOrder instead o string in alerts

* Update client types + fix core type issues

* fix maps ts errors

* Update Lens types

* Convert Search Profiler body from a string to an object to conform to SearchRequest type.

* Fix SOT types

* Fix/mute Security/Spaces plugins type errors.

* Fix bootstrap types

* Fix painless_lab

* corrected es typing in Event Log

* Use new types from client for inferred search responses

* Latest type defs

* Integrate latest type defs for APM/UX

* fix core errors

* fix telemetry errors

* fix canvas errors

* fix data_enhanced errors

* fix event_log errors

* mute lens errors

* fix or mute maps errors

* fix reporting errors

* fix security errors

* mute errors in task_manager

* fix errors in telemetry_collection_xpack

* fix errors in data plugins

* fix errors in alerts

* mute errors in index_management

* fix task_manager errors

* mute or fix lens errors

* fix upgrade_assistant errors

* fix or mute errors in index_lifecycle_management

* fix discover errors

* fix core tests

* ML changes

* fix core type errors

* mute error in kbn-es-archiver

* fix error in data plugin

* fix error in telemetry plugin

* fix error in discover

* fix discover errors

* fix errors in task_manager

* fix security errors

* fix wrong conflict resolution

* address errors with upstream code

* update deps to the last commit

* remove outdated comments

* fix core errors

* fix errors after update

* adding more expect errors to ML

* pull the lastest changes

* fix core errors

* fix errors in infra plugin

* fix errors in uptime plugin

* fix errors in ml

* fix errors in xpack telemetry

* fix or mute errors in transform

* fix errors in upgrade assistant

* fix or mute fleet errors

* start fixing apm errors

* fix errors in osquery

* fix telemetry tests

* core cleanup

* fix asMutableArray imports

* cleanup

* data_enhanced cleanup

* cleanup events_log

* cleaup

* fix error in kbn-es-archiver

* fix errors in kbn-es-archiver

* fix errors in kbn-es-archiver

* fix ES typings for Hit

* fix SO

* fix actions plugin

* fix fleet

* fix maps

* fix stack_alerts

* fix eslint problems

* fix event_log unit tests

* fix failures in data_enhanced tests

* fix test failure in kbn-es-archiver

* fix test failures in index_pattern_management

* fixing ML test

* remove outdated comment in kbn-es-archiver

* fix error type in ml

* fix eslint errors in osquery plugin

* fix runtime error in infra plugin

* revert changes to event_log cluser exist check

* fix eslint error in osquery

* fixing ML endpoint argument types

* fx types

* Update api-extractor docs

* attempt fix for ese test

* Fix lint error

* Fix types for ts refs

* Fix data_enhanced unit test

* fix lens types

* generate docs

* Fix a number of type issues in monitoring and ml

* fix triggers_actions_ui

* Fix ILM functional test

* Put search.d.ts typings back

* fix data plugin

* Update typings in typings/elasticsearch

* Update snapshots

* mute errors in task_manager

* mute fleet errors

* lens. remove unnecessary ts-expect-errors

* fix errors in stack_alerts

* mute errors in osquery

* fix errors in security_solution

* fix errors in lists

* fix errors in cases

* mute errors in search_examples

* use KibanaClient to enforce promise-based API

* fix errors in test/ folder

* update comment

* fix errors in x-pack/test folder

* fix errors in ml plugin

* fix optional fields in ml api_integartoon tests

* fix another casting problem in ml tests

* fix another ml test failure

* fix fleet problem after conflict resolution

* rollback changes in security_solution. trying to fix test

* Update type for discover rows

* uncomment runtime_mappings as its outdated

* address comments from Wylie

* remove eslint error due to any

* mute error due to incompatibility

* Apply suggestions from code review

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

* fix type error in lens tests

* Update x-pack/plugins/upgrade_assistant/server/lib/reindexing/reindex_service.ts

Co-authored-by: Alison Goryachev <alisonmllr20@gmail.com>

* Update x-pack/plugins/upgrade_assistant/server/lib/reindexing/reindex_service.test.ts

Co-authored-by: Alison Goryachev <alisonmllr20@gmail.com>

* update deps

* fix errors in core types

* fix errors for the new elastic/elasticsearch version

* remove unused type

* remove unnecessary manual type cast and put optional chaining back

* ML: mute Datafeed is missing indices_options

* Apply suggestions from code review

Co-authored-by: Josh Dover <1813008+joshdover@users.noreply.github.com>

* use canary pacakge instead of git commit

Co-authored-by: Josh Dover <me@joshdover.com>
Co-authored-by: Josh Dover <1813008+joshdover@users.noreply.github.com>
Co-authored-by: Gidi Meir Morris <github@gidi.io>
Co-authored-by: Nathan Reese <reese.nathan@gmail.com>
Co-authored-by: Wylie Conlon <wylieconlon@gmail.com>
Co-authored-by: CJ Cenizal <cj@cenizal.com>
Co-authored-by: Aleh Zasypkin <aleh.zasypkin@gmail.com>
Co-authored-by: Dario Gieselaar <dario.gieselaar@elastic.co>
Co-authored-by: restrry <restrry@gmail.com>
Co-authored-by: James Gowdy <jgowdy@elastic.co>
Co-authored-by: John Schulz <github.com@jfsiii.org>
Co-authored-by: Alison Goryachev <alisonmllr20@gmail.com>
# Conflicts:
#	package.json
#	src/core/server/saved_objects/migrationsv2/integration_tests/migration.test.ts
#	src/plugins/data/server/autocomplete/value_suggestions_route.ts
#	src/plugins/discover/public/application/angular/doc_table/create_doc_table_react.tsx
#	x-pack/plugins/apm/server/lib/services/get_service_dependencies/get_destination_map.ts
#	x-pack/plugins/infra/server/lib/alerting/inventory_metric_threshold/evaluate_condition.ts
#	x-pack/plugins/security/server/authentication/api_keys/api_keys.ts
#	yarn.lock

* fix file broken during conflict resolution

* fix lint errors and test failure

Co-authored-by: Tomas Della Vedova <delvedor@users.noreply.github.com>
2021-03-25 10:33:44 -04:00
Rudolf Meijering 953ee4bdc3
EsArchiver: support for injecting kibana version and use it for spaces tests (#94420) (#95030)
* EsArchiver: support for injecting kibana version and use it for speeding up spaces tests

* Use kbn/utils to get current kibana version in tests

* Review feedback: improve test by splitting variable over chunks
# Conflicts:
#	x-pack/test/functional/es_archives/saved_objects_management/spaces_integration/mappings.json
#	x-pack/test/saved_object_api_integration/common/fixtures/es_archiver/saved_objects/spaces/mappings.json
#	x-pack/test/spaces_api_integration/common/fixtures/es_archiver/saved_objects/spaces/mappings.json
2021-03-22 09:48:28 +01:00
Rudolf Meijering 70446af9f0
[7.x] Speed up spaces tests by letting v2 migrations do less work (#91829) (#94797)
* Speed up spaces tests by letting v2 migrations do less work (#91829)

* Don't mess with v2 migration's index

* Speed up spaces tests by letting v2 migrations do less work

* Add disabled mapping for spaces so that plugin can be disabled

* Add security as codeowners of xpack saved object api integration suite
# Conflicts:
#	.github/CODEOWNERS
#	packages/kbn-es-archiver/src/lib/indices/kibana_index.ts
#	x-pack/test/functional/es_archives/saved_objects_management/spaces_integration/mappings.json
#	x-pack/test/saved_object_api_integration/common/fixtures/es_archiver/saved_objects/spaces/mappings.json

* Apply suggestions from code review

* Fix backport for ES _types

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-18 17:16:09 -04:00
Kibana Machine f6e6149e66
[kbn/test] add import/export support to KbnClient (#92526) (#92935)
Co-authored-by: Tre' Seymour <wayne.seymour@elastic.co>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: spalger <spalger@users.noreply.github.com>

Co-authored-by: Spencer <email@spalger.com>
Co-authored-by: Tre' Seymour <wayne.seymour@elastic.co>
Co-authored-by: spalger <spalger@users.noreply.github.com>
2021-02-25 20:34:11 -05:00
Spencer d2c7abb3cf
[7.x] [esArchiver] pass x-elastic-product-origin header to ES (#91566) (#92512)
* [esArchiver] pass x-elastic-product-origin header to ES (#91566)

Co-authored-by: spalger <spalger@users.noreply.github.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
# Conflicts:
#	packages/kbn-es-archiver/src/lib/docs/index_doc_records_stream.ts
#	packages/kbn-es-archiver/src/lib/indices/create_index_stream.ts
#	packages/kbn-es-archiver/src/lib/indices/kibana_index.ts

* fix params for emptyKibanaIndex() since 7.x uses v1 migrations

Co-authored-by: spalger <spalger@users.noreply.github.com>
2021-02-23 17:50:43 -05:00
Rudolf Meijering 1fc8122c6d
[7.x] Unrevert "Migrations v2: don't auto-create indices + FTR/esArchiver support (#85778)" (#89992) (#90839)
* Unrevert "Migrations v2: don't auto-create indices + FTR/esArchiver support (#85778)" (#89992)

* Revert "Revert "Migrations v2: don't auto-create indices + FTR/esArchiver support (#85778)""

This reverts commit f97958043f.

* Fix flaky saved objects management test #89953

* If a clone target exists, wait for yellow, not green, index status

* Fix test after master merge

* Fix types

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

* Fix visualize fixture after backport

* Disable monitoring plugin email notifications in functional tests

* Disabling monitoring emails doesnt disable it, configure instead

* Fix monitoring test

* Remove debug logging from FTR config

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-02-16 06:56:59 -05:00
Spencer 45b8aa15b7
[7.x] [esArchiver] log when migrations complete and we're done loading data (#89938) (#90249)
Co-authored-by: spalger <spalger@users.noreply.github.com>
2021-02-03 22:01:39 -07:00
Brandon Kobel 57af8462e4
[7.x] Elastic License 2.0 (#90192)
* Updating everything except the license headers themselves

* Applying ESLint rules

* Manually replacing the stragglers
2021-02-03 18:39:13 -08:00
Spencer b4de7f47a5
[esArchiver] upgrade to new ES client (#89874) (#90109)
Co-authored-by: spalger <spalger@users.noreply.github.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

Co-authored-by: spalger <spalger@users.noreply.github.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-02-02 19:21:29 -07:00
Tyler Smalley baf56d80c4
[7.x] Updating the License (#88343) (#88745)
* Updating the Licenses, except for applying eslint, building

* Applying ESLint rules,building @kbn/pm, regenerating api docs

Co-authored-by: kobelb <brandon.kobel@elastic.co>
2021-01-19 17:54:11 -08:00
Patryk Kopyciński 1aeb45a5f2
[Security Solution] Refactor Cypress scenarios to use internal contex… (#86609) (#87769) 2021-01-08 13:30:32 +01:00
Tiago Costa f8eb44e58e
chore(NA): move kbn-es-archiver from mocha into jest (#87699) (#87748)
* chore(NA): move kbn-es-archiver from mocha into jest

* chore(NA): remove mocha temporarily from CI
2021-01-08 00:04:28 +00:00
Tyler Smalley 9e75c86101
Converts some Mocha unit tests to Jest (#85514) (#85687)
Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
# Conflicts:
#	src/dev/code_coverage/ingest_coverage/either.test.js
#	src/dev/code_coverage/ingest_coverage/ingest_helpers.test.js
#	src/dev/code_coverage/ingest_coverage/team_assignment/enumerate_patterns.test.js
#	src/dev/code_coverage/ingest_coverage/team_assignment/enumeration_helpers.test.js
#	src/dev/code_coverage/ingest_coverage/transforms.test.js
2020-12-10 18:32:22 -08:00
Spencer c72d5c0f08
[7.x] [mocha] find tests in ts files too (#85515) (#85608)
Co-authored-by: Spencer Alger <spalger@users.noreply.github.com>
Co-authored-by: Tyler Smalley <tyler.smalley@elastic.co>
2020-12-10 11:58:41 -07:00
Spencer d51aaab791
[7.x] [esArchiver] support kibana and es ssl from cli (#85073) (#85187)
Co-authored-by: spalger <spalger@users.noreply.github.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

Co-authored-by: spalger <spalger@users.noreply.github.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-12-07 15:08:47 -07:00
Tyler Smalley f9fd733a12
Jest multi-project configuration (#77894) (#84826)
Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
# Conflicts:
#	src/dev/code_coverage/ingest_coverage/integration_tests/team_assignment.test.js
#	src/plugins/console/jest.config.js
#	x-pack/plugins/canvas/scripts/jest.js
2020-12-02 14:02:21 -08:00
Mikhail Shustov e77769a9ac
[DX] Bump TS version to v4.1 (#83397) (#84234)
* bump version to 4.1.1-rc

* fix code to run kbn bootstrap

* fix errors

* DO NOT MERGE. mute errors and ping teams to fix them

* Address EuiSelectableProps configuration in discover sidebar

* use explicit type for EuiSelectable

* update to ts v4.1.2

* fix ts error in EuiSelectable

* update docs

* update prettier with ts version support

* Revert "update prettier with ts version support"

This reverts commit 3de48db3ec.

* address another new problem

Co-authored-by: Chandler Prall <chandler.prall@gmail.com>
# Conflicts:
#	test/functional/services/remote/remote.ts
2020-11-24 18:56:21 +01:00
Mikhail Shustov 264d05e29c
Move streams to kbn/utils (#84033) (#84219)
* move streams to kbn/std

* import streams from kbn/std

* fix styles

* remove unused shareWeakReplay

* move from kbn/std to kbn/utils

* import from subfolder since test mocks FS module and not compatible with kbn/utils

* remove new line at the end of json file
2020-11-24 18:08:15 +01:00
Robert Oskamp 722a2af211
Increase bulk request timeout during esArchiver load (#83657) (#83767)
This PR fixes some timeouts during esArchive load by increasing the request timeout.
2020-11-19 09:13:33 +01:00
Tyler Smalley 8c2976d847
Consolidates Jest configuration files and scripts (#82671) (#83362)
Jest tests are currently organized into main configuration files (src/dev/jest/config.js and x-pack/dev-tools/jest/create_jest_config.js). Both of these are similar, but very slightly due to  previously being in separate repositories. This change consolidates the scripts referenced in those configs and moves them to the `@kbn/test` project.

OSS contained an alias for `test_utils`. Those aliases have been removed in favor of importing these utilities from `@kbn/test/jest`

Blocker to #72569

Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-11-13 13:25:06 -08:00
Thomas Watson 3c82fde4f7
Upgrade Node.js to version 12 (#61587) (#83343) 2020-11-13 10:07:13 +01:00
Spencer 279fbe1172
[7.x] [ci] run server integration tests (#81698) (#82530)
Co-authored-by: spalger <spalger@users.noreply.github.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-11-03 17:45:40 -07:00
Pierre Gayvallet d449d8cbdb
[7.x] SavedObjects tagging MVP (#79096) (#82407)
* SavedObjects tagging MVP (#79096)

* create xpack plugin skeleton, start to implement management section

* add tag creation modal

* first implementation of the tags table

* use InMemoryTable

* add edit modal and delete action

* update plugin list

* add tag list, fix types

* add capabilities check on client-side

* add tag combo box component

* add missing i18n keys

* fix privilege FTR tests

* add base structure for FTR tests

* fix feature ftr test

* use string literals for i18n

* create savedObjectsTaggingOss plugin, move API types to oss plugin, start to wire to SO management page.

* update plugin list

* fix types

* allow to use `_find` with multiple references

* add FTR test for _find API on references fields

* add _find integration tests

* update generated doc

* start to implement tag filtering on SO management section

* update generated docs

* wire tagging API to dashboard listing page

* fix i18n namespace

* fix type & tests

* update dashboard listing snapshots

* adapt FTR listingTable service to search for parsable queries

* wite tagging API to visualize listing

* update tagging plugin limits

* add server-side and client-side validation for tag create/edit

* rename title field to name

* fix types

* fix types bis

* add removeReferencesTo API to SOR/SOC

* update generated doc

* add server-side unit test for `savedObjectsTagging` plugin

* move tagging API types to its own file

* add savedObjectsTaggingOss mock

* add tags_cache tests

* add tests for client-side tag client

* extract uiApi to distinct files

* various API improvements

* add more tests

* add link between tag and so management sections + add connection counts

* add base functional test suite for tagging

* add more FTR tests

* improve feature control func test

* update codeowners

* update generated doc

* fix access to proxy modal

* adapt SO save modal to allow to add tag field

* add SO decorator registry and tag implementation

* add unit tests for SO tag decorator

* add functional tests for visualize integration

* add tag SO read permission for vis/dash feature

* add RBAC api integ tests

* add API integration tests

* add test for getTagConnectionsUrl

* add SOM test suite

* add dashboard integration suite

* remove test line

* add missing unit tests

* improve API types doc

* fix create modal save button label

* remove console.log

* improve doc

* self review

* add refresh interval for tag cache

* improve page object doc

* minor cleanup

* address review comments

* small layout fixes

* add initial focus

* use lazy accessor for tag request handler context

* adapt SOM export and export route to handle references

* remove icon from feature config due to master changes

* fix SO table tests

* update generated docs

* sort tags by name in filter dropdown and listing component

* wire SO tagging to dashboard save modal

* fix types

* - add 'create tag' action in tag selector
- add notifications on update/create/delete from management
- delete modal wording

* add description max length validation

* remove real-time validation

* fix i18n bundle id

* update expected size of savedObjectsTagging plugin

* use own useIfMounted

* update limit again, contract components cannot be lazy loaded atm.

* math is hard

* remove single usage of lodash for bundle size

* add async imports for create/edit modal

* add FTR test for 'create tag' action from tag selector

* allow 'create new' option to prepopulate name field

* extract savedObjectToTag

* add advancedSettings read user for security api_integ suite

* add audit login for security client wrapper

* use import type when possible

* wire SO tagging to lens visualization

* fix lens jest test

* Fix `create tag` option being selected when closing the selector dropdown

* add sorting to tag column from getTableColumnDef

* address some of restrry comments

* rename tag selector's setSelected option to onTagsSelected

* fix audit logging even type for saved_object_remove_references

* update plugin size limit to current size

* adapt maxlength validation wording

* remove selection column until we have batch action menu

* remove connections link when user lack read privilege to savedObjectManagement

* forbid registering multiple SO decorators with the same priority

* add so decorator test

* extract getTagFindReferences and create API mock

* update audit-logging ascidoc

* doc nit

* throw conflict error if update returns any failure

* use refresh=true as default

* wording nits

* export: rename `references` to `hasReference`

* update generated doc

* set description max length to 100

* do not initialize tag cache on anonymous pages

* split fetchObjectsToExport into two distinct functions

* change tag client `delete` call order

* tsdoc nits

* more nits

* add README for oss plugin

* add oss plugin start tests

* SavedObject.find: rename `references` to `hasReference`

* change section description label

* remove url prefix constants

* last nits and comments

* update generated doc
# Conflicts:
#	.github/CODEOWNERS
#	packages/kbn-optimizer/limits.yml
#	x-pack/scripts/functional_tests.js

* fix FTR mapping files for 7.x
2020-11-03 14:35:43 +01:00
Tiago Costa 620cbc8ba5
chore(NA): move into single pkg json (#80015) (#82378)
* chore(NA): update gitignore to include first changes from moving into a single package.json

* chore(NA): update gitignore

* chore(NA): move all the dependencies into the single package.json and apply changes to bootstrap

* chore(NA): fix types problems after the single package json

* chore(NA): include code to find the dependencies used across the code

* chore(NA): introduce pure lockfile for install dependencies on build

* chore(NA): update clean task to not delete anything from xpack node_modules

* chore(NA): update gitignore to remove development temporary rules

* chore(NA): update notice file

* chore(NA): update jest snapshots

* chore(NA): fix whitelisted licenses to include a new specify form of an already included one

* chore(NA): remove check lockfile symlinks from child projects

* chore(NA): fix eslint and add missing declared deps on single pkg json

* chore(NA): correctly update notice

* chore(NA): fix failing jest test for storyshots.test.tsx

* chore(NA): fix cypress multi reporter path

* chore(NA): fix Project tests check

* chore(NA): fix problem with logic to detect used dependes on oss build

* chore(NA): include correct x-pack plugins dep discovery

* chore(NA): discover entries under dynamic requires on vis_type_timelion

* chore(NA): remove canvas

* test(NA): fix jest unit tests

* chore(NA): remove double react declaration from storyshot test file

* chore(NA): try removing isOSS check

* chore(NA): support for plugin development

* chore(NA): update logic to fix unit tests and typechecking

* chore(NA): support to run npm scripts in child kbn projects across all envs

* chore(NA): support github checks reporter on x-pack and remove cpy types as the package correctly provides them

* chore(NA): update cpy version

* chore(NA): include last kbn pm changes

* chore(NA): update style on build_production_projects.ts

* chore(NA): remove any cast fom telemetry opt in stats

* chore(NA): remove del and re-use rm -rf again

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
# Conflicts:
#	package.json
#	packages/kbn-pm/dist/index.js
#	x-pack/package.json
#	yarn.lock
2020-11-02 23:22:35 +00:00
Spencer 1122493db9
[7.x] [kbn/bootstrap] validate that certain deps don't ship in production (#80549) (#80710)
Co-authored-by: spalger <spalger@users.noreply.github.com>
# Conflicts:
#	packages/kbn-pm/dist/index.js
2020-10-15 12:00:44 -07:00
Spencer 9e19d91482
[7.x] delete target before building (#78665) (#78897)
Co-authored-by: spalger <spalger@users.noreply.github.com>

Co-authored-by: spalger <spalger@users.noreply.github.com>
2020-09-30 09:05:01 -07:00
Christos Nasikas a2d09757fd
[7.x] [ES-ARCHIVER] Fix bug when query flag is empty (#77983) (#78133) 2020-09-22 17:10:32 +03:00
Dario Gieselaar 7febd5a5f1
[7.x] es-archiver: Drop invalid settings, --query flag (#76522) (#76742)
* ESArchiver: Drop invalid index settings, support --query flag for saving archive

* Describe query flag
2020-09-04 10:53:03 +02:00
Mikhail Shustov bd66fab861
Introduce TS incremental builds & move src/test_utils to TS project (#76082) (#76632)
* move test_helpers to the core

* create base tsconfig

* all tsconfigs use the base one

* use test_helpers exposed from the src/core

* move getFieldFormatsRegistry to data plugin

* add test_utils project

* compile types after checkout

* add a stub for platform tsconfig.json

* fix broken import

* fix broken path to the base config

* set tsBuildInfoFile for project without outDir

* do not commit tsbuildinfo file

* do not check output d.ts files

* fix type error

* use separate config to build types

* rollback changes to include paths

* mute import zone error

* rename files to avoid references to tsd

* do not use tsd for type tests

* include all ts files in project

* run buildRefs before type check to ensure the latest version

* store tsbuildinfo locally

* update paths to base config

* comment out core/tsconfig.json

* remove ui path

* fix wrong tsbuildinfo path
2020-09-03 23:02:05 +02:00
Spencer d0f441ea44
[7.x] [esArchiver] stop importing stream helpers from src (#76519) (#76548)
Co-authored-by: spalger <spalger@users.noreply.github.com>
2020-09-02 13:47:27 -07:00
Spencer e98ba6c705
[7.x] [kbn/es-archiver] move to a package (#72318) (#72871)
Co-authored-by: spalger <spalger@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-07-22 11:29:11 -07:00