Skip to content

Commit 5228484

Browse files
committed
Merge branch 'master' of github.com:elastic/kibana into i18n/fix_eui_tokens
2 parents 09339b8 + ae8f8e1 commit 5228484

File tree

4,319 files changed

+209092
-170214
lines changed

Some content is hidden

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

4,319 files changed

+209092
-170214
lines changed

.ci/Jenkinsfile_baseline_capture

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@ kibanaPipeline(timeoutMinutes: 120) {
1212
]) {
1313
parallel([
1414
'oss-baseline': {
15-
workers.ci(name: 'oss-baseline', size: 's-highmem', ramDisk: true, runErrorReporter: false) {
15+
workers.ci(name: 'oss-baseline', size: 'l', ramDisk: true, runErrorReporter: false) {
1616
kibanaPipeline.functionalTestProcess('oss-baseline', './test/scripts/jenkins_baseline.sh')()
1717
}
1818
},
1919
'xpack-baseline': {
20-
workers.ci(name: 'xpack-baseline', size: 's-highmem', ramDisk: true, runErrorReporter: false) {
20+
workers.ci(name: 'xpack-baseline', size: 'l', ramDisk: true, runErrorReporter: false) {
2121
kibanaPipeline.functionalTestProcess('xpack-baseline', './test/scripts/jenkins_xpack_baseline.sh')()
2222
}
2323
},

.ci/Jenkinsfile_coverage

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,12 @@ kibanaPipeline(timeoutMinutes: 240) {
1212
]) {
1313
workers.base(name: 'coverage-worker', size: 'l', ramDisk: false, bootstrapped: false) {
1414
catchError {
15+
16+
kibanaPipeline.bash("""
17+
echo '${TIME_STAMP}'
18+
""", "### Print Canonical Time Stamp")
19+
1520
kibanaCoverage.runTests()
16-
kibanaTeamAssign.load('team_assignment', "### Upload Team Assignment JSON")
1721
handleIngestion(TIME_STAMP)
1822
}
1923
handleFail()
@@ -30,8 +34,8 @@ def handleIngestion(timestamp) {
3034
kibanaCoverage.collectVcsInfo("### Collect VCS Info")
3135
kibanaCoverage.generateReports("### Merge coverage reports")
3236
kibanaCoverage.uploadCombinedReports()
33-
kibanaCoverage.ingest(env.JOB_NAME, BUILD_NUMBER, BUILD_URL, timestamp, previousSha, '### Ingest && Upload')
3437
kibanaCoverage.uploadCoverageStaticSite(timestamp)
38+
kibanaCoverage.ingest(env.JOB_NAME, BUILD_NUMBER, BUILD_URL, timestamp, previousSha, teamAssignmentsPath(), '### Generate Team Assignments && Ingest')
3539
}
3640

3741
def handlePreviousSha() {
@@ -42,11 +46,15 @@ def handlePreviousSha() {
4246

4347
def handleFail() {
4448
def buildStatus = buildUtils.getBuildStatus()
45-
if(params.NOTIFY_ON_FAILURE && buildStatus != 'SUCCESS' && buildStatus != 'ABORTED' && buildStatus != 'UNSTABLE') {
49+
if (params.NOTIFY_ON_FAILURE && buildStatus != 'SUCCESS' && buildStatus != 'ABORTED' && buildStatus != 'UNSTABLE') {
4650
slackNotifications.sendFailedBuild(
4751
channel: '#kibana-qa',
4852
username: 'Kibana QA'
4953
)
5054
}
5155
}
5256

57+
def teamAssignmentsPath() {
58+
return 'src/dev/code_coverage/ingest_coverage/team_assignment/team_assignments.txt'
59+
}
60+

.eslintrc.js

Lines changed: 25 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,6 @@
1717
* under the License.
1818
*/
1919

20-
const { readdirSync } = require('fs');
21-
const { resolve } = require('path');
22-
2320
const APACHE_2_0_LICENSE_HEADER = `
2421
/*
2522
* Licensed to Elasticsearch B.V. under one or more contributor
@@ -288,7 +285,7 @@ module.exports = {
288285
},
289286
{
290287
target: [
291-
'(src|x-pack)/legacy/**/*',
288+
'src/legacy/**/*',
292289
'(src|x-pack)/plugins/**/(public|server)/**/*',
293290
'examples/**/*',
294291
],
@@ -319,14 +316,11 @@ module.exports = {
319316
},
320317
{
321318
target: [
322-
'(src|x-pack)/legacy/**/*',
319+
'src/legacy/**/*',
323320
'(src|x-pack)/plugins/**/(public|server)/**/*',
324321
'examples/**/*',
325322
'!(src|x-pack)/**/*.test.*',
326323
'!(x-pack/)?test/**/*',
327-
// next folder contains legacy browser tests which can't be migrated to jest
328-
// which import np files
329-
'!src/legacy/core_plugins/kibana/public/__tests__/**/*',
330324
],
331325
from: [
332326
'(src|x-pack)/plugins/**/(public|server)/**/*',
@@ -341,14 +335,6 @@ module.exports = {
341335
'(src|x-pack)/plugins/**/*',
342336
'!(src|x-pack)/plugins/**/server/**/*',
343337

344-
'src/legacy/core_plugins/**/*',
345-
'!src/legacy/core_plugins/**/server/**/*',
346-
'!src/legacy/core_plugins/**/index.{js,mjs,ts,tsx}',
347-
348-
'x-pack/legacy/plugins/**/*',
349-
'!x-pack/legacy/plugins/**/server/**/*',
350-
'!x-pack/legacy/plugins/**/index.{js,mjs,ts,tsx}',
351-
352338
'examples/**/*',
353339
'!examples/**/server/**/*',
354340
],
@@ -370,12 +356,7 @@ module.exports = {
370356
},
371357
{
372358
target: ['src/core/**/*'],
373-
from: [
374-
'plugins/**/*',
375-
'src/plugins/**/*',
376-
'src/legacy/core_plugins/**/*',
377-
'src/legacy/ui/**/*',
378-
],
359+
from: ['plugins/**/*', 'src/plugins/**/*', 'src/legacy/ui/**/*'],
379360
errorMessage: 'The core cannot depend on any plugins.',
380361
},
381362
{
@@ -388,12 +369,6 @@ module.exports = {
388369
target: [
389370
'test/plugin_functional/plugins/**/public/np_ready/**/*',
390371
'test/plugin_functional/plugins/**/server/np_ready/**/*',
391-
'src/legacy/core_plugins/**/public/np_ready/**/*',
392-
'src/legacy/core_plugins/vis_type_*/public/**/*',
393-
'!src/legacy/core_plugins/vis_type_*/public/legacy*',
394-
'src/legacy/core_plugins/**/server/np_ready/**/*',
395-
'x-pack/legacy/plugins/**/public/np_ready/**/*',
396-
'x-pack/legacy/plugins/**/server/np_ready/**/*',
397372
],
398373
allowSameFolder: true,
399374
errorMessage:
@@ -413,6 +388,7 @@ module.exports = {
413388
*/
414389
{
415390
files: [
391+
'**/*.stories.tsx',
416392
'x-pack/test/apm_api_integration/**/*.ts',
417393
'x-pack/test/functional/apps/**/*.js',
418394
'x-pack/plugins/apm/**/*.js',
@@ -443,22 +419,14 @@ module.exports = {
443419
settings: {
444420
// instructs import/no-extraneous-dependencies to treat certain modules
445421
// as core modules, even if they aren't listed in package.json
446-
'import/core-modules': ['plugins', 'legacy/ui'],
422+
'import/core-modules': ['plugins'],
447423

448424
'import/resolver': {
449425
'@kbn/eslint-import-resolver-kibana': {
450426
forceNode: false,
451427
rootPackageName: 'kibana',
452428
kibanaPath: '.',
453-
pluginMap: readdirSync(resolve(__dirname, 'x-pack/legacy/plugins')).reduce(
454-
(acc, name) => {
455-
if (!name.startsWith('_')) {
456-
acc[name] = `x-pack/legacy/plugins/${name}`;
457-
}
458-
return acc;
459-
},
460-
{}
461-
),
429+
pluginMap: {},
462430
},
463431
},
464432
},
@@ -764,16 +732,6 @@ module.exports = {
764732
},
765733
},
766734

767-
/**
768-
* GIS overrides
769-
*/
770-
{
771-
files: ['x-pack/legacy/plugins/maps/**/*.js'],
772-
rules: {
773-
'react/prefer-stateless-function': [0, { ignorePureComponents: false }],
774-
},
775-
},
776-
777735
/**
778736
* ML overrides
779737
*/
@@ -812,7 +770,7 @@ module.exports = {
812770
},
813771
{
814772
// typescript only for front and back end
815-
files: ['x-pack/{,legacy/}plugins/security_solution/**/*.{ts,tsx}'],
773+
files: ['x-pack/plugins/security_solution/**/*.{ts,tsx}'],
816774
rules: {
817775
// This will be turned on after bug fixes are complete
818776
// '@typescript-eslint/explicit-member-accessibility': 'warn',
@@ -858,7 +816,7 @@ module.exports = {
858816
// },
859817
{
860818
// typescript and javascript for front and back end
861-
files: ['x-pack/{,legacy/}plugins/security_solution/**/*.{js,mjs,ts,tsx}'],
819+
files: ['x-pack/plugins/security_solution/**/*.{js,mjs,ts,tsx}'],
862820
plugins: ['eslint-plugin-node', 'react'],
863821
env: {
864822
mocha: true,
@@ -1089,7 +1047,7 @@ module.exports = {
10891047
{
10901048
// typescript only for front and back end
10911049
files: [
1092-
'x-pack/{,legacy/}plugins/{alerts,alerting_builtins,actions,task_manager,event_log}/**/*.{ts,tsx}',
1050+
'x-pack/plugins/{alerts,alerting_builtins,actions,task_manager,event_log}/**/*.{ts,tsx}',
10931051
],
10941052
rules: {
10951053
'@typescript-eslint/no-explicit-any': 'error',
@@ -1238,10 +1196,7 @@ module.exports = {
12381196
* TSVB overrides
12391197
*/
12401198
{
1241-
files: [
1242-
'src/plugins/vis_type_timeseries/**/*.{js,mjs,ts,tsx}',
1243-
'src/legacy/core_plugins/vis_type_timeseries/**/*.{js,mjs,ts,tsx}',
1244-
],
1199+
files: ['src/plugins/vis_type_timeseries/**/*.{js,mjs,ts,tsx}'],
12451200
rules: {
12461201
'import/no-default-export': 'error',
12471202
},
@@ -1275,5 +1230,20 @@ module.exports = {
12751230
'@typescript-eslint/prefer-ts-expect-error': 'error',
12761231
},
12771232
},
1233+
{
1234+
files: [
1235+
'**/public/**/*.{js,mjs,ts,tsx}',
1236+
'**/common/**/*.{js,mjs,ts,tsx}',
1237+
'packages/**/*.{js,mjs,ts,tsx}',
1238+
],
1239+
rules: {
1240+
'no-restricted-imports': [
1241+
'error',
1242+
{
1243+
patterns: ['lodash/*', '!lodash/fp'],
1244+
},
1245+
],
1246+
},
1247+
},
12781248
],
12791249
};

0 commit comments

Comments
 (0)