Commit graph

961 commits

Author SHA1 Message Date
Brian Seeders 0ca8e99a9f
[CI] Add pipeline task queue framework and merge workers into one (#71268) 2020-08-04 13:13:51 -04:00
Mikhail Shustov 585d58c202
[KP] Expose new es client (#73651)
* mark legacy ES client types as deprecated

* expose es client to plugins and update mocks

* ElasticSearchClientMock --> ElasticsearchClientMock

* expose es client mocks

* expose es client via RequestHandlerContext

* convert test/plugin_functional/config into ts

* convert top_nav test into ts

* add an integration test for the es client

* update comments to refer to the new es client

* fix import paths. do not use extensions

temp

* update docs

* fix other refs

* add test for a custom client

* fix context

* add test for scoped client

* update docs
2020-07-30 19:12:37 +02:00
Spencer dd4796cfdd
Remove karma (#73126)
Co-authored-by: spalger <spalger@users.noreply.github.com>
2020-07-27 11:07:58 -07:00
Tiago Costa 81cbd13db4
chore(NA): fix grunt task for test:coverage (#72539) 2020-07-21 12:17:01 +01:00
Tiago Costa 9296369bfd
chore(NA): teardown dynamic dll plugin (#72096)
* chore(NA): teardown dynamic dll plugin

* chore(NA): remove missing ts-ignore

* chore(NA): remove last mentions to the DLL machinery

* chore(NA): update notice file

* prevent duplication and searching target/public

* remove changes to es-ui code to unblock pr

* add node internals override for legacy tests bundle

Co-authored-by: spalger <spalger@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-07-17 11:04:14 +01:00
Thomas Watson fc5bc6b6a2
Add @elastic/safer-lodash-set as an alternative to lodash.set (#67452) 2020-07-15 10:29:57 +02:00
Spencer b6a06dfb61
Revert #64011 and subsequent fixes (#71137)
* Revert "temporarily disable firefox functional tests in PRs (#71116)"

This reverts commit 54bd07f81b.

* Revert "[savedObjects field count] run in baseline job (#70999)"

This reverts commit 53ee7a762d.

* Revert "[CI] Add pipeline task queue framework and merge workers into one (#64011)"

This reverts commit 465ed21194.

* Revert revert of change to jenkins_xpack_visual_regression.sh

Co-authored-by: spalger <spalger@users.noreply.github.com>
2020-07-08 13:05:12 -07:00
Brian Seeders 465ed21194
[CI] Add pipeline task queue framework and merge workers into one (#64011) 2020-07-07 14:14:30 -04:00
Maja Grubic 7c352c0702
[Dashboard] Add visualization by value to dashboard (#69898)
* Plugging in DashboardStart dependency

* Create embeddable by reference and navigate back to dashboard

* Trying to feature flag the new flow

* Feature flagging new visualize flow

* Removing unnecessary console statement

* Fixing typescript errors

* Adding a functional test for new functionality

* Adding a functional test for new functionality

* Fixing test name

* Changing test name

* Moving functional test to a separate folder

* Trying to fix the config file

* Adding an index file

* Remove falsly included file

* Adding aggs and params to vis input

* Serializing vis before passing it as an input

* Incorporating new state transfer logic

* Remove dashboardStart as a dependency

* Trying to get the test to run

* Remove unused import

* Readding spaces

* Fixing type errors

* Incorporating new changes
2020-06-30 12:38:12 +01:00
Ahmad Bamieh 266f853b0b
[Telemetry] Collector Schema (#64942)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-06-27 02:52:26 +03:00
Brian Seeders 2c86a22582
[CI] Remove --detectOpenHandles to parallelize Jest tests again (#67413) 2020-05-27 12:44:41 -04:00
restrry bf04235dae apply prettier styles 2020-05-22 09:08:58 +02:00
Mikhail Shustov 5082ff3252
use cache busting for KP bundles (#64414)
* convert into TS

* load plugin scripts in html body

* use buildNum as a unique Id for cache busting

* add tests for caching

* fix tests

* remove the last TODO. url should be inlined with assetss server

* this logic handled by publicPathMap on the client

* cache kbn-shared-deps as well

* attempt to fix karma tests

* always run file through replace stream

* place buildHash at begining of path, include all static files

* update bundles_route tests to inject buildNum everywhere

* fix karma config to point to right prefix

* use isDist naming throughout

* explain magic number with variables

* restore replacePublicPath option from #64226

* replace one more instance of replacePublicPath

* use promisify instead of bluebird + non-null assertions

* remove one more magic number

Co-authored-by: spalger <spalger@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-04-29 09:43:15 -07:00
Josh Dover 3e0907fabf
Use runtime publicPath for KP plugin bundles (#64226) 2020-04-23 09:13:00 -06:00
Joe Reuter 4e56419ca4
Migrate timelion vis (#62819) 2020-04-17 10:42:27 +02:00
Larry Gregory 5003179da3
Update cache-control header (#62014)
* update cache-control header

* update tests

* update test run config

* remove custom cache-control header for authentication resources

* address test flakiness

* address PR feedback

* revert changes to endpoint test

* revert changes for real this time

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-04-06 10:19:42 -04:00
Spencer e6c23ea9b2
[kbn/ui-shared-deps] expand and split (#62364)
* [kbn/ui-shared-deps] expand and split

* add two import styles for eui/react-dom that are new

Co-authored-by: spalger <spalger@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-04-03 14:11:36 -07:00
Spencer 7d58f95953
[optimizer] validate the syntax of bundled node_modules (#59972)
Co-authored-by: spalger <spalger@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-03-30 15:59:43 -07:00
Jonathan Budzenski 2d0bf9d247
fix karma debug typo (#60029) 2020-03-12 13:13:58 -05:00
Joe Portner a2c002d130
Regenerate core api docs (#59814) 2020-03-10 17:24:05 -04:00
Liza Katz 28d0cf4485
Generate docs from data plugin (#56955)
* Add doc building for data plugin

* Added data server md file

* index file for suggestion component

* Clear out internal imports from public API

* Remove FunctionalComponent usage

* comment out working docs

* Added fixes following @octogonz feedback

* new docs

* Clean up

* Clean up 2

* fix jest

* rename docs script file

* update tasks

* tasks

* update docs
2020-03-10 11:34:06 +02:00
Thomas Watson a663f65bcc
Harden creation of child processes (#55697)
Add general protection against RCE vulnerabilities similar to the one
described in CVE-2019-7609.

Closes #49605
2020-03-10 07:51:57 +01:00
Spencer 841e64e0c1
run jest with --detectOpenHandles on CI to figure out what i… (#58543)
* run jest with `--detectOpenHandles` on CI to figure out what is happening with pauses

* focus tests on jest integration

* force kill child processes in config reload test

* skip flaky suite

* increase timeout for looking for installed packages

* run all tests again
2020-02-27 14:19:24 -07:00
Spencer 457783e839
[kbn/ui-shared-deps] load base css file (#58520)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-02-26 08:25:03 -07:00
Jonathan Budzenski 76d475a64c
Refactor test entry by runner (#44679)
Over the last few years we've increased the number of test runners.
Entry points by test type have become too lage of a category for unique
names, so this moves top level test scripts under yarn and replaces test
types with the runner name.

e.g. `yarn test:browser` -> `yarn test:karma`

Closes #41133

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-02-18 16:21:36 -06:00
Joe Portner 13593344a0
Add lockfile symlinks (#55440)
This is to enable dependency scanning tools to correctly resolve
the dependencies in each package.json file that is used in
production.
2020-01-27 11:38:20 -05:00
Daniil Suleiman 6feabcd533
Generate a static parser, move tests to vis_type_timelion (#55299)
* Use generated parser, move tests to vis_type_timelion

* Remove legacy tests

* Create a grunt task for generating a parser
2020-01-21 17:38:28 +03:00
Tiago Costa fdf51a5f8b
Splits dll in chunks (#54600)
* feat(NA): implement dll split feature

* chore(NA): improve logic to split dlls

* feat(NA): support multiple manifests in the clean dll task

* fix(NA): patch clean dll task to support multiple manifest files

* feat(NA): shuffle seed before split dll in chunks

* chore(NA): correctly load chunks into the templates

* chore(NA): correctly load chunks on karma tests

* docs(NA): add explanation why we need a single runtime for dll chunks

* teste(NA): fix jest tests
2020-01-14 18:06:53 +00:00
Spencer 357be5970d
share specific instances of some ui packages (#54079)
* share specific instances of some ui packages

* remove unnecessary eslint changes, every package will define deps anyway

* remove mentions of moment webpackShims in eslint resolver

* remove use of lodash

* list angular as dep for x-pack

* add operations as codeowner of shared-deps pkg
2020-01-10 15:22:18 -07:00
Dmitry Lemeshko 26ce6104a9
Code coverage setup on CI (#49003)
* running code coverage in CI

* apply review feedback

* add custom function to upload merged coverage reports

* fix artifacts upload without coverage

* add file extension to fix validation

* Check code_coverage is set

* run oss tests via grunt task

* review fixes

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-01-08 21:08:48 +01:00
Stacey Gammon 7e67d1f86c
Embeddable examples on the platform and included with --run-examples flag (#52111)
* Add a new platform embeddable example plugin

* Remove extra hello world test impl.

* cleanup

* code review updates

* Change example to highlight and have parent filter out children

* Fix deep comparison of embeddable prop

* adjust help text
2019-12-16 15:03:46 -05:00
spalger 8e9a8a84dc autofix all violations 2019-12-13 23:17:13 -07:00
Spencer ab1fe3f14e
[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
2019-12-11 09:50:03 -07:00
Maryia Lapata 33989b0805
[Visualize] Shim with local application service (#49891)
* Add dashboard updates

* Use I18nProvider instead of I18nContext

* remove unused dependencies

* Centralizing and cleaning up legacy imports

* Fix merge conflict

* fix merge bugs and rename main dynamic entrypoint

* Rename app to legacy_app

* Clear deps

* fix jest tests

* fix saved object finder bug

* Fix unit tests

* Ignore TS

* revert using stateless component for this PR

* fix types

* Fix merge conflicts

* Update deps

* Revert filter bar export

* Revert ts-ignore

* Clean up

* Refactoring

* Fix test

* Remove global_state_sync

* Refactoring

* Remove uiExports/embeddableFactories

* Trigger digest cycle in local angular when vis is changed.

* Fix TS

* Revert back syncOnMount

* Add missed import

* Revert import 'uiExports/embeddableFactories'

* Update app navigation func test

* Update app navigation func test

* Update app navigation func test

* Remove 'kibana-install-dir' arg in pluginFunctionalTestsRelease

* Fix review comments

* Fix code review comments

* Rename alias

* Fix indexPatterns

* Use IndexPatternsContract interface
2019-12-10 13:50:45 +03:00
Tiago Costa 0b5e58979c chore(NA): fix licenses task on grunt test task (#51444) 2019-12-03 16:09:47 -07:00
Alexey Antonov c415311221 Move @kbn/es-query into data plugin (#51014) 2019-11-26 13:28:04 -07:00
Anton Dosov 80879368a1
Typescriptify and shim kbn_tp_run_pipeline test plugin (#50645)
* Typscriptify and shim kbn_tp_run_pipeline test plugin

* fix imports to not re-export ‘legacy’ from root of plugin
2019-11-26 14:22:34 +01:00
Spencer 03dad2827e
run mocha tests from x-pack with root mocha script (#51352)
* run mocha tests from x-pack with root mocha script

* Only run Karma tests in xpack intake job

* disable failing suites

* fix typo

* skip correct suite (there are multiple root suites)

* support disabling junit reporting with $DISABLE_JUNIT_REPORTER

* don't generate junit in ispec_plugin tests
2019-11-25 11:39:20 -07:00
Yuliia Naumenko a50dbefb62 [Newsfeed] UI plugin for Kibana (#49579)
* Added base folder structure for Newsfeed plugin

* Added base folders for lib and component

* Added newsfeed button to navigation controls on the right side

* add getApi() to return api data observable (#49581)

* Added flyout base body and provided EuiHeaderAlert component inside the newsfeed plugin

* Moved newsfeed plugin to OSS and added for the styles purpose new folder for legacy plugin 'newsfeed' with the same id to support this

* Added subscribe on fetch newsfeed change

* Add NewsfeedApiDriver class (#49710)

* add NewsfeedApiDriver class

* fix xpack prefix

* add corner case handling

* Added data binding to the ui

* added EuiHeaderAlert style overrides (#49739)

* Fixed due to comments on PR

* add missing fields to NewsfeedItem and FetchResult

* fix templating of service url

* gracefully handle temporary request failure

* Mapped missing fields for data and badge

* Fixed typos issues

* integrate i18n.getLocale()

* allow service url root to be changed in dev mode

* replace a lot of consts with config

* fix flyout height (#49809)

* Add "error" field to FetchResult: Error | null

* simplify fetch error handling

* Do not store hash for items that are filtered out

* add expireOn in case it is useful to UI

* always use staging url for dev config

* unit test for newsfeed api driver

* simplify modelItems

* Fixed eslint errors

* Fixed label translations

* Add unit test for concatenating the stored hashes with the new

* add newsfeed to i18n.json

* Fixed expression error

* --wip-- [skip ci]

* fix parse error

* fix test

* test(newsfeed): Added testing endpoint which simulates the Elastic Newsfeed for consumption in functional tests

* add tests for getApi()

* add tests for getApi

* Added no news page

* fix fetch not happening after page refresh with sessionStorage primed

* test(newsfeed): Added testing endpoint which simulates the Elastic Newsfeed for consumption in functional tests

* Added loading screen

* Small fixes due to comments

* Fixed issue with stop fetching news on error catch

* test(newsfeed): Configure FTS to point newsfeed to the simulated newsfeed endpoit

* Fixed browser error message: Invariant Violation: [React Intl] Could not find required `intl` object. <IntlProvider> needs to exist in the component ancestry.

* Fixed typo issue in label name

* polish the code changes

* Add simple jest/enzyme tests for the components

* honor utc format

* Filter pre-published items

* Fall back to en

* retry tests

* comment clarfication

* Setup newsfeed service fixture from test/common/config

* Added base functional tests for newsfeed functionality

* valid urlroot is for prod

* add documentation for the supported enabled setting

* more urlRoot

* --wip-- [skip ci]

* add the before for fn

* add ui_capabilties test

* update jest snapshot

* Fixed failing test

* finish newsfeed error functional test

* include ui_capability config

* error case testing in ci group 6

* refactor(newsfeed): moved newsfeed api call so that it is done before its use

* code polish

* enabled newsfeed_err test in CI
2019-11-13 08:48:34 -07:00
Spencer a859577b40
Remove rimraf (#48985)
* Update dependency del to v5

* unify del/rimraf usage with del v5

* update yarn.lock

* update kbn-pm distributable

* remove poorly transformed code

* force some deletes from tmp

* mock less of the fs module

* force tmp deletion in a few more suites

* please make this the last force
2019-10-24 06:29:43 -07:00
renovate[bot] f0e9132535 Update dependency execa to v3 (#48975)
* Update dependency execa to v3

* update kbn/pm dist

* remove old @types/execa package

* remove use of removed methods/properties, specify preferLocal when needed

* [@kbn/pm] specify preferLocal when running install scripts

* update kbn/pm dist

* Joi now converts input to matching option from .valid()

* fix failed tests

* Revert "Joi now converts input to matching option from .valid()"

This reverts commit 75531b1d09.
2019-10-23 19:23:37 -07:00
Rudolf Meijering 85c8232c0b
Move KibanaMigrator into Server SavedObjectsService (#43433)
* 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 09:11:33 +02:00
Brian Seeders 91090dbca3
Use unique junit report filenames again (#45897)
Fix disappearing test results in pipelines
2019-09-17 15:23:27 -04:00
Brian Seeders 27d23c4184 Jenkins pipeline with parallel cigroups (#45285)
* Pipeline

* WIP some work for parallelization with ciGroups

* Fix xpack kibana install dir, and add some debugging

* Attempt to quick fix a few tests

* Revert "Revert "Revert "[ci] compress jobs for CI stability" (#44584)""

This reverts commit 078ac2897f.

* Recombine test groups, and try runbld again

* Mostly cleanup, and fix failed_tests reporting to hopefully work for both pipeline and non-pipeline

* Fix typo in shell script

* Remove some debug code

* Add support for changing es transport.port during testing via TEST_ES_TRANSPORT_PORT

* Fix test that uses hard-coded es transport port and add it back in to parallel groups

* Disable checks reporter again for now

* Set env var for TEST_ES_TRANSPORT_PORT in pipeline

* Update Jenkinsfile for shorter testrunner labels

* Fix another hard-coded transport port

* Fix a new test with hard-coded URLs

* Jenkinsfile cleanup and fix one of the groups

* Fix double slash

* Testing vault credentials on jenkins server

* Add a non-existent credential

* Revert "Add a non-existent credential"

This reverts commit 0dc234c465a5483b1a994cb510a182fef766e9cc.

* Try github-checks-reporter again

* github-checks-reporter should only run for elastic/kibana, forks won't work

* Clean up some debug code

* Changing names around to try to make BlueOcean UI a little better

* Add more stages

* Make some changes to stage structure to mirror a nested example from CloudBees

* Handle TODOs, and some cleanup in Jenkinsfile

* Pass GIT_BRANCH when started without GHPRB, fix branch check

* Fix mailer problem and add code that ensures all tests are in cigroups back in

* Test adding worker/job name to junit report paths

* Remove some duplication from ci_setup scripts

* Fix unit test that uses junit path

* Don't reinstall node every time setup_env is run

* Fix yarn install logic

* Fix another unit test that uses junit output dir

* Download latest ES snapshot after kibana builds

* Make sure junit reports are always processed

* Add two failing tests for testing purposes

* Add support to Jenkinsfile for kibana build e-mails

* Remove some debug code for email sending

* Change JOB env handling in junit paths and move it to a sub-directory

* Revert "Add two failing tests for testing purposes"

This reverts commit 5715203e26922a93483feb0ebb8bb3fdcc3daf8c.

* Fix junit report path in test

* Don't send kibana emails on build abort

* Address PR feedback, formatting and use built-in url formatting library

* Fix path formatting for functional test

* Add email sending back in to Jenkinsfile

* Fix another unit test with path problem
2019-09-11 11:58:28 -07:00
Jonathan Budzenski bad947d7d1
move optimize into data folder (#25944)
* move optimize into data folder

* path

* replace optimize with data in notice glob

* update docs

* more updates

* update snapshots

* re-add folder references

* prettier

* save changes

* rm optimize from .eslintignore

* rm extra file

* fix merge
2019-08-28 10:09:58 -05:00
Tre 4d1671baca
List grunt tasks from terminal (#43798)
* Add ability to run
$ grunt tasks
# Lists available tasks :)

* Move conf and task to config per review
2019-08-27 14:04:29 -06:00
Dmitry Lemeshko 304f702764
jest & mocha test coverage reporting (#43742)
* grunt task to get mocha tests coverage

* update jest x-pack config to save report in target

* update report path to match /target/kibana-* pattern
2019-08-24 16:48:08 +02:00
Jonathan Budzenski e6e92ac2bf
[test] remove x-pack mocha configuration (#42979)
* update scripts

* run mocha from root

* rm mocha grunt task

* rm x-pack mocha setup

* rm x-pack/mocha*

* Revert "rm x-pack/mocha*"

This reverts commit fb56005e77.
2019-08-15 12:21:42 -05:00
Dmitry Lemeshko 58f2a263d0
[service/remote] check env variable value (#41909) 2019-07-25 08:29:17 +02:00
Spencer 083ed43385
Only report the mocha tests once, as "Mocha tests" (#39544) 2019-06-25 07:45:58 -07:00