Commit graph

180 commits

Author SHA1 Message Date
Tiago Costa 86f628d318
chore(NA): merge and solve conflicts with 7.x (#79237) 2020-10-02 02:40:18 +01:00
Spencer f9abd1789b
[7.x] [kbn/optimizer] only build xpack examples when building xpack plugins (#78656) (#78681)
Co-authored-by: spalger <spalger@users.noreply.github.com>

Co-authored-by: spalger <spalger@users.noreply.github.com>
2020-09-28 14:56:38 -07:00
Spencer ae6f0fa9b1
[7.x] remove visual aspects of baseline job (#77815) (#77842)
Co-authored-by: spalger <spalger@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>

Co-authored-by: spalger <spalger@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-09-17 21:28:29 -07: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
MadameSheema bddddc93e4
[SECURITY SOLUTION] Adds 'cypress:open-as-ci' command (#76125) (#76869)
* adds 'cypress:open-as-ci' command

* fixes typecheck error

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
# Conflicts:
#	x-pack/plugins/security_solution/package.json
2020-09-07 17:55:18 +02:00
Brian Seeders 2ece4f12a4
[7.x] [CI] Add pipeline task queue framework and merge workers into one (#71268) (#74276) 2020-08-14 16:41:47 -04:00
Spencer 47897a2780
[7.x] Remove legacy optimizer (#73154) (#74966)
Co-authored-by: spalger <spalger@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-08-13 12:36:25 -07: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
Spencer c184115288
[7.x] [kbn/optimizer] report sizes of assets produced by optimizer (#71319) (#71878)
Co-authored-by: spalger <spalger@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-07-15 10:09:15 -07:00
spalger d625f82718 [CI] Add baseline trigger job
(cherry picked from commit a5c9c4ec43)

rename visual_baseline -> baseline_capture

(cherry picked from commit a81d8b55ab)

remove unnecessary context reference from trigger job

(cherry picked from commit 817fdf9b439e85c3ddfda126b3efb4e45c36006b)
(cherry picked from commit b1433e6317)

fix triggered job name

(cherry picked from commit e318ea76dc)
2020-07-14 15:32:20 -07:00
spalger e535aa6446 Revert "Revert "[7.x] [kbn/optimizer] implement "requiredBundles" property of KP plugins (#70911) (#71355)" (#71382)"
This reverts commit c45fa3dd58.
2020-07-10 20:13:28 -07:00
Brian Seeders c45fa3dd58
Revert "[7.x] [kbn/optimizer] implement "requiredBundles" property of KP plugins (#70911) (#71355)" (#71382)
This reverts commit 243a864359.
2020-07-10 23:07:01 -04:00
Spencer 243a864359
[7.x] [kbn/optimizer] implement "requiredBundles" property of KP plugins (#70911) (#71355)
Co-authored-by: Josh Dover <me@joshdover.com>
Co-authored-by: spalger <spalger@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
# Conflicts:
#	packages/kbn-optimizer/src/integration_tests/__snapshots__/basic_optimization.test.ts.snap
#	src/plugins/embeddable/kibana.json
#	src/plugins/telemetry/kibana.json
#	src/plugins/ui_actions/kibana.json
#	x-pack/plugins/apm/kibana.json
#	x-pack/plugins/upgrade_assistant/kibana.json
2020-07-10 09:37:22 -07:00
Spencer 9ed38ec72b
[7.x] [savedObjects field count] run in baseline job (#70999) (#71328)
Co-authored-by: spalger <spalger@users.noreply.github.com>
2020-07-09 16:59:00 -07:00
Rudolf Meijering d9707614cf
[7.x] CI Reporter for saved objects field count (#70580) (#70969)
* CI Reporter for saved objects field count (#70580)

* CI Reporter for saved objects field count

* Metrics needs to be an array

* Fix type failures

* Link to field count issue

* Revert "Link to field count issue"

This reverts commit 8c0126b838.

* Break down field count per type

* Don't log total metric as metrics report already calculates this

* Add saved objects field count ci metrics test to codeowners

* Address review comments

* Add field count CI metrics for disabled plugins

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
# Conflicts:
#	.github/CODEOWNERS

* Don't backport CODEOWNERS file to 7.x
2020-07-07 22:24:01 +02:00
liza-mae 77f476152d
Update network idle timeout (#70629) (#70655)
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-07-03 06:49:48 -06:00
MadameSheema 4548d3dbf7
[7.x] [SIEM] Reenabling Cypress tests (#70397) (#70551)
* [SIEM] Reenabling Cypress tests (#70397)

* reenabling cypress

* skips Overview tests

* skips search bar test

* skips URL test

* fixes merge issue

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-07-03 14:03:17 +02:00
spalger 4fc922b89c disable page load metrics task in baseline job too
(cherry picked from commit 848c239bff)
2020-06-29 09:31:37 -07:00
MadameSheema d12bf131af
renames SIEM to Security Solution (#70070) (#70105)
# Conflicts:
#	test/scripts/jenkins_xpack.sh
2020-06-26 23:11:45 +02:00
Tyler Smalley bdd66be0ec [SECURITY] Disables Cypress tests
Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
2020-06-24 16:22:52 -07:00
Mikhail Shustov c521487b30
[7.x] Add functional test for Kibana embedded in iframe (#68544) (#69487)
* Add functional test for Kibana embedded in iframe (#68544)

* convert kbn test config into TS

* add test  for Kibana embedded in iframe

* run embedded tests in functional suite

* ignore tls errors in functional tests by default

* switch test to https

* remove env vars mutation

* allow to pass ssl config to Kibana

* pass ssl config to axios

* adopt KbnClient interfaces

* adopt KibanaServer

* use KbnRequester in security service

* set sameSiteCookies:None in test

* acceptInsecureCerts in chrome

* remove leftovers

* fix type error

* remove unnecessary field

* address comments

* refactor plugin

* refactor test

* make acceptInsecureCerts configurable

* run firefox tests on ci

* up TS version

* fix firefox.sh script

* fix path

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
# Conflicts:
#	test/functional/services/remote/remote.ts
#	test/functional/services/remote/webdriver.ts
#	x-pack/scripts/functional_tests.js

* create browser config. lost during conflict resolution
2020-06-18 15:23:56 +02:00
Spencer a0e2e976f0
[7.x] [kbn/optimizer] share all plugin bundles (#68986) (#69234)
* [kbn/optimizer] share all plugin bundles (#68986)

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

* [BundleRefPlugin] resolve imports to files too

(cherry picked from commit 2bb6ac1a796c6b8661d9ca6c33bef9e23d7a0764)

* [kbn/optimizer] fix windows compatibility (#69304)

Co-authored-by: spalger <spalger@users.noreply.github.com>
(cherry picked from commit db1df7bed0)

* [BundleRefPlugin] resolve imports to files too (#69241)

Co-authored-by: spalger <spalger@users.noreply.github.com>
(cherry picked from commit e03f2428b1)

* update extraPublicDirs to include latest changes

Co-authored-by: spalger <spalger@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-06-16 17:41:32 -07:00
Spencer 31292ed2fc
[7.x] run page_load_metrics tests in visual regresssion jobs (#68570) (#68675)
Co-authored-by: spalger <spalger@users.noreply.github.com>
2020-06-09 18:30:37 -07:00
Dmitry Lemeshko 8e50e59a50
Report page load asset size (#66224) (#68383)
* performance_tests: draft version

* update cli runner and script

* ingest metrics

* save asset type for plugins

* Update src/dev/performance/ingest_metrics.ts

Co-authored-by: Spencer <email@spalger.com>

* follow review comments

* fix size calc, add FTR config, move src to kbn/test

* fix import, remove unused interface

* Update packages/kbn-test/src/page_load_metrics/capture_page_load_metrics.ts

Co-authored-by: Spencer <email@spalger.com>

* start chromium with no-sandbox

* add logging

* check page contains expected element, cut apps to 5

* fix locator & typo

* Update packages/kbn-test/src/page_load_metrics/navigation.ts

Co-authored-by: Spencer <email@spalger.com>

* Update navigation.ts

* Update navigation.ts

* bump puppeteer version

* fix typo

* update navigation script

* update config file

* update yarn.lock

* fix

* take screenshot on failure

* update screenshot title

* fix screenshot saving and error

* invalid locator

* Revert "invalid locator"

This reverts commit 3007539a69.

* run script in a loop 10 times

* Revert "run script in a loop 10 times"

This reverts commit 6cfa219140.

* path config value directly

* fix screenshots directory setup

* update maps locator, common for landing and new map

Co-authored-by: Spencer <email@spalger.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: Mikhail Shustov <restrry@gmail.com>

Co-authored-by: Spencer <email@spalger.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: Mikhail Shustov <restrry@gmail.com>
2020-06-05 18:54:31 +02:00
Xavier Mouligneau 3bec71e53e
[SECURITY] Rename siem plugin to security_solution (#67902) (#68246)
* rename siem to security_solution

* rename siem to security solution inside of code

* rename translation keys

* fix snapshot

* replace siem for security solution in tutorial

* missing translation to be renamed

* fix types for api test integration

* updates runner file to match the new path

* change category for kibana settings

* miss renaming in advance settings

* fixes cypress tests

* fix api integration test

* fix new translation

* fix unit test

* update translation i18n

* update translation i18n II

Co-authored-by: Gloria Hornero <snootchie.boochies@gmail.com>

Co-authored-by: Gloria Hornero <snootchie.boochies@gmail.com>
2020-06-04 15:12:05 -04:00
Frank Hassanabad 2ed924822d
[7.x] [SIEM][Lists] Adds circular dependency checker for lists plugin (#67648) (#67717)
* [SIEM][Lists] Adds circular dependency checker for lists plugin

## Summary

* Added dependency checker for the public and common folders for lists

# Conflicts:
#	test/scripts/jenkins_xpack.sh

* Updated from conflict issue
2020-05-28 20:02:46 -06:00
Brian Seeders 64b135594b
[CI] Remove --detectOpenHandles to parallelize Jest tests again (#67413) (#67515) 2020-05-27 14:42:13 -04:00
Josh Dover 0cef765c15
[7.x] Remove slapshot contract tests (#66277) (#66308) 2020-05-13 08:55:55 -06:00
Uladzislau Lasitsa b9a3f912a0
Migrate test plugins ⇒ NP (kbn_tp_run_pipeline) (#64780) (#65617)
* Migrated kbn_tp_run_pipeline to the new Platform

* Updated config.

* Added tsconfig.

* Updated index.ts for tests

* updated tsconfig

* Updated typescript task

* fixed tests

* Fixed tests

* updated comment

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-05-07 16:27:11 +03:00
Mikhail Shustov 290f7905ab
move core provier to NP. allows to run tests on every page (#64929) (#65608)
* move core provier to NP. allows to run tests on every page

* remove no-base-path

* pass whole KbnTestServer config

* fix build path

* another id

* np

* build kibana tests plugins. it is used in xpack tests

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-05-07 12:38:54 +02:00
Gidi Meir Morris e61d50cedf
[Alerting] migrates acceptance and functional test fixtures to KP (#64888) (#65430)
This PR migrates the vast majority of Alerting legacy code to the Kibana Platform.

This includes:

1. Removed legacy Task Manager
2. Migrates Fixture plugins in Alerting, Triggers UI and Task Manager Perf

This does not includes:

1. The PagerDuty simulator due to a lack of support for custom responses in the platform. issue opened. https://github.com/elastic/kibana/issues/65045
2. The Webhooks simulator due to a lack of support for custom authorisation. Requires investigation.
2020-05-06 13:12:10 +01:00
Dmitry Lemeshko d3f151fa2c
Re-enable Firefox functional testing on CI (#64159) (#64479)
* bring testing on Firefox back

* disable some tests

* skip more tests

* cut more suites for Firefox

* skip more tests for Firefox

* replace smoke tag with includeFirefox

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-04-25 17:43:12 +03:00
Ryland Herrick 59f091eb73
[SIEM] Server cutover to New Platform (#63430) (#63912)
* Move server code into NP folder

* NP config is not yet used
* Relative imports are somewhat broken

* Move common folder into NP

* Move cypress folder into NP

* Move scripts folder into NP

* Move misc. config into NP folder

A few of these were moved into the cypress folder as they're
cypress-specific.

I tried to update all the relative paths but some are likely broken. I'm
not going to know until other stuff is fixed, though.

* Move value for siem index pattern into common/constants

The other default values live in there, this is no different.

* Update paths following file move

If this was referencing the full project, it now references both paths
(legacy for UI, and NP for server).

* Fix typescript errors related to module resolution

These are mostly updating imports to the common/ folder on the UI side
(since things changed relative to those files).

* Replace Legacy Config with NP Config

* Updates plugin to use NP config
  * defines new config previously coming from savedObjects config
* cleans up legacy types

 Conflicts:
	x-pack/plugins/siem/server/lib/detection_engine/routes/rules/export_rules_route.ts
	x-pack/plugins/siem/server/lib/detection_engine/routes/rules/import_rules_route.ts
	x-pack/plugins/siem/server/lib/detection_engine/rules/types.ts
	x-pack/plugins/siem/server/plugin.ts
	x-pack/plugins/siem/server/routes/index.ts
	x-pack/plugins/siem/server/types.ts

* Remove local SIEM tsconfig

This was originally added to address an issue with tsserver, but that
issue is no longer relevant. The presence of this file confuses
typescript into thinking that siem is a separate TS project.

* Update kibana.json to declare our dependencies

These are not necessarily correct in terms of what's required/optional,
but this is what's declared in our types.

* Remove legacy plugin instantiation

* Removes legacy instantiation of server plugin, which is now handled by
NP
* Loosens legacy config spec so we no longer have to duplicate config
types

* Update tests with NP config

These were written against the old Hapi config function; now, we just
have a POJO.

* Update es_archiver helpers' paths

I'm not quite sure if these are working yet, but they're no longer
throwing errors.

* Ignore restricted path on script

This was cribbed from infra, who has made a similar change.

* Ignore restricted path on temporary savedObject mappings import

This will be changed subsequently when we switch to the NP form of
savedObject type registration.

* Add symlink to lockfile

* Fix paths on circular deps script

* Add separate config for Rule and Timeline saved objects

We had previously used the savedObjects' config, but those are not
currently exposed to us on New Platform. For now, we're going to split
this into two sets of values for the SOs we deal with
importing/exporting within the SIEM app, with the same defaults as
savedObjects.

* Fixing relative paths within cypress

These are strings that wouldn't be caught by typescript.
2020-04-17 19:23:46 -05:00
liza-mae 635b0ad79c
Fix visual tests (#62660) (#62718) 2020-04-06 18:53:37 -06:00
Gidi Meir Morris 599054e9a7
[Event Log] adds query support to the Event Log (#62015) (#62653)
Adds a public API for querying the Event Log by a referenced Saved Object at /api/{saved-object-type}/{saved-object-id}/_find
2020-04-06 23:53:09 +01:00
Uladzislau Lasitsa 4c7ad1f8e1
Migrate test plugins ⇒ NP (kbn_tp_sample_panel_action) (#60749) (#62315)
* Migrated sample_action to NP. Panel action tests returned to the test flow.

* fixed names

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-04-02 18:24:26 +03:00
Spencer b5c9181a93
[7.x] [ci/es] always pull snapshots, break early when they're… (#62066)
* [ci/es] always pull snapshots, break early when they're not available

* move to setup.sh after deps are installed

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

Co-authored-by: spalger <spalger@users.noreply.github.com>
2020-03-31 15:09:43 -07:00
Gidi Meir Morris 08384027cb
[Alerting] Adds navigation by consumer and alert type to alerting (#58997) (#60605)
Adds Navigation APIs to Alerting.

Parts to this PR:

Adds a client side (Public) plugin to Alerting, including two APIs: registerNavigation & registerDefaultNavigation. These allow a plugin to register navigation handlers for any alerts which it is the consumer of- one for specific AlertTypes and one for a default handler for all AlertTypes created by the plugin.
The Alert Details page now uses these navigation handlers for the View In App button. If there's an AlertType specific handler it uses that, otherwise it uses a default one and if the consumer has not registered a handler - it remains disabled.
A generic Alerting Example plugin that demonstrates usage of these APIs including two AlertTypes - one that always fires, and another that checks how many people are in Outer Space and allows you to trigger based on that. 😉 To enable the plugin run yarn start --ssl --run-examples
2020-03-19 13:05:44 +00:00
Spencer 5cfc73d196
Fix visual baseline job (#59348) (#59470)
* Establish Percy baselines

* move Jenkinsfile changed back to `.ci` directory

* rename xpack workers

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-03-06 08:40:17 -07:00
Spencer 982b2bfe7a
[7.x] expand max-old-space-size for xpack jest tests (#59455) (#59495)
* expand max-old-space-size for xpack jest tests

* turns out we are already at 4GB

* limit to 6GB for now
2020-03-05 16:05:53 -07:00
MadameSheema 30d763accf
[SIEM] Cypress preparation for Jenkins (#59013) (#59179)
* updates events viewer test

* updates login tasks

* updates ml conditional links

* updates url state

* updates timeline screen

* updates timeline tasks

* updates test files

* adds jenkins needed files

* ignoring isAttached lines due to a known error in Cypress (https://github.com/cypress-io/cypress/issues/4408)

* updates loop script

* updates readme with new cypress command explanation

* removes skip

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-03-04 21:45:29 +01:00
Brian Seeders 62ea6e63cd
[CI] Pipeline refactoring (#56447) (#59077) 2020-03-02 17:24:57 -05:00
Spencer 4a3a2d3c2c
[7.x] run jest with --detectOpenHandles on CI to figure out… (#58777)
* 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 16:24:49 -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
Spencer 9f94c39960
[7.x] build immutable bundles for new platform plugins (#53976) (#57528)
* build immutable bundles for new platform plugins (#53976)

* build immutable bundles for new platform plugins

* only inspect workers if configured to do so

* [navigation] use an index.scss file

* add yarn.lock symlink

* set pluginScanDirs in test so fixtures stay consistent

* cleanup helpers a little

* fix type error

* support KBN_OPTIMIZER_MAX_WORKERS for limiting workers via env

* test support for KBN_OPTIMIZER_MAX_WORKERS

* expand the available memory for workers when only running one or two

* add docs about KBN_OPTIMIZER_MAX_WORKERS environment variable

* fix README link

* update kbn/pm dist

* implement bundle caching/reuse

* update kbn/pm dist

* don't check for cache if --no-cache is passed

* update renovate config

* standardize on index.scss, move console styles over

* add support for --no-cache to cli

* include worker config vars in optimizer version

* ignore concatenated modules

* update integration test

* add safari to browserslist to avoid user-agent warnings in dev

* update docs, clean up optimizer message/misc naming

* always handle initialized messages, don't ignore states that are attached to specific events

* reword caching docs, add environment var to disable caching

* tweak logging and don't use optimizer.useBundleCache as that's disabled in dev

* handle change notifications

* batch changes for 1 second

* rename CompilerState type to CompilerMsg

* getChanges() no longer needs to assign changes to dirs

* remove unused deps

* split up run_worker.ts and share cacheKey generation logic

* add a couple docs

* update tests and remove unused imports

* specify files when creating bundle cache key

* remove one more unused import

* match existing dev cli output more closely

* update kbn/pm dist

* set KBN_NP_PLUGINS_BUILT to avoid warning in CI

* avoid extending global window type

* add note to keep pluginScanDirs in sync

* pass browserslistEnv in workerConfig so it is used for cache key

* load commons.bundle.js in parallel too

* emit initialized+success states if all bundles are cached

* load bootstraps as quickly as possible

* skip flaky suite

* bump

* update jest snapshots

* remove hashing from cache key generation

* remove unnecessary non-null assertion

* improve docs and break up Optimizer#run()

* remove unused import

* refactor kbn/optimizer to break up observable logic, implement more helpful cache invalidation logic with logging

* fix tests

* add initializing phase

* avoid rxjs observable constructor

* remove unnecessary rxjs helper, add tests for bundle cache

* update consumers of optimizer

* update readme with new call style

* replace "new platform" with "kibana platform"

* fix a couple more renames

* add support for several plain-text file formats

* fix naming of OptimizerMsg => OptimizerUpdate, use "store" naming too

* one more OptimizerMsg update

* ensure bundles are not cached when cache config is false

* test for initializing states and bundle cache events

* remove unnecessary timeout change

* Remove unnecessary helpers

* Add tests for BundleCache class

* Add tests for Bundle class

* test summarizeEvent$

* missing paths are no longer listed in mtimes map

* add tests for optimizer/cache_keys

* Add some extra docs

* Remove labeled loop

* add integration test for kbn-optimizer watcher components

* querystring-browser removed

* tweak logging a smidge, improve info and final message

* remove unused imports

* remove duplication of getModuleCount() method

* move type annotation that validates things

* clear up the build completion message

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>

* [kbn/optimizer] Fix windows support (#57592)

* [kbn/optimizer] simplify run_workers.ts a smidge

* use Path.resolve() to create windows paths from normalized ones

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
(cherry picked from commit 343bc9c303)

* remove istanbul/code coverage references

* fix webpack config syntax

* removal of querystring-browser was backported to 7.x

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-02-14 11:35:24 -07:00
Brian Seeders 2de2658f4d
Remove matrix build support (#54202) (#56170) 2020-01-28 16:55:29 -05:00
Brian Seeders 5ffb19b7d3
[7.x] Flaky test runner improvements/fixes (#49367) (#54591)
* Allocate multiple flaky test runner agents as executions grow

* WIP support for deleting kibana install dir during CI

* Add setup script for testing scripts

* Add REMOVE_KIBANA_INSTALL_DIR=1 to flaky test runner

* Change flaky test runner worker processes from 8 to 12
2020-01-13 12:14:42 -05: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
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
Spencer 9a6724c3ed
[7.x] [a11y] add initial accessibility functional tests (#4358… (#50086)
* [a11y] add initial accessibility functional tests

* add accessibility jobs

* fix config path

* remove percy setup from scripts

* disable color-contrast rule

* apply changes from @myasonik

* define aria-controls/owns props even when suggestions aren't visible

* [ftr/a11y] only throw error when there are errors

* adding tests for management page

* add a11y test for management page

* adding ignore rules' to a11y

* accessibility test for kibana home

* 7 passing tests, 0 failures

* jest snapshot update

* support a11y test in pipeline job

* update a11y test script for pipelines

* use oss compatible ci setup

* fix exclude syntax

* add default exclusion syntax
2019-11-20 13:34:47 -07:00
Brian Seeders ec705654c8
[7.x] Re-add pipeline for flaky test runner job (#48781) (#49905)
* Revert "Revert "Add pipeline for flaky test runner job (#46740)""

This reverts commit 7d96a13fad.

Also reconcile changes to Jenkinsfile since original revert happened

* Fix param parsing and add missed change

* Add missing variable
2019-11-15 11:56:26 -05:00
Spencer fa543a3960
remove report_failed_tests fallback for matrix jobs (#48809) (#48846) 2019-10-22 06:31:43 -07: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
Lee Drengenberg 0edb03fba4
resolve merge conflict (#46991) 2019-10-01 12:18:12 -05:00
Spencer 2e2e1ea39b
[7.x] Re-split ciGroups after pipeline rollout (#46375) (#46643)
* Re-split ciGroups after pipeline rollout

Revert "Revert "Revert "Revert "Revert "[ci] compress jobs for CI stab… (#45454)"

This reverts commit 9a109f2170.

Revert "set IS_PIPELINE_JOB in intake jobs (#45850)"

This reverts commit b1a01effa8.

* Split one of the slow test suites up to try to make overall CI faster

* Disable visualRegression groups, they are being handled in other work

* Revert "Split one of the slow test suites up to try to make overall CI faster"

This reverts commit 1213239545.

* Move some different xpack ciGroup8 suites around
2019-09-25 17:21:47 -07:00
liza-mae e6664473d0
Revert hiding Kibana icon, test Percy rendering (#43990) (#46168)
* Revert hiding Kibana icon, test Percy rendering

* Update jobs.yml

* Use percy token for kibana dev

* Update Percy token to read from kibana-issues

* Read correct field

* increase timeout

* Run each visual job 10 times

* Revert last commit

* Increase timeout

* Disable visual tests and revert percy token

* Fix jest tests

* Another jest test fix
2019-09-19 13:11:25 -06:00
Brian Seeders e8659817d2
[7.x] Run pipeline scripts with runbld (#45844) (#46020)
Change how runbld is invoked, and skip junit processing by default
2019-09-18 13:17:09 -04:00
Spencer 745b0ba0a6
[7.x] set IS_PIPELINE_JOB in intake jobs (#45850) (#45920)
* set IS_PIPELINE_JOB in intake jobs

* firefox smoke doesn't get an initial build

* firefox smoke doesn't get an initial build (oss edition)

* re-enable all jobs
2019-09-17 14:43:07 -07:00
spalger f85c7402f6 [kbn-es] make custom snapshot url a feature (#45750)
* [kbn-es] make custom snapshot url a feature

* download es snapshot first

(cherry picked from commit 510566d66b)
2019-09-15 08:12:47 -07:00
Spencer 65a31173c2
[7.x] Call failure reporter directly from Jenkinsfile (#45551) (#45668)
* Run failed_tests/cli once per node

* force failures for testing

* Revert "force failures for testing"

This reverts commit 3ddd9240fe.
2019-09-13 13:43:48 -07:00
Spencer 5fc3d0639f Revert "Revert "Revert "Revert "[ci] compress jobs for CI stab… (#45454)
* Revert "Revert "Revert "Revert "[ci] compress jobs for CI stability" (#44584)"""

This reverts commit 148b8c0f90.

* sync changes with Jenkinsfile

(cherry picked from commit 9a109f2170)
2019-09-11 15:28:14 -07: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
spalger d2235c6e6e disable jest suite that has no enabled tests (#44250)
(cherry picked from commit 61e1b83722)
2019-09-10 17:54:18 -07:00
spalger 65003f0cbc Revert "Revert "[ci] compress jobs for CI stability" (#44584) (#44673)"
This reverts commit 2584383be1.
2019-09-10 09:04:36 -07:00
Spencer 2584383be1
Revert "[ci] compress jobs for CI stability" (#44584) (#44673)
This reverts commit debf8c62b4.
2019-09-03 12:25:06 -07:00
Spencer 408bf82284
[ci] compress jobs for CI stability (#44353)
# Conflicts:
#	x-pack/test/functional/apps/dashboard_mode/index.js
#	x-pack/test/upgrade_assistant_integration/upgrade_assistant/index.js
2019-08-29 05:10:13 -07:00
Nicolas Chaulet badf663aa9
[Tests] Setup contract tests in x-pack (#42345) (#42613) 2019-08-05 13:28:03 -04:00
Court Ewing a973cbc7a9 Fix path references into and out of x-pack/legacy 2019-06-20 13:35:00 -04:00
Dmitry Lemeshko bc1234a9be
[firefox] Run functional tests in dedicated CI groups (#38416) (#39089)
* 2 jobs for Firefox tests

* review fixes

* make sh files executable

* add check reporter
2019-06-17 21:30:29 +03:00
Spencer 4cfdda4150 [percy] only execute percy setup when necessary (#39043)
(cherry picked from commit 9c1bdb9298)
2019-06-16 07:24:17 -07:00
liza-mae 9ce96bc567
[WIP] FTR Percy changes (#36897) (#38996)
* [ftr/percy] integrate percy with functional test runner

* execute ftr within `percy exec`

* share PERCY_BIN and GRUNT_BIN vars in setup

* [license] whitelist `(Unlicense OR Apache-2.0)`

* [percy] include pr/parallel info in env

* echo the actual variable value

* destructure required modules

* [ci] calculate percy env in a script

* remove outdated eslint overrides

* oops, nonce should be the same for each build

* take snapshots in context tests

* add percy snapshots to some dashboard tests

* account for extra execution of PERCY_BIN

* remove usage of percy service

* rename service to `visualTesting`

* write a simple test

* switch left-over percy test to visualTesting

* set log level for percy agent

* trigger ci

* try using the system chrome install instead of downloading one

* fix export definition

* Don't skip chromium download

* Add Spencer's fix to point to chrome installation

* Attempting to split tests into own ci job and test files

* Renumber job

* Add tag to decorations file

* Try new files with existing CI job

* Try again to create a new CI job

* Fix eslint problem with space

* eslint updates

* fix console test

* make test names unique

* Update ci group names

* Try old name again

* save

* add separate visual_regression ci job

* add visual regression ci job

* add new job to jobs.yml

* update path to take_percy_snapshot script

* use fixed percy job total

* fix common services import

* move visual_create_and_add_embeddables to visual_regression project

* finish moving create_and_add_embeddables

* add x-pack visual regression job

* migrate dashboard_snapshots tests to visual_regression

* remove references to removed test files

* restore some unnecessary changes

* reimplement the login page tests

* yarn.lock update

* fix test

* remove old CI_GROUP 100 block

* update failed_tests trap

* reduce yarn.lock changes

* disable debug logging

* disable visual-regression tests for now, we can enable them in specific prs
2019-06-14 12:16:48 -06:00
Spencer 238d24f38e
[7.x] [testFailureReporting] only run on master/version jobs (#38497) (#38547) 2019-06-10 08:35:08 -07:00
Frank Hassanabad d27c46454b
[SIEM] Add build step to find cyclic deps in SIEM project (#38329) (#38473)
* Adds a build step to find cyclic deps and error out in the SIEM project when found as part of a build step.

* Fixes typescript files that have cycles with their constants and types.

You run this like so:

```
cd kibana/x-pack/plugins/siem
node scripts/check_circular_deps.js
```

And get this message:
<img width="846" alt="Screen Shot 2019-06-07 at 11 22 24 AM" src="https://user-images.githubusercontent.com/1151048/59121970-b629f680-8916-11e9-8683-326a881c4725.png">

Or you will get an error with a listing of deps that need to be updated which have cycles in them.

Use ~~strikethroughs~~ to remove checklist items you don't feel are applicable to this PR.

~~- [ ] This was checked for cross-browser compatibility, [including a check against IE11](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#cross-browser-compatibility)~~
~~- [ ] Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/master/packages/kbn-i18n/README.md)~~
~~- [ ] [Documentation](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#writing-documentation) was added for features that require explanation or tutorials~~
- [x] [Unit or functional tests](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#cross-browser-compatibility) were updated or added to match the most common scenarios

~~- [ ] This was checked for [keyboard-only and screenreader accessibility](https://developer.mozilla.org/en-US/docs/Learn/Tools_and_testing/Cross_browser_testing/Accessibility#Accessibility_testing_checklist)~~

~~- [ ] This was checked for breaking API changes and was [labeled appropriately](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#release-notes-process)~~
~~- [ ] This includes a feature addition or change that requires a release note and was [labeled appropriately](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#release-notes-process)~~
2019-06-07 17:16:33 -06:00
Spencer 6836237898
[7.x] [jest] don't be crazy, run with caching enabled (#38332) (#38349) 2019-06-06 17:56:27 -07:00
spalger c7a65def48 [ci] disable firefox tests
(cherry picked from commit c655a11ece)
2019-06-06 14:29:27 -07:00
Spencer 7aea62aa61
[7.x] FTR: add support for Firefox browser (#32509) (#37750)
* skip and adjust functional tests for Firefox

* downgrade geckodriver to 0.22.0

* [ftr] add firefox specific config file

* remove hard coded firefox adjustments

* remove firefox specific screenshot directory

* run functional tests in firefox in x-pack

* pass the logger to readConfigFile()

* rename local var

* skip xpack firefox config

* run xpack firefox functional tests in separate command

* update report name for XPack firefox results

* adjust viz shared item test

* skip shared item test

* [test/feature_controls] increase timeout to 20 sec & use forceLogout

* FF timeout on TSVB, refresh page on failure for url navigation

* [feature_controls/visualize_security] increase timeout to 20 sec

* skip dev_tools_spaces tests on FF

* run all groups 3 times

* skip more func tests

* skip more tests

* skip all feature controls tests for Firefox

* revert back changes in feature controls tests

* rename xpack report for chrome

* skip tile map for FF, wait for render before saving

* Revert "run all groups 3 times"

This reverts commit 12b4f69627.

* revert refresh on login

* apply feedback
2019-05-31 17:18:31 -07:00
Lee Drengenberg cf0dd0bf54
[7.x] Split ciGroup3 and ciGroup5 (#36928) (#37122)
* Split ciGroup3 and ciGroup5 (#36928)

* split large x-pack ciGroup5 into 3 groups

* split large x-pack ciGroup3 into 2 groups

* Add groups to the jenkins xpack ci group file

* Re-level some more work

* move es_search_source test to new describe block

* move es_search_source to first in ciGroup7

* move to x-pack-ciGroup6
2019-05-24 17:35:22 -05:00
Matthew Kime f373ab974c
implementing github checks - second attempt (#35757) (#35906)
implement github checks in ci
2019-05-01 19:53:02 -05:00
spalger 47840b9d5b Revert "merge (#35377)"
This reverts commit fdd9e90fb3.
2019-04-23 15:48:23 -07:00
Matthew Kime fdd9e90fb3
merge (#35377) 2019-04-19 18:08:04 -05:00
Stacey Gammon ad60c228f8
Typescript sample panel action (#33602) (#33871)
* Typescript sample panel action

* Update EUI version to match main cabana version

* update yarn.lock

* add back typings include

* use correct relative path
2019-03-26 16:45:53 -04:00
Peter Pisljar a0a1b594c6
adding runPipeline tests (#27015) (#33637) 2019-03-21 08:36:39 +01:00
Spencer a053a55013
Refactor ES-related environment variables (#33036) (#33169)
* [ci/es] base default es version on pkg.branch value

* [ci/env] initialize $TEST_ES_FROM in checkout_sibling_es.sh

* [UA] remove TEST_ES_SNAPSHOT_VERSION override

* [ci/es] call checkout_sibling_es.sh from one location

* [ci] remove unused `--from` param

* [ci/env] always default to snapshots, switch to source when necessary

* [kbn/test] default esFrom to $TEST_ES_FROM

* [ci/setup] fix define order

* [ci/grunt] don't pass --esFrom let env pass through

* [ci/env] use branch, not version

* [ci] use same indent style as following lines

* [kbn/test] apply default values when processing args

* [kbn/test] simplify defaults, read default on each process
2019-03-13 13:18:51 -07:00
spalger 75dae0aab2 [x-pack/jest/integration] Jest runs setup hook when tests are skipped...
(cherry picked from commit 33dc8e6cfd)
2019-03-11 22:05:43 -07:00
nicknak 059d4b14f7
Testing/Removal of throw on console error (#29983) (#32692)
* Use hosts instead of url for elasticsearch.

* Adds jest integration tests to run in xpack intake.

* Reverting the exclusion of throwing errors in tests.

* Strange test that seems to fail without console error exception being thrown.

* Fix issues with wrong props for EuiInMemoryTable.

* Removes the masking of console errors in tests.
2019-03-08 08:46:27 -05:00
Matt Apperson 09a3728bc2
fix xpack integration tests, add to CI (#30883) (#31151)
* fix xpack integration tests, add to CI

* faster tests, intigration runs in paralel

* fix intigration test

* revert hard-coding test env to node
2019-02-14 15:08:33 -05:00
Tyler Smalley ef1e5b4288 [ci] Use trap to generate report for non-PR build (#26829)
Since this is no longer part of a reporting task in Jenkins, we no
longer need to re-run kbn bootstrap when generating a report.

We use the PR_SOURCE_BRANCH environment variable to prevent genererating
Github issues when we are on a PR.

Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
2019-01-08 17:13:12 -06:00
nicknak ac75236b78
Reporting phantom and chromium tests should run in parallel. (#26566)
* Reporting phantom and chromium tests should run in parallel.

* Chromium tests should be done in group 9.

* Attempting to use group 2 in ci for chromium tests.

* X-pack CI jobs should have 7 groups.

* Phantom tests should be in group 7.
2018-12-06 13:45:40 -05:00
spalger 9e94fef2ee [ci] every script needs to have set -e 2018-11-29 03:08:10 -08:00
Spencer 555036447d
[ci] simplify ci_setup scripts (#26215)
Cleanup some of the legacy bits from our ci_setup, simplify the setup necessary in child CI scripts, and unify the more generic bits of the scripts.
2018-11-28 15:37:36 -08:00
Spencer fad8d0cc3a
[ci][ftr][kbn/test] split up CI jobs (#25838)
* [ci][ftr][kbn/test] split up CI jobs

* [ci] run --assert-none-excluded in ci groups, before builds

* [ftr] improve error message when excluded tests found

* [ci] document other places the ciGroups live
2018-11-20 14:02:06 -08:00
Tiago Costa a6818b392d
Run jenkins:unit task with dev flag in order to run license check (#19832)
* chore(19674): added dev flag when calling jenkins:unit grunt task so we can check dev licenses on ours ci jobs.

* chore(NA): update yarn lock files with integrity info.
2018-11-12 19:02:48 +00:00
Spencer 223e3dc6ee
[ui] default to k7Design in releases (#25487)
* [ui] default to k7Design in releases

* [ci] don't build in release mode for testing

* [ci] run SNAPSHOT build
2018-11-09 18:01:48 -08:00
liza-mae 7748fe633f
Fix the jenkins job for cloud to export headless browser variable (#25242) 2018-11-06 12:48:48 -07:00
liza-mae fabbfdcd12
Replace xvfb with headless browser (#24904)
* Replace xvfb with headless browser

* Update karma to run in headless chrome

Update Karma tests for an option to run chrome in headless.

* Fix lint issues

* Fix spaces
2018-11-05 10:40:42 -07:00
Spencer 84e72d3ef6
[ftr] allow filtering suites by tag (#25021)
Closes #22840

In the functional tests we want a better way to include/exclude certain tests, especially as we move forward with #22359. This PR allows us to decorate suite objects with "tags", which won't clutter up the test names and can be used to filter out specific tests within a single test config. The functional test runner supports defining `--include-tag` and `--exclude-tag` CLI arguments, and multiple can be defined.

The method of filtering out tests for running against cloud has been updated to use this approach and I plan to do the same to #22359 once this is merged.
2018-11-02 13:06:25 -07:00
liza-mae 78e212e32d
Add argument passing to jenkins cloud job (#23538) 2018-09-26 14:35:16 -06:00
Josh Dover 3c806b86b4
Setup yarn in current shell for jenkins test report script (#23531)
* Setup yarn in current shell [skip ci]

* Use setup.sh
2018-09-26 10:12:24 -05:00
Josh Dover eb1cfaf0f8
Add jenkins:report task for test failures (#22682)
* Add jenkins:report task

* PR comments
2018-09-21 09:31:51 -05:00
Jonathan Budzenski 03553dedbc [ci] Run ES snapshot when possible (#22663)
For instances where we would otherwise be running from source in a tracked elastic/elasticsearch branch, let's use a snapshot instead. This will eliminate some gradle issues we are experiencing in master.
2018-09-06 16:31:47 -07:00