Commit graph

140 commits

Author SHA1 Message Date
Mikhail Shustov 3c8fa527a7
[ES] Upgrade client to v8.0 (#113950)
* bump to a pre-8.0 version

* export KibanaClient from /lib sub-folder

* workaround the problem of the absence of estypes

* update es client usage in pacakges

* export estypes from another path

* import errors from root

* import errors from root 2

* update transport import

* update import path for /api/types

* update import path for /api/types

* import errors from top export

* use TransportResult instead if ApiResponse

* fix errors in client_config

* fix src/core/server/saved_objects/migrationsv2/actions/integration_tests/actions.test.ts

* use KibanaClient in mock. we dont export the original Client

* fix client mocks

* fix errors on SO

* fix remaining core errors

* update estype import path

* fix errors in data plugin

* fix data_views

* fix es_ui_shared

* fix errors in interactive_setup

* fix errors in ./test folder

* add @elastic/transport to the runtime deps

* fix errors in packages

* fix erros in src/core

* fix errors in test/

* fix an error in actions plugin

* woraround and fix errors in APM plugin

* fix errors in canvas

* fix errors in event_log

* fix errors in fleet

* fix errors in ILM

* fix errors in infra

* fix errors in ingest_pipeline

* fix errors in lens

* fix errors in license_management

* fix errors in licensing

* fix errors in logstash

* fix errors in ml

* fix errors in monitoring

* fix errors in observability

* fix errors in rule_registry

* fix errors in reporting

* fix errors in rule_registry

* fix errors in security

* fix errors in security_solution

* fix errors in snapshot_restore

* fix errors in transform

* fix errors in UA

* fix errors in uptime

* fix errors in x-pack/test

* fix eslint errors

* fix new errors

* use default HTTP Connection. Undici does not support agent config options keepAlive and maxSockets

* create does not accept require_alias option

* update deps

* use transport types exported from ES client package

* fix ErrorCause | string errors

* do not use enum

* fix errors in data plugin

* update x-pack code

* fix transport

* fix apm search request

* do not crash on reporting

* fix kbn-test build

* mute reporting error to start

* fix ftr build

* another attempt

* update import path

* address or mute new errors

* REMOVE me. pin transport version temporarily.

* remove deep imports from transport package

* fix jest crash

* fix product check tests

* remove unnecessary ts-expect-error

* fix a few failed unit tests

* bump to canary 24

* remove unnecessary ts-expect-error

* remove dependency on transport

* fix types in tests

* mute errors in xpack tests

* product check doesn;t  spam in logs anymore

* filterPath --> filter_path

* ignoreUnavailable --> ignore_unavailable

* ignoreUnavailable --> ignore_unavailable

* trackScores --> track_scores

* trackTotalHits --> track_total_hits

* fix es-arcives

* fix data plugin crashes

* fix watcher test utils

* rollback unnecessary changes

* fix another problem in es-archiver

* fix scroll. for whatever reason scroll fails when request scroll_id in body

* add meta: true in kbn-securitysolution-es-utils

* bump client to canary 25

* fix errors in accordance with the es client spec

* update securityscolution-es-utils

* unify scroll api in reporting and fix tests

* fix unit tests in watcher

* refactor APM to abort request with AbortController API

* fix missing es client calls in tests

* fix missing meta in detection engine FTR tests

* fix another bunch of errors in js tests

* fix wrong coercion

* remove test-grep pattern

* fix apm unit test

* rename terminateAfter to terminate_after in infra plugin

* rename terminateAfter to terminate_after in uptime plugin

* rename terminateAfter to terminate_after in apm plugin

* fix security roles FTR tests

* fix reference

* fix post_privilidges test

* fix post_privilidges

* bump client to 26

* add meta for index_management test helpers

* remove ts-expect-error caused by bad type in reason

* bump client to 27

* REMOVE me. workaround until fixed in the es client

* fix incorrect type casting

* swtich from camelCase params

* use `HttpConnection` for FTR-related clients

* bump client to 29

* Revert "REMOVE me. workaround until fixed in the es client"

This reverts commit c038850c09.

* fix new util

* revert repository changes

* do not crash if cannot store event_loop data

* fix new estypes imports

* fix more types

* fix security test types and add ts-ignore for custom ES client

* fix more estypes imports

* yet more ts violations

* line by line fixing is hard

* adapt `evaluateAlert` from infra as it's also used from FTR tests

* use convertToKibanaClient in FTR test instead of meta:true in plugin code

* migrate from deprecated API in fleet

* fix intergration tests

* fix fleet tests

* fix another fleet test

* fix more tests

* let's call it a day

* Removes custom header check on 404 responses, includes es client ProductNotSupportedError in EsUnavailableError conditional (#116029)

* Removes custom header check on 404 responses, includes es client ProductNotSupportedError in EsUnavailableError conditional

* Updates proxy response integration test

* disable APM until compatible with client v8

* skip async_search FTR test

* use kbnClient in integration tests

* bump version to 29

* bump to 30

* have configureClient return a KibanaClient instead of Client, remove resolved violations.

* bump to 31

* bump to 31

* Revert "bump to 31"

This reverts commit 5ac713e640.

* trigger stop to unusubscribe

* update generated docs

* remove obsolete test

* put "as" back

* cleanup

* skip test

* remove new type errors in apm package

* remove ErrorCause casting

* update a comment

* bump version to 32

* remove unnecessary ts-expect-error in apm code

* update comments

* update to client v33

* remove outdated type definition

* bump to 34 without params mutation

* unskip the test that should not fail anymore

* remove unnecessary ts-expect-error comments

* update to v35. body can be string

* move `sort` to body and use body friendly syntax

* fix a failing test. maps register the same SO that has been already registered by home

Co-authored-by: pgayvallet <pierre.gayvallet@gmail.com>
Co-authored-by: Christiane (Tina) Heiligers <christiane.heiligers@elastic.co>
2021-10-26 14:08:22 +02:00
Tyler Smalley 0a3ede8fd1
[ci] Explicitly define tasks for ES snapshot build (#115074)
Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
2021-10-14 15:59:02 -07:00
Aleh Zasypkin 025861c189
Add API integration tests for Interactive Setup. (#111879) 2021-10-14 20:14:01 +02:00
Spencer eeed2ca6ae
[ci] filter out proc-runner logs from stdout on CI (#114568)
Co-authored-by: spalger <spalger@users.noreply.github.com>
2021-10-13 11:03:04 -05:00
Liza Katz b62566da33
[ci-stats] Collects additional timings for cli tools (#113030)
* [ci-stats] Collects additional metrics about bootstrap

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

* test reporting

* [ci-stats] Collects additional metrics about bootstrap

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

* Move ts timing to build_ts_refs_cli script

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

* Add timings to run

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

* info debug level

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

* fix build

* Move report function to dev-utils
align name of tests
report from functional test runner

* report snapshot install \ ready times
fix event names

* Report memory usage and branch hash

* fix eslint

* fix integration test

* build

* mergy merge

* mergy merge 2

* eslint

* eslint

* ready events

* Update packages/kbn-es/src/cli_commands/snapshot.js

Co-authored-by: Tyler Smalley <tylersmalley@gmail.com>

* Update packages/kbn-es/src/cluster.js

Co-authored-by: Tyler Smalley <tylersmalley@gmail.com>

* Update packages/kbn-es/src/cli_commands/snapshot.js

Co-authored-by: Tyler Smalley <tylersmalley@gmail.com>

* Update packages/kbn-test/src/functional_tests/cli/start_servers/cli.js

Co-authored-by: Tyler Smalley <tylersmalley@gmail.com>

* Update src/dev/run_check_published_api_changes.ts

Co-authored-by: Tyler Smalley <tylersmalley@gmail.com>

* Update packages/kbn-test/src/jest/run.ts

Co-authored-by: Tyler Smalley <tylersmalley@gmail.com>

* Update src/dev/run_i18n_check.ts

Co-authored-by: Tyler Smalley <tylersmalley@gmail.com>

* Update packages/kbn-test/src/functional_test_runner/cli.ts

Co-authored-by: Tyler Smalley <tylersmalley@gmail.com>

* code review

* pm

* merge

* dist

* jest fix

Co-authored-by: Tyler Smalley <tyler.smalley@elastic.co>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Tyler Smalley <tylersmalley@gmail.com>
2021-10-05 12:57:40 +03:00
Spencer de2cfd2e65
[ci] bump Jenkins worker memory and es JVM size (#111760)
Co-authored-by: spalger <spalger@users.noreply.github.com>
2021-09-09 14:26:08 -04:00
Tiago Costa 7c4e4f507b
chore(NA): replace babel config files by inline presets by default in the jsts_transpiler rule (#110620)
* 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>
2021-09-03 21:17:46 +01:00
Alejandro Fernández Haro bb8ee0ce05
Enable Product check from @elastic/elasticsearch-js (#107663)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-08-26 15:36:46 +01:00
Spencer c0395c9ef6
[build_ts_refs] improve caches, allow building a subset of projects (#107981)
* [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>
2021-08-10 22:12:45 -07:00
Alejandro Fernández Haro 74107a1fbd
Disable Product check in @elastic/elasticsearch-js (#107642)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-08-05 15:55:41 -04:00
Tiago Costa 4351d7c954
chore(NA): moving @kbn/es to babel transpiler (#107577) 2021-08-03 17:02:56 -04:00
Spencer ec160d5c47
[kbn/dev-utils] pull in extract() helper (#106277)
Co-authored-by: spalger <spalger@users.noreply.github.com>
2021-07-20 13:13:48 -07:00
Luke Elmers d2690d8ac8
[migrations v2] Integration test for multi-node cluster. (#100957) 2021-06-28 12:49:38 -04:00
Tiago Costa f69d63e8be
fix(NA): windows ts_project outside sandbox compilation (#100947)
* fix(NA): windows ts_project outside sandbox compilation adding tsconfig paths for packages

* chore(NA): missing @kbn paths for node_modules so types can work

* chore(NA): missing @kbn paths for node_modules so types can work

* chore(NA): organizing deps on non ts_project packages

* chore(NA): change order to find @kbn packages on node_modules first

* chore(NA): add @kbn/expect typings setting on package.json

* chore(NA): fix typechecking

* chore(NA): add missing change on tsconfig file

* chore(NA): unblock windows build by not depending on the pkg_npm rule symlink in the package.json

* chore(NA): add missing depedencies on BUILD.bazel file for io-ts-list-types

* chore(NA): remove rootDirs configs

* chore(NA): change kbn/monaco targets order

* chore(NA): update kbn-monaco build

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-06-03 17:53:39 +01:00
Tiago Costa 50616aa0f9
chore(NA): correctly setup dep order on js_library to fix windows build (#100420) 2021-05-21 00:03:54 +01:00
Tyler Smalley 9da9b8d4b9
[kbn-es] Allow overriding of Java heap (#99517)
* [kbn-es] Allow overriding of Java heap

Fixes #99494

Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
2021-05-11 07:36:20 -07:00
Tiago Costa 43d3a97f5b
chore(NA): moving @kbn/es into bazel (#99371)
* chore(NA): moving @kbn/es into bazel

* chore(NA): remove build scripts from pkg json

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-05-05 20:52:01 +01:00
Tiago Costa f690c60517
chore(NA): moving @kbn/dev-utils into bazel (#98496)
* chore(NA): moving @kbn/dev-utils into bazel

* docs(NA): updated generated plugin list
2021-04-28 23:46:33 +01:00
Spencer 31660419ea
[kbn/es] disable geoip downloader at the root (#98372)
Co-authored-by: spalger <spalger@users.noreply.github.com>
2021-04-27 11:31:07 -07:00
Tyler Smalley c59d0ddeef
[kbn-es] Increase ES heap (#97905)
Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
2021-04-21 18:37:44 -04:00
Tiago Costa b6fd28884b
chore(NA): moving @kbn/babel-preset into bazel (#97271)
* chore(NA): moving @kbn/babel-preset into bazel

* chore(NA): remove unused deps from xpack package.json
2021-04-19 12:37:56 +02:00
Spencer df4eb0f726
[kbn/es] avoid splitting string esArgs into separate args (#90253)
Co-authored-by: spalger <spalger@users.noreply.github.com>
2021-02-03 21:58:28 -07:00
Brandon Kobel 4584a8b570
Elastic License 2.0 (#90099)
* Updating everything except the license headers themselves

* Applying ESLint rules

* Manually replacing the stragglers
2021-02-03 18:12:39 -08:00
Spencer d07ae11da6
[es] disable wildcards in destructive actions (#88986)
Co-authored-by: spalger <spalger@users.noreply.github.com>
2021-02-03 09:29:37 -07:00
Patrick Mueller e4c344ada6
[data] change KQL node builder to not generate recursive and/or clauses (#89345)
resolves https://github.com/elastic/kibana/issues/88367

Prior to this PR, the KQL node_builder code was using recursion to generate
"and" & "or" expressions.  Eg, `and(foo1=bar1, foo2=bar2, foo3=bar3)` would
be generated as if was specified as `and(foo1=bar1, and(foo2=bar2, foo3=bar3))`.

Calls to the builder with long lists of expressions would generate nested JSON
as deep as the lists are long.  This is problematic, as Elasticsearch is
changing the default limit on nested bools to 20 levels, and alerting already
generates nested bools greater than that limit.
See: https://github.com/elastic/elasticsearch/issues/55303

This PR changes the generated shape of above, so that all the nodes are at the
same level, instead of the previous "recursive" treatment.
2021-02-01 12:22:29 -05:00
Brian Seeders 5ce916b308
[kbn-es] Always use bundled JDK when starting Elasticsearch (#89437) 2021-01-27 16:26:45 -05:00
Spencer 3c604438b8
[kbn/pm] throw an error if package doesn't have a script (#89438)
* [kbn/pm] throw an error if package doesn't have a script

* actually add the kbn/es build script 🤦‍♂️

Co-authored-by: spalger <spalger@users.noreply.github.com>
2021-01-27 11:22:26 -07:00
Brandon Kobel 170a2956c8
Updating the License (#88343)
* Updating the Licenses, except for applying eslint, building

* Applying ESLint rules,building @kbn/pm, regenerating api docs
2021-01-19 17:52:56 -08:00
spalger 2fc6214627 [kbn/es] start es with raised indices.query.bool.max_nested_depth
(cherry picked from commit e914a60ba8c335a187e8a269596e5072ed4502ee)
(cherry picked from commit 28beb60d79)
2021-01-13 22:06:27 -07:00
Brian Seeders 646a34043a
Explicitly set Elasticsearch heap size during CI and local development (#86513) 2020-12-18 17:32:58 -05:00
Tyler Smalley b593781009
Jest multi-project configuration (#77894)
Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
2020-12-02 11:42:23 -08:00
Tiago Costa 0eeaafa722
chore(NA): move into single pkg json (#80015)
* 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>
2020-11-02 21:18:52 +00:00
Mikhail Shustov 93473e4f58
bump elastic/elasticsearch-js version to 7.10.0-rc1 (#81288) 2020-10-21 21:36:19 +02:00
Spencer 07c1284e9d
[kbn/bootstrap] validate that certain deps don't ship in production (#80549)
Co-authored-by: spalger <spalger@users.noreply.github.com>
2020-10-15 09:56:10 -07:00
Tiago Costa e5d8d49164
chore(NA): assures a single version for the same dependency across the entire project (#78825)
* chore(NA): script to check for multiple version of same dependency

* chore(NA): remove multiple versions for the same dependency

* chore(NA): hook single_version_dependencies script into the CI

* chore(NA): remove grunt from the CI hook integration

* chore(NA): update kbn pm dist

* chore(NA): fix typechecking

* chore(NA): update code to run under last extract-zip version

* fix(NA): multiple versions of the same type dependency

* move validation to bootstrap (#13)

Co-authored-by: spalger <spalger@users.noreply.github.com>

* chore(NA): todo to remove logic to validate single version deps once we move into a single package.json

* chore(NA): remove verify dependency versions jenkins task

* chore(NA): update kbn pm dist file

* chore(NA): remove last mention to verify_dependency_versions.sh fom tasks.groovy

Co-authored-by: Spencer <email@spalger.com>
Co-authored-by: spalger <spalger@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-10-02 00:46:00 +01:00
Tyler Smalley 7211f78ce1
Bumps Jest related packages (#78720)
Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
2020-10-01 14:38:51 -07: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
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
Thomas Watson 06e8c54751
Bump node-fetch to 2.6.1 (#77445) 2020-09-17 08:48:06 +02:00
Mikhail Shustov e9e0ca3782
Introduce TS incremental builds & move src/test_utils to TS project (#76082)
* 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 14:20:04 +02:00
Thomas Watson b21071e54b
Bump bl sub-dependency (#76260) 2020-08-31 17:28:14 +02:00
Tyler Smalley 9782ac4b7f
Bump chalk to 4.1.0 (#73397)
https://github.com/chalk/chalk/releases

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

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-08-11 06:47:33 -07:00
Mikhail Shustov 937314ad11
Bump @elastic/elasticsearch to v7.9.0-rc1 (#72231)
* bump @elastic/elasticsearch to 7.9.0-rc1

* bump other packages using @elastic/elasticsearch
2020-07-17 16:14:55 +02:00
Spencer 62f25506d3
[kbn/es] only make one attempt in tests to avoid timeout (#69197)
Co-authored-by: spalger <spalger@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-06-16 09:54:41 -07:00
Spencer 25e71c1096
upgrade npm-run-path (#68539)
Co-authored-by: spalger <spalger@users.noreply.github.com>
2020-06-08 11:29:09 -07:00
restrry bf04235dae apply prettier styles 2020-05-22 09:08:58 +02:00
Spencer 77a89c2c3b
[kbn/es] retry fetching native realm users (#66511) 2020-05-14 12:03:39 -07:00
Brian Seeders c0c7dccac7
Throw error in kbn-es when no reserved users found (#65911) 2020-05-12 10:25:12 -04:00
Larry Gregory 6a6deef151
Deprecate kibana user in favor of kibana_system user (#63186) 2020-05-05 11:36:40 -04:00
Brian Seeders 6950c260ef
kbn-es: Support choosing the correct architecture (#61096) 2020-03-24 14:12:54 -04:00