Commit graph

581 commits

Author SHA1 Message Date
Liza Katz a6af9d5050
[Es query] Move to package (#103530)
May the forces of bootstrapping helps us 🙏🏻 😉
2021-07-21 17:10:55 +02:00
Lukas Olson 2b3bac95c1
[KQL] Use cache and other performance improvements (#93319)
* [KQL] Use cache and other performance improvements

* Fix test

* Fix jest tests

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-08 10:21:15 -07:00
Alexey Antonov aa468c1d56
[Timelion] Communicate the index pattern to the dashboard (#90623)
* [Timelion] Communicate the index pattern to the dashboard

Closes #86418

* update types / limits.yml

* Update timelion_vis_type.tsx

* fix typo

* remove extra await

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-02-11 14:24:08 +03: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
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
Tyler Smalley 9b62100428
Removes Grunt abstraction from CI tasks (#85210)
Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
2020-12-09 08:51:32 -08:00
Dmitry b999989204
oss tests: replace grunt task with node script (#82371) 2020-11-04 17:57:32 +01: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 38a8063901
[KP] Fix Headers timeout issue (#81140)
* temp fix request headers bug. issue 73849

* add a focused test

* move test to FTR

* adjust types

* some minors

* small adjustments
2020-10-22 11:09:58 +02:00
Mikhail Shustov a18856ad49
run ssl tests on CI (#81320) 2020-10-21 21:06:22 +02: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
Thomas Watson fd08782777
[CI] ensure tests for @elastic/safer-lodash-set only runs once (#77146) 2020-09-10 16:47:38 +02: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 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
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
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
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 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
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
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