Commit graph

702 commits

Author SHA1 Message Date
Spencer
44727d0758 Fix compatibility with yarn 1.22.0 (#56917)
* Revert "force yarn 1.21.1 until we can handle invalid output of 1.22.0 (#56914)"

This reverts commit 5686010b46.

* move the --json argument before `workspaces` so it still works

* update kbn/pm dist

(cherry picked from commit 12de6a8459)
2020-02-05 14:21:04 -07:00
Ahmad Bamieh
d079a89b6f
[7.5] [Telemetry] fix bug where uiStatsMetrics is not getting… (#54733) 2020-01-14 17:52:43 +02:00
Brian Seeders
896f058c10
[7.5] Elasticsearch snapshots automation (#53706) (#54152) 2020-01-07 14:59:27 -05:00
Spencer
55cf96fc0e
[7.5] [kbn/pm] add caching to bootstrap (#53622) (#53954)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>

# Conflicts:
#	packages/kbn-dev-utils/package.json
#	packages/kbn-pm/dist/index.js
#	packages/kbn-pm/src/commands/bootstrap.test.ts
#	yarn.lock
2020-01-03 12:33:03 -07:00
Spencer
1dae172a03
[7.5] associate metadata with runnables (#53245) (#53324) 2019-12-17 17:06:27 -07:00
spalger
724b7e83a4 move eslint rule override comments for code that moved around
(cherry picked from commit 14bf10863a)

# Conflicts:
#	x-pack/legacy/plugins/rollup/public/crud_app/app.js
2019-12-14 12:09:09 -07:00
spalger
956aeb1cee autofix all violations 2019-12-14 12:00:45 -07:00
spalger
a1f1079a0d [eslint] use prettier for all the things
(cherry picked from commit a3553c924d)

# Conflicts:
#	.eslintrc.js
#	packages/eslint-config-kibana/.eslintrc.js
#	packages/eslint-config-kibana/javascript.js
2019-12-14 11:40:39 -07:00
Spencer
965d809ec6
[7.5] [failedTests] fix reportMessageIter and add unit test (#… (#52998)
* [failedTests] fix reportMessageIter and add unit test

* update related snapshots
2019-12-13 16:04:37 -07:00
Spencer
a4fca06c1c
[7.5] [kbnClient] Retry uiSettings.replace() calls up to 5 tim… (#52780)
* [kbnClient] Retry uiSettings.replace() calls up to 5 times (#52601)

* [kbn/dev-utils] target ES2019 to transpile ??

* Retry uiSettings.replace() calls up to 5 times

* share logic for selecting junit report name to ensure they are unique

* convert to junit report path helper

# Conflicts:
#	packages/kbn-test/src/mocha/__tests__/junit_report_generation.js
#	packages/kbn-test/src/mocha/junit_report_generation.js
#	src/dev/jest/junit_reporter.js

* remove ?? syntax

* fix more null-ish syntax not supported in 7.5

* fix imports
2019-12-12 06:36:27 -07:00
Spencer
84667dfd25
[7.5] Add failure screenshot links to JUnit failures (#52449) (#52778)
* Add failure screenshot links to JUnit failures (#52449)

# Conflicts:
#	packages/kbn-test/src/failed_tests_reporter/add_messages_to_report.ts
#	packages/kbn-test/src/mocha/junit_report_generation.js

* fix type error

* fix require path
2019-12-11 22:06:41 -07:00
Spencer
ef449dcfbd
[7.5] [ftr/lifecycle] refactor to be typesafe (#52453) (#52649)
* [ftr/lifecycle] refactor to be typesafe

* update test fixture

# Conflicts:
#	packages/kbn-test/src/functional_test_runner/lib/lifecycle.ts
#	test/functional/services/remote/poll_for_log_entry.ts
#	test/functional/services/remote/remote.ts
#	test/functional/services/remote/webdriver.ts
2019-12-10 10:58:52 -07:00
Spencer
ebc26fbda8
[7.5] [failed_tests_cli] update reports with links to github i… (#52304)
* [failed_tests_cli] update reports with links to github issues (#52048)

* [failed_tests_cli] update reports with links to github issues

* reorder test report hooks so that published Junit includes modified reports

* force failures and enable dry-run mode for debugging

* auto-switch to --dry-run when running in non-tracked branches/prs

* add --skip-junit-update flag to skip mutating the reports

* remove comma after URL to support auto-linking in Jenkins

* Revert "force failures and enable dry-run mode for debugging"

This reverts commit ac0c287a3f.

* fix method call

* extend TestResult to include relevence flag rather than wrapping

* fix createFailureIssue() tests

* make report messages more consistent, append when not dry-run

* rename module

* update snapshots to not contain valid xml

* don't send authorization header if no token defined

* merge with master modified fixtures

* [ci/reportFailures] --dry-run is overloaded, split it up (#52314)

* [ci/reportFailures] --dry-run is overloaded, split it up

* force some failures to verify the fix

* Revert "force some failures to verify the fix"

This reverts commit cf2a58e139.

* update readme to mention new flags

* remove unnecessary commas

(cherry picked from commit 8e8571bae0)

* use more explicit typeguard for TS 3.5
2019-12-05 17:25:12 -07:00
Spencer
8571e0b4b9
[7.5] filter out downstream failures with updated error messag… (#52118) 2019-12-03 16:17:45 -07:00
Tiago Costa
917d64fa13
[7.5] Bump version to 7.5.1 (#51990)
* chore(NA): bump branch 7.5 for branch 7.5.1

* chore(NA): custom snapshots for ES 7.5.1
2019-12-02 20:10:11 +00:00
Nathan Reese
4533f66f33
[7.5] [Maps] avoid duplicated geometry in filter meta (#51133) (#51452)
* [7.5] [Maps] avoid duplicated geometry in filter meta (#51133)

* fix type errors

* more typescript fixes
2019-11-25 08:18:30 -07:00
Dmitry Lemeshko
caf02e58c5
[page_objects/common_page] convert to ts (#50771) (#50969)
* [page_objects/common_page] convert to ts

* fix lint errors

* descrease navigation timeouts

* use template literal for log messages
2019-11-18 23:00:57 +01:00
patrykkopycinski
74e2150a8f
Fix misuse of react-router and react-router-dom (#50120) (#50317) 2019-11-14 19:20:15 +01:00
Ahmad Bamieh
dc4700c275 [Telemetry] Server side fetcher (#50015) (#50455)
* initial push

* self code review

* ignore node-fetch type

* usageFetcher api

* user agent metric

* telemetry plugin collector

* remove extra unused method

* remove unused import

* type check

* fix collections tests

* pass kfetch as dep

* add ui metrics integration test for user agent

* dont start ui metrics when not authenticated

* user agent count always 1

* fix broken ui-metric integration tests

* try using config.get

* avoid fetching configs if sending

* type unknown -> string

* check if fetcher is causing the issue

* disable ui_metric from functional tests

* enable ui_metric back again

* ignore keyword above 256

* check requesting app first

* clean up after all the debugging :)

* fix tests

* always return 200 for ui metric reporting

* remove boom import

* logout after removing role/user

* undo some changes in tests

* inside try catch

* prevent potential race conditions in priorities with =

* use snake_case for telemetry plugin collection

* usageFetcher -> sendUsageFrom

* more replacements

* remove extra unused route

* config() -> config

* Update src/legacy/core_plugins/telemetry/index.ts

Co-Authored-By: Mike Côté <mikecote@users.noreply.github.com>

* Update src/legacy/core_plugins/ui_metric/server/routes/api/ui_metric.ts

Co-Authored-By: Mike Côté <mikecote@users.noreply.github.com>

* config() -> config

* fix SO update logic given the current changes

* fix opt in check

* triple check

* check for non boolean

* take into account older settings

* import TelemetryOptInProvider

* update test case
2019-11-13 12:27:53 -05:00
Dmitry Lemeshko
b0693a6671
[kbn-expect] add optional error message (#48895) (#49439)
* [kbn-expect] add optional error message

* review feedback: replace error message with provided one

* add optional message for contain/string
2019-10-26 13:01:43 -04:00
Brian Seeders
be90b34cce
[7.5] Ensure es/kibana cleanup always happens when using scrip… (#49113) 2019-10-24 11:24:15 -04:00
Spencer
c136143893
[7.5] standardize notice-comment usage (#48677) (#48815)
* standardize notice-comment usage

* regenerate notice.txt
2019-10-21 15:55:17 -07:00
Jean-Louis Leysens
0eec9d546f
[Console] Mappings 7.5 part 2 (#48492) (#48532)
* Update OSS console mappings and update script to handle new time unit entries

* Add console_extensions (ccr follower pause+resume)
2019-10-17 18:09:33 +02:00
Rudolf Meijering
83bf4ef0ce
Server saved objects client through request context (#44143) (#48378)
* Expose Saved Objects client in request context

* API Integration test for savedobjects in req context

* SavedObjectsClient docs

* SavedObjectsClient#find remove dependency on indexPatterns

And use the saved objects mappings instead

* Review comments

* Review comments, fixes and tests

* Use correct type for KQL syntax check
2019-10-16 12:08:32 +02:00
Alexey Antonov
c3b9013082
Convert ui/agg_types/buckets to TypeScript / Jest (#47730) (#48266)
* Convert `ui/agg_types/buckets` to TypeScript / Jest

* fix eslint issues

* fix CI

* fix JEST test

* fix mocha tests

* Fix PR comments
2019-10-15 23:16:50 +03:00
Liza Katz
570cbf7d51
Remove indexPatterns dependency from filter service (#47471) (#48217)
* Get rid of addFiltersAndChangeTimeFilter

* ts fix

* remove timefilter dependency from filter manager

* code review change

* Fixed bug in tests

* changeTimeFilter

* Refactored mappers and filter service to have no dependency on indexPatterns by generating the filter disaplyName in the relevant components.

* Fix map and flatten test

* Fixed filter state manager test

* Remove async from addFIlters and setFilters

* Fixed saved objects test - removed (display)value from url

* Make removeAll sync

* defer setFilters and removeAll in dashboard controller - temp hack

* fixed translation in filter view

* update strings

* Fixed range rendering

* map range converter
2019-10-15 19:23:01 +03:00
Nathan L Smith
073c864abe
[7.x] Do not use the idx babel plugin in the test environment… (#48118)
When running Jest with `--coverage`, modules using idx fail with the error shown in facebookincubator/idx#19.

Change the babel configuration so that is `NODE_ENV=test`, the idx plugin is not loaded.
2019-10-14 15:33:08 -05:00
Spencer
6b1d8733f3
[7.x] [failedTestsReporter] load github issues on demand (#479… (#48002) 2019-10-11 11:08:27 -07:00
Tiago Costa
6f7814b1c3
Update README.md with changes in I18n engine APIs (#47290) (#47984) 2019-10-11 18:12:50 +01:00
Spencer
d504a82954
[7.x] [kbn/es] use an ES_TMPDIR that is within the install pat… (#47964)
* [kbn/es] use an ES_TMPDIR that is within the install path

* support tests which don't pass installPath
2019-10-11 09:21:13 -07:00
Spencer
d2bcbb74ce
[7.x] cleanup es even if test fails (#47868) (#47906)
* cleanup es even if test fails

* use correct beforeAll/afterAll hooks for jest
2019-10-10 16:32:38 -07:00
Spencer
566cd69a98
[7.x] fix indentation of failure issue bodies (#47864) (#47887) 2019-10-10 14:36:32 -07:00
Spencer
b5220c648d
[7.x] [ci/failed_tests_reporter] when Github 500s, retry up to… (#47853)
* [ci/failed_tests_reporter] when Github 500s, retry up to 5 times

* remove unused import

* properly handle non-string headers
2019-10-10 12:53:03 -07:00
Nathan L Smith
6b57c79f11
[7.x] [APM] Experimental Service Map front end (#46497) (#47840)
Add service map tabs on the main APM screen and for individual services.

This is not yet hooked up to work with back-end data, so it always shows the same hard-coded graph.

This is experimental, so you must have x-pack.apm.serviceMapEnabled: true in your Kibana config for it to show up.

Also add "PSF" to the list of allowed licenses since a new dependency added uses this license (it's on the [green list](https://github.com/elastic/open-source/blob/master/elastic-product-policy.md#green-list).)

Fixes #44890
Fixes #44853
2019-10-10 13:02:54 -05:00
Spencer
3fadf26699
[7.x] refactor failed_tests_reporter to use TS, no octokit (#4… (#47631)
* refactor failed_tests_reporter to use TS, no octokit

* update renovate config

* ensure that all kbn-test files are in ts project

* fix some type errors

* add some more tests

* [kbn-test/githubapi] cleanup and document

* collect log messages as strings instead of message objects

* ensure issue is open when updating body

* improve readability of getKibanaIssues

* expose axios helpers from dev-utils

* fix request params for fetching github issues and validate locally

* include a README for failed_tests_reporter

* improve axios error helpers

# Conflicts:
#	packages/kbn-test/src/index.ts
#	renovate.json5
2019-10-08 15:18:34 -07:00
Tre
4256ec2937
[7.x] [FTR] Support for new and old es clients (#47377) (#47601)
* Add dep for new es client,
refactor all mentions of the old client
to the new.
2019-10-08 12:00:32 -06:00
Lee Drengenberg
6c07708859
[7.x] Add option for Internet Explorer IE11 to FTR (#42967) (#47465)
* merge 7.x

* remove --csp.strict=false in 7.x

Only needed on master (at least at this point)
2019-10-07 10:59:23 -05:00
Spencer
ef6727cc52
[7.x] Update gulp related packages (major) (#46665 and #47421) (#47409)
* Update gulp related packages (major) (#46665)

* Update gulp related packages

* ts-ify and gulp4-ify x-pack tasks, remove unused canvas tasks

* remove unnecessary gulp.TaskFunction usage

* fix old references

* update renovate config

* move constants into helpers directory

* typo

* compact tasks a bit, remove unnecessary paths

* fix build directories

* deprecate testonly task

* rather than justifying an unjustifiable ts-ignore, ts-ify the imported module

* update renovate config

* update browser download tests to mock axios

* add root index.d.ts to tsconfig

* export BrowserType

* remove unnecessary `@ts-ignore`

* use consistent casing

* correct import for createAutoJUnitReporter

* Update gulp related packages (#47421)

(cherry picked from commit 35751f9828)
2019-10-06 22:49:28 -07:00
Spencer
27c3b33189
[7.x] Update webpack related packages (#47402) (#47414)
# Conflicts:
#	packages/kbn-interpreter/package.json
#	yarn.lock
2019-10-05 21:01:25 -07:00
Spencer
13500762d1
[7.x] Update dependency prettier to ^1.18.2 (#47340) (#47398) 2019-10-05 15:51:04 -07:00
Spencer
b64c661799
[7.x] Update dependency @elastic/elasticsearch to ^7.4.0 (#473… (#47396) 2019-10-05 15:48:58 -07:00
Spencer
9cdc7b1b4c
[7.x] Update dependency tar-fs to ^1.16.3 (#47341) (#47395) 2019-10-05 15:48:33 -07:00
Spencer
bbacb1c365
[7.x] [mkdirp] remove in favor of recursive fs.mkdir (#47251) (#47333)
* [mkdirp] remove in favor of recursive fs.mkdir

* add eslint rule to educate future contributors

* reword the eslint error message to prevent copy-pasting callback code

* Commit updated kbn-pm dist

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

* Fix typo

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

# Conflicts:
#	renovate.json5
2019-10-04 09:35:21 -07:00
Wylie Conlon
f6c0ea623c
[lens] Use top nav in Lens app (#46190) (#47238)
* [lens] Use top nav in Lens app

* Add tests for saved query, pass filters around more places

* Fix filter passing

* Add unit test for field popover making correct queries

* Respond to review feedback

* Fix type errors

* Respond to all review comments

* Remove commented code

* Top nav should be compatible as angular directive

* Fix rendering issue with filter updates

* Respond to review comments and add onChange test

* Add specific test for the index pattern bug from Tina
2019-10-04 11:16:05 -04:00
Tiago Costa
8d2bc289f8
chore(NA): fix logic behind cleaning x-pack node modules on build (#47091) (#47185) 2019-10-03 13:44:33 +01:00
Xavier Mouligneau
aa36b9e994
Add KQL functionality in the find function of the saved objects (#41136) (#47182)
* Add KQL functionality in the find function of the saved objects

wip

rename variable from KQL to filter, fix unit test + add new ones

miss security pluggins

review I

fix api changes

refactor after reviewing with Rudolf

fix type

review III

review IV

for security put back allowed logic back to return empty results

remove StaticIndexPattern

review V

fix core_api_changes

fix type

* validate filter to match requirement type.attributes.key or type.savedObjectKey

* Fix types

* fix a bug + add more api integration test

* fix types in test until we create package @kbn/types

* fix type issue

* fix api integration test

* export nodeTypes from packages @kbn/es-query instead of the function buildNodeKuery

* throw 400- bad request when validation error in find

* fix type issue

* accept api change

* renove _ to represent private

* fix unit test + add doc

* add comment to explain why we removed the private
2019-10-03 08:42:35 -04:00
Spencer
610661980b
Update mocha related packages (major) (#43915) (#47010)
* Update mocha related packages

* update snapshots

* upgrade gulp-mocha so that it uses new mocha too

* fix async/cb overspecification

# Conflicts:
#	yarn.lock
2019-10-01 09:01:00 -07:00
Rudolf Meijering
a6ea76b209
Move KibanaMigrator into Server SavedObjectsService (#43433) (#47011)
* Rename SavedObjectsService -> SavedObjectsLegacyService

* Expose legacy pluginSpecs from Core LegacyService

* Expose legacy uiExports from Core LegacyService

* Move kibana config to NP

* Expose pluginExtendedConfig from LegacyService

* Make KibanaMigrator NP compatible

* KibanaMigrator -> NP SavedObjectsService

* SavedObjectsService never stop retrying ES connection error

* Move waiting for migrations to complete till after legacy service start

* Fix ESArchiver's KibanaMigrator

* Fix reload logging config tests

* Run migrations on savedobjects start

* Fix env tests

* Fix and make legacy tests more robust/isolated

* Cleanup code

* Fix invalid config test

* Fix SavedObject Migrations logging test

* SavedObjectsService tests

* Lifecycle logging and improve getting kibanaConfig instance

* Fix awaitMigration bug and test

* Fix typing error

* Review comments

* Remove unecessary KibanaConfig class

* Move legacy plugin config extension, specs, uiExports entirely into Core

uiExports, specs, disabledSpecs, config now get injected into KbnServer

* Fix config deprecation test

* Use existing logger mock

* Create SavedObjectsConfig for migration config

* Define KibanaMigratorContract type

* KibanaMigratorContract -> IKibanaMigrator + docs improvements

* Fix esArchiver's KibanaMigrator

* Fix plugin generator integration test

* ConfigServiceContract -> IConfigService

* Address review comments

* Review nits

* Document migrations.skip config

* Review comments continued...

* awaitMigrations -> runMigrations

* Type improvements
2019-10-01 11:09:17 +02:00
Spencer
813dbbd725
[7.x] [dev-utils] implement basic KbnClient util for talking t… (#47003)
* [dev-utils] implement basic KbnClient util for talking to Kibana server

* update KbnClient to expose full KibanaServerService API

* expose request() function and uriencode helper

* [uiSettings] retry read on conflicts auto upgrading

* expose function for resolving a Kibana server url

* only use apis in test hooks

* run x-pack-ciGroup2 60 times

* log retries as errors so they are included in console output for job

* bump

* Revert "run x-pack-ciGroup2 60 times"

This reverts commit 6b6f392edf.

* refactor urlencode tag to be a little clearer

* support customizing maxAttempts in request method
2019-10-01 00:12:23 -07:00
Alexey Antonov
f27d31de68
Convert filter_manager/lib to TypeScript / Jest (#45785) (#46778)
* Convert filter_manager/lib to TypeScript / Jest

Fix: #44952

* Update map_query_string.ts

* remove extra ts-ignore

* formatting

* fix PR comments

* Fix PR comments

* fix PR comments

* fix PR comments

* fix merge conflicts

* revert logic

* Fix PR commnets

* add tests for compare_filters

* fix PR comments
2019-09-27 18:00:27 +03:00