Commit graph

574 commits

Author SHA1 Message Date
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
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
Tyler Smalley 0c9a3c0979
[7.x] Removes Grunt abstraction from CI tasks (#85210) (#85448)
* Removes Grunt abstraction from CI tasks (#85210)

Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
# Conflicts:
#	tasks/config/run.js
#	test/scripts/jenkins_ci_group.sh
#	test/scripts/jenkins_unit.sh

* [CI] Set correct script execute permissions (#85475)

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

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2020-12-09 14:54:03 -08:00
Dmitry 8e9876ef59
oss tests: replace grunt task with node script (#82371) (#82633)
# Conflicts:
#	tasks/function_test_groups.js
#	test/scripts/jenkins_ci_group.sh
2020-11-05 13:17:33 +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
Mikhail Shustov 8fb0ff684c
[KP] Fix Headers timeout issue (#81140) (#81452)
* temp fix request headers bug. issue 73849

* add a focused test

* move test to FTR

* adjust types

* some minors

* small adjustments
2020-10-22 15:26:51 +02:00
Mikhail Shustov 640cf37d0e
run ssl tests on CI (#81320) (#81381) 2020-10-22 07:57:58 +02:00
Tiago Costa 86f628d318
chore(NA): merge and solve conflicts with 7.x (#79237) 2020-10-02 02:40:18 +01:00
Thomas Watson 95bb064afb
[7.x] [CI] ensure tests for @elastic/safer-lodash-set only runs once (#77146) (#77184) 2020-09-14 12:18:08 +02:00
Mikhail Shustov ab103ffa69
[KP] Expose new es client (#73651) (#73840)
* 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
# Conflicts:
#	scripts/functional_tests.js
2020-07-30 21:09:14 +02:00
Spencer 60ec901f64
[7.x] Remove karma (#73126) (#73328)
Co-authored-by: spalger <spalger@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-07-28 10:19:26 -07:00
Tiago Costa ce9176093b
chore(NA): teardown dynamic dll plugin (#72096) (#72248)
* 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>
# Conflicts:
#	src/dev/notice/generate_notice_from_source.ts
#	src/optimize/base_optimizer.js
2020-07-17 13:51:29 +01:00
Aleh Zasypkin 2764abe4e8
[7.x] Add @elastic/safer-lodash-set as an alternative to lodash.set (#71823)
# Conflicts:
#	yarn.lock

Co-authored-by: Thomas Watson <w@tson.dk>
2020-07-15 12:18:47 +02:00
Ahmad Bamieh f1fcd57ed5
[7.x] [Telemetry] Collector Schema (#64942) (#70141)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-06-28 20:34:33 +03:00
restrry 2fefd60e90 update code style 2020-05-22 10:35:02 +02:00
Joe Portner ded2238fac
[7.x] Add lockfile symlinks (#66211) 2020-05-12 12:59:26 -04:00
Spencer 73ae576158
[7.x] use cache busting for KP bundles (#64414) (#64816) 2020-04-29 12:56:48 -07:00
Josh Dover c42a2d09a3
[7.x] Use runtime publicPath for KP plugin bundles (#64226) (#64327) 2020-04-23 16:03:27 -06:00
Joe Reuter 1718df67a4
Migrate timelion vis (#62819) (#63826) 2020-04-20 11:08:30 +02:00
Larry Gregory dd3214ffbb
Update cache-control header (#62014) (#62621)
* 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>

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-04-06 12:07:35 -04:00
Spencer 33fa13eab2
[7.x] [kbn/ui-shared-deps] expand and split (#62364) (#62522)
* [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>

* update yarn.lock file

Co-authored-by: spalger <spalger@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-04-04 10:25:12 -07:00
Spencer 6065f58fa9
[7.x] [optimizer] validate the syntax of bundled node_modules… (#61904)
Co-authored-by: spalger <spalger@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
# Conflicts:
#	renovate.json5
2020-03-30 18:30:57 -07:00
Joe Portner 710111f230
Regenerate core api docs (#59814) (#59857) 2020-03-11 12:00:32 -04:00
Thomas Watson fc57b6fba2
Harden creation of child processes (#55697) (#59801)
Add general protection against RCE vulnerabilities similar to the one
described in CVE-2019-7609.

Closes #49605
2020-03-10 22:05:30 +01:00
Liza Katz 6956091adf
Generate docs from data plugin (#56955) (#59729)
* 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
# Conflicts:
#	src/dev/run_check_published_api_changes.ts
2020-03-10 14:00:28 +02:00
Spencer 650a317ee5
[7.x] [kbn/ui-shared-deps] load base css file (#58520) (#58603)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-02-26 12:40:39 -07:00
Jonathan Budzenski a2716cc373
[7.x] Refactor test entry by runner (#44679) (#57930)
* 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>

* fix merge

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-02-21 10:43:49 -06:00
Daniil Suleiman 2339e28279
Generate a static parser, move tests to vis_type_timelion (#55299) (#55401)
* Use generated parser, move tests to vis_type_timelion

* Remove legacy tests

* Create a grunt task for generating a parser
2020-01-22 12:43:01 +03:00
Tiago Costa 63d0b60e4f
chore(NA): merge and solve conflicts with master (#54782) 2020-01-14 19:45:30 +00:00
Spencer 02eead710d
[7.x] share specific instances of some ui packages (#54079) (#54514)
* 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

# Conflicts:
#	.github/CODEOWNERS
#	src/optimize/base_optimizer.js
#	yarn.lock
2020-01-10 20:20:18 -07:00
Stacey Gammon cf21b2dd15
Embeddable examples on the platform and included with --run-examples flag (#52111) (#53190)
* 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 17:45:26 -05:00
spalger c2c12539b8 autofix all violations 2019-12-13 23:55:01 -07:00
Spencer cc23912403
[7.x] [kbnClient] Retry uiSettings.replace() calls up to 5 tim… (#52779)
* [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:
#	src/dev/jest/junit_reporter.js
2019-12-12 06:35:55 -07:00
Maryia Lapata cd26085445
[Visualize] Shim with local application service (#49891) (#52611)
* 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 15:55:03 +03:00
Luke Elmers a812ee93fe
[7.x] Move @kbn/es-query into data plugin (#51014) (#51783) 2019-11-26 16:07:16 -07:00
Anton Dosov e74a8066eb
Typescriptify and shim kbn_tp_run_pipeline test plugin (#50645) (#51714)
* Typscriptify and shim kbn_tp_run_pipeline test plugin

* fix imports to not re-export ‘legacy’ from root of plugin
2019-11-26 15:41:45 +01:00
Spencer 257ee130bf
[7.x] run mocha tests from x-pack with root mocha script (#513… (#51624)
* 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

# Conflicts:
#	x-pack/tasks/test.ts
2019-11-25 13:33:20 -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
Brian Seeders 63003d7a81
[7.x] Use unique junit report filenames again (#45897) (#45944)
Fix disappearing test results in pipelines
2019-09-18 10:37:09 -04:00
Brian Seeders 17670959dc 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

(cherry picked from commit 27d23c4184)

# Conflicts:
#	src/dev/ci_setup/setup.sh
#	src/dev/failed_tests/cli.js
2019-09-11 12:23:33 -07:00
Tre 72c4a53115
List grunt tasks from terminal (#43798) (#44395)
* Add ability to run
`$ grunt tasks`

* Move conf and task to config per review
2019-08-30 09:47:41 -06:00
Dmitry Lemeshko 8dcaf97acc
jest & mocha test coverage reporting (#43742) (#43935)
* 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 20:42:13 +02:00
Jonathan Budzenski fa689d5b60 [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:22:22 -05:00
Dmitry Lemeshko b237a661a4
[service/remote] check env variable value (#41909) (#41950) 2019-07-25 09:29:29 +02:00
Spencer 33512feef8
[7.x] Only report the mocha tests once, as "Mocha tests" (#395… (#39582) 2019-06-25 09:02:30 -07:00
Mikhail Shustov 2466399929
New Platform and Legacy platform servers integration (#39047) (#39263)
* New and Legacy platforms share http server instance.

Required to use a common security interceptor for incoming http requests

* generate docs

* remove excessive contract method

* add test for New platform compatibility

* address comments part #1

* log server running only for http server

* fix test. mutate hapi request headers for BWC with legacy

* return 503 on start

* address @eli comments

* address @joshdover comments
2019-06-19 17:41:50 +02:00
Spencer fd125bc2db
[7.x] [dev/license_checker][dev/npm] reactor, ts-ify, de-grunt (#37807) (#38293) 2019-06-06 22:47:07 -07:00
Spencer 3bb33c0cb0
[7.x] [cli/dev] allow running --dev without kibana.dev.yml (#36400) (#36707)
* [cli/dev] allow running --dev without kibana.dev.yml

* disable kibana.dev.yml for functional test servers

* [cli/dev] automatically strip xpack config when running --oss

* revert bad merge artifact
2019-05-20 12:08:36 -07:00
Matthew Kime f373ab974c
implementing github checks - second attempt (#35757) (#35906)
implement github checks in ci
2019-05-01 19:53:02 -05:00
Matt Bargar 7e17ce66df
Improve KQL error messages (#34900) (#35559)
Attempts to make KQL syntax errors more sensical to the average user.

I initially tried to use a similar solution to the one we used for detecting usage of old lucene syntax. In other words, I tried to create rules in the grammar that would match strings containing common mistakes the user might make and throw custom error messages for each situation. This proved to be more difficult for detecting errors in the regular language. While the Lucene rules could be completely separated from the main grammar, the KQL error rules had to be mixed into the main grammar which made it much more complex and had a lot of unintended side effects.

So instead I decided to lean more heavily on PEG's built in error reporting. Giving certain rules human readable names allows the parser to use those names in the error reporting instead of auto generating a long list of possible characters that might be expected based on the matching rules. Since the PEG errors contain location information I was also able to add ascii art that points the user to exactly where the error occurred in their query string. While this approach is not quite as nice as bespoke error messages that tell the user exactly what is wrong in plain English, it's much more maintainable and I think it still results in much better error messages compared to what we have today.

I've also removed the old original kuery grammar (for queries like is(response, 200)). We were only using it to display an error if I user was still using the old syntax. This version of kuery hasn't existed since 6.3 and we've had error messages telling users this since then. I think it's safe to remove the legacy parser at this point, which greatly reduces the complexity of our error reporting.
2019-04-24 19:21:23 -04:00