Skip to content

Commit 0dd3b32

Browse files
committed
Merge remote-tracking branch 'upstream/master' into feature/e2e-changes
* upstream/master: (315 commits) [APM] Fix failing `ApmIndices` test (elastic#64965) [APM] Fix paths for ts optimization script (elastic#65012) Use HDR for percentiles (elastic#64758) [EPM] fix updates available filter (elastic#64957) [Uptime] Certificates page (elastic#64059) load lens app lazily (elastic#64769) [legacy/server/config] remove unnecessary deps for simple helper (elastic#64954) Fixed alert Edit flyout shows the error message when one of this actions has a preconfigured action type (elastic#64742) [data.search.aggs] Remove legacy aggs APIs. (elastic#64719) Fixed `AddAlert` flyout does not immediately update state to reflect new props (elastic#64927) [Discover] Show doc viewer action buttons on focus (elastic#64912) [EPM] restrict package install endpoint from installing/updating to old packages (elastic#64932) [Metrics UI] Add inventory metric threshold alerts (elastic#64292) [Canvas] Adds edit menu (elastic#64738) [Canvas] Adds refresh and autoplay options to view menu (elastic#64375) [Lens] Trigger a filter action on click in datatable visualization (elastic#63840) [SIEM][CASE] Refactor Connectors - Jira Connector (elastic#63450) [APM] Client new platform migration (elastic#64046) [Monitoring] NP Migration complete client cutover (elastic#62908) Ingest Node Pipelines UI (elastic#62321) ...
2 parents 833c93f + c995a33 commit 0dd3b32

File tree

8,216 files changed

+217958
-160382
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

8,216 files changed

+217958
-160382
lines changed

.ci/Jenkinsfile_coverage

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
library 'kibana-pipeline-library'
44
kibanaLibrary.load() // load from the Jenkins instance
55

6-
kibanaPipeline(timeoutMinutes: 180) {
6+
kibanaPipeline(timeoutMinutes: 240) {
77
catchErrors {
88
withEnv([
99
'CODE_COVERAGE=1', // Needed for multiple ci scripts, such as remote.ts, test/scripts/*.sh, schema.js, etc.

.ci/end2end.groovy

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ pipeline {
1212
environment {
1313
BASE_DIR = 'src/github.com/elastic/kibana'
1414
HOME = "${env.WORKSPACE}"
15-
E2E_DIR = 'x-pack/legacy/plugins/apm/e2e'
15+
E2E_DIR = 'x-pack/plugins/apm/e2e'
1616
PIPELINE_LOG_LEVEL = 'DEBUG'
1717
}
1818
options {
@@ -38,7 +38,7 @@ pipeline {
3838
shallow: false, reference: "/var/lib/jenkins/.git-references/kibana.git")
3939
script {
4040
dir("${BASE_DIR}"){
41-
def regexps =[ "^x-pack/legacy/plugins/apm/.*" ]
41+
def regexps =[ "^x-pack/plugins/apm/.*" ]
4242
env.APM_UPDATED = isGitRegionMatch(patterns: regexps)
4343
}
4444
}

.eslintignore

Lines changed: 35 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,49 @@
1-
node_modules
2-
bower_components
3-
/data
4-
/optimize
5-
/build
6-
/target
1+
**/*.js.snap
2+
**/graphql/types.ts
73
/.es
8-
/plugins
4+
/build
95
/built_assets
6+
/data
107
/html_docs
11-
/src/plugins/data/common/es_query/kuery/ast/_generated_/**
12-
/src/plugins/vis_type_timelion/public/_generated_/**
13-
src/legacy/core_plugins/vis_type_vislib/public/vislib/__tests__/lib/fixtures/mock_data
14-
/src/legacy/ui/public/flot-charts
8+
/optimize
9+
/plugins
1510
/test/fixtures/scenarios
16-
/src/legacy/core_plugins/console/public/webpackShims
11+
/x-pack/build
12+
node_modules
13+
target
14+
15+
!/.eslintrc.js
16+
17+
# plugin overrides
18+
/src/core/lib/kbn_internal_native_observable
1719
/src/legacy/core_plugins/console/public/tests/webpackShims
20+
/src/legacy/core_plugins/console/public/webpackShims
21+
/src/legacy/plugin_discovery/plugin_pack/__tests__/fixtures/plugins/broken
22+
/src/legacy/ui/public/flot-charts
1823
/src/legacy/ui/public/utils/decode_geo_hash.js
24+
/src/plugins/data/common/es_query/kuery/ast/_generated_/**
25+
/src/plugins/vis_type_timelion/public/_generated_/**
1926
/src/plugins/vis_type_timelion/public/webpackShims/jquery.flot.*
20-
/src/core/lib/kbn_internal_native_observable
21-
/packages/*/target
22-
/packages/eslint-config-kibana
23-
/packages/kbn-pm/dist
24-
/packages/kbn-plugin-generator/sao_template/template
25-
/packages/kbn-ui-framework/dist
26-
/packages/kbn-ui-framework/doc_site/build
27-
/packages/kbn-ui-framework/generator-kui/*/templates/
28-
/packages/kbn-test/src/functional_test_runner/__tests__/fixtures/
29-
/packages/kbn-test/src/functional_test_runner/lib/config/__tests__/fixtures/
30-
/x-pack/legacy/plugins/maps/public/vendor/**
31-
/x-pack/coverage
32-
/x-pack/build
3327
/x-pack/legacy/plugins/**/__tests__/fixtures/**
34-
/packages/kbn-interpreter/src/common/lib/grammar.js
28+
/x-pack/legacy/plugins/apm/e2e/cypress/**/snapshots.js
3529
/x-pack/legacy/plugins/canvas/canvas_plugin
30+
/x-pack/legacy/plugins/canvas/canvas_plugin_src/lib/flot-charts
3631
/x-pack/legacy/plugins/canvas/shareable_runtime/build
3732
/x-pack/legacy/plugins/canvas/storybook
38-
/x-pack/legacy/plugins/canvas/canvas_plugin_src/lib/flot-charts
33+
/x-pack/plugins/monitoring/public/lib/jquery_flot
3934
/x-pack/legacy/plugins/infra/common/graphql/types.ts
4035
/x-pack/legacy/plugins/infra/public/graphql/types.ts
4136
/x-pack/legacy/plugins/infra/server/graphql/types.ts
42-
/x-pack/legacy/plugins/apm/e2e/cypress/**/snapshots.js
43-
/src/legacy/plugin_discovery/plugin_pack/__tests__/fixtures/plugins/broken
44-
**/graphql/types.ts
45-
**/*.js.snap
46-
!/.eslintrc.js
37+
/x-pack/legacy/plugins/maps/public/vendor/**
38+
39+
# package overrides
40+
/packages/eslint-config-kibana
41+
/packages/kbn-interpreter/src/common/lib/grammar.js
42+
/packages/kbn-plugin-generator/sao_template/template
43+
/packages/kbn-pm/dist
44+
/packages/kbn-test/src/functional_test_runner/__tests__/fixtures/
45+
/packages/kbn-test/src/functional_test_runner/lib/config/__tests__/fixtures/
46+
/packages/kbn-ui-framework/dist
47+
/packages/kbn-ui-framework/doc_site/build
48+
/packages/kbn-ui-framework/generator-kui/*/templates/
49+

.eslintrc.js

Lines changed: 144 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ module.exports = {
9696
},
9797
},
9898
{
99-
files: ['x-pack/legacy/plugins/cross_cluster_replication/**/*.{js,ts,tsx}'],
99+
files: ['x-pack/plugins/cross_cluster_replication/**/*.{js,ts,tsx}'],
100100
rules: {
101101
'jsx-a11y/click-events-have-key-events': 'off',
102102
},
@@ -185,31 +185,43 @@ module.exports = {
185185
zones: [
186186
{
187187
target: [
188-
'src/legacy/**/*',
189-
'x-pack/**/*',
190-
'!x-pack/**/*.test.*',
191-
'!x-pack/test/**/*',
188+
'(src|x-pack)/legacy/**/*',
192189
'(src|x-pack)/plugins/**/(public|server)/**/*',
193-
'src/core/(public|server)/**/*',
194190
'examples/**/*',
195191
],
196192
from: [
197193
'src/core/public/**/*',
198-
'!src/core/public/index.ts',
199-
'!src/core/public/mocks.ts',
200-
'!src/core/public/*.test.mocks.ts',
194+
'!src/core/public/index.ts', // relative import
195+
'!src/core/public/mocks{,.ts}',
196+
'!src/core/server/types{,.ts}',
201197
'!src/core/public/utils/**/*',
198+
'!src/core/public/*.test.mocks{,.ts}',
202199

203200
'src/core/server/**/*',
204-
'!src/core/server/index.ts',
205-
'!src/core/server/mocks.ts',
206-
'!src/core/server/types.ts',
207-
'!src/core/server/test_utils.ts',
201+
'!src/core/server/index.ts', // relative import
202+
'!src/core/server/mocks{,.ts}',
203+
'!src/core/server/types{,.ts}',
204+
'!src/core/server/test_utils',
208205
// for absolute imports until fixed in
209206
// https://github.com/elastic/kibana/issues/36096
210-
'!src/core/server/types',
211-
'!src/core/server/*.test.mocks.ts',
212-
207+
'!src/core/server/*.test.mocks{,.ts}',
208+
],
209+
allowSameFolder: true,
210+
errorMessage:
211+
'Plugins may only import from top-level public and server modules in core.',
212+
},
213+
{
214+
target: [
215+
'(src|x-pack)/legacy/**/*',
216+
'(src|x-pack)/plugins/**/(public|server)/**/*',
217+
'examples/**/*',
218+
'!(src|x-pack)/**/*.test.*',
219+
'!(x-pack/)?test/**/*',
220+
// next folder contains legacy browser tests which can't be migrated to jest
221+
// which import np files
222+
'!src/legacy/core_plugins/kibana/public/__tests__/**/*',
223+
],
224+
from: [
213225
'(src|x-pack)/plugins/**/(public|server)/**/*',
214226
'!(src|x-pack)/plugins/**/(public|server)/(index|mocks).{js,ts,tsx}',
215227
],
@@ -553,7 +565,7 @@ module.exports = {
553565
*/
554566
{
555567
// front end typescript and javascript files only
556-
files: ['x-pack/legacy/plugins/siem/public/**/*.{js,ts,tsx}'],
568+
files: ['x-pack/plugins/siem/public/**/*.{js,ts,tsx}'],
557569
rules: {
558570
'import/no-nodejs-modules': 'error',
559571
'no-restricted-imports': [
@@ -602,7 +614,7 @@ module.exports = {
602614
// {
603615
// // will introduced after the other warns are fixed
604616
// // typescript and javascript for front end react performance
605-
// files: ['x-pack/legacy/plugins/siem/public/**/!(*.test).{js,ts,tsx}'],
617+
// files: ['x-pack/plugins/siem/public/**/!(*.test).{js,ts,tsx}'],
606618
// plugins: ['react-perf'],
607619
// rules: {
608620
// // 'react-perf/jsx-no-new-object-as-prop': 'error',
@@ -730,6 +742,114 @@ module.exports = {
730742
},
731743
},
732744

745+
/**
746+
* Lists overrides
747+
*/
748+
{
749+
// typescript and javascript for front and back end
750+
files: ['x-pack/plugins/lists/**/*.{js,ts,tsx}'],
751+
plugins: ['eslint-plugin-node'],
752+
env: {
753+
mocha: true,
754+
jest: true,
755+
},
756+
rules: {
757+
'accessor-pairs': 'error',
758+
'array-callback-return': 'error',
759+
'no-array-constructor': 'error',
760+
complexity: 'error',
761+
'consistent-return': 'error',
762+
'func-style': ['error', 'expression'],
763+
'import/order': [
764+
'error',
765+
{
766+
groups: ['builtin', 'external', 'internal', 'parent', 'sibling', 'index'],
767+
'newlines-between': 'always',
768+
},
769+
],
770+
'sort-imports': [
771+
'error',
772+
{
773+
ignoreDeclarationSort: true,
774+
},
775+
],
776+
'node/no-deprecated-api': 'error',
777+
'no-bitwise': 'error',
778+
'no-continue': 'error',
779+
'no-dupe-keys': 'error',
780+
'no-duplicate-case': 'error',
781+
'no-duplicate-imports': 'error',
782+
'no-empty-character-class': 'error',
783+
'no-empty-pattern': 'error',
784+
'no-ex-assign': 'error',
785+
'no-extend-native': 'error',
786+
'no-extra-bind': 'error',
787+
'no-extra-boolean-cast': 'error',
788+
'no-extra-label': 'error',
789+
'no-func-assign': 'error',
790+
'no-implicit-globals': 'error',
791+
'no-implied-eval': 'error',
792+
'no-invalid-regexp': 'error',
793+
'no-inner-declarations': 'error',
794+
'no-lone-blocks': 'error',
795+
'no-multi-assign': 'error',
796+
'no-misleading-character-class': 'error',
797+
'no-new-symbol': 'error',
798+
'no-obj-calls': 'error',
799+
'no-param-reassign': ['error', { props: true }],
800+
'no-process-exit': 'error',
801+
'no-prototype-builtins': 'error',
802+
'no-return-await': 'error',
803+
'no-self-compare': 'error',
804+
'no-shadow-restricted-names': 'error',
805+
'no-sparse-arrays': 'error',
806+
'no-this-before-super': 'error',
807+
'no-undef': 'error',
808+
'no-unreachable': 'error',
809+
'no-unsafe-finally': 'error',
810+
'no-useless-call': 'error',
811+
'no-useless-catch': 'error',
812+
'no-useless-concat': 'error',
813+
'no-useless-computed-key': 'error',
814+
'no-useless-escape': 'error',
815+
'no-useless-rename': 'error',
816+
'no-useless-return': 'error',
817+
'no-void': 'error',
818+
'one-var-declaration-per-line': 'error',
819+
'prefer-object-spread': 'error',
820+
'prefer-promise-reject-errors': 'error',
821+
'prefer-rest-params': 'error',
822+
'prefer-spread': 'error',
823+
'prefer-template': 'error',
824+
'require-atomic-updates': 'error',
825+
'symbol-description': 'error',
826+
'vars-on-top': 'error',
827+
'@typescript-eslint/explicit-member-accessibility': 'error',
828+
'@typescript-eslint/no-this-alias': 'error',
829+
'@typescript-eslint/no-explicit-any': 'error',
830+
'@typescript-eslint/no-useless-constructor': 'error',
831+
'@typescript-eslint/unified-signatures': 'error',
832+
'@typescript-eslint/explicit-function-return-type': 'error',
833+
'@typescript-eslint/no-non-null-assertion': 'error',
834+
'@typescript-eslint/no-unused-vars': 'error',
835+
'no-template-curly-in-string': 'error',
836+
'sort-keys': 'error',
837+
'prefer-destructuring': 'error',
838+
},
839+
},
840+
/**
841+
* Alerting Services overrides
842+
*/
843+
{
844+
// typescript only for front and back end
845+
files: [
846+
'x-pack/{,legacy/}plugins/{alerting,alerting_builtins,actions,task_manager,event_log}/**/*.{ts,tsx}',
847+
],
848+
rules: {
849+
'@typescript-eslint/no-explicit-any': 'error',
850+
},
851+
},
852+
733853
/**
734854
* Lens overrides
735855
*/
@@ -843,6 +963,12 @@ module.exports = {
843963
jquery: true,
844964
},
845965
},
966+
{
967+
files: ['x-pack/plugins/monitoring/public/lib/jquery_flot/**/*.js'],
968+
env: {
969+
jquery: true,
970+
},
971+
},
846972

847973
/**
848974
* TSVB overrides

0 commit comments

Comments
 (0)