Skip to content

Commit d4b1808

Browse files
Merge branch 'master' into maps/introduce_fields
2 parents 066865d + 2589441 commit d4b1808

File tree

2,260 files changed

+52398
-78576
lines changed

Some content is hidden

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

2,260 files changed

+52398
-78576
lines changed

.ci/Jenkinsfile_flaky

Lines changed: 113 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
#!/bin/groovy
2+
3+
library 'kibana-pipeline-library'
4+
kibanaLibrary.load()
5+
6+
// Looks like 'oss:ciGroup:1' or 'oss:firefoxSmoke'
7+
def JOB_PARTS = params.CI_GROUP.split(':')
8+
def IS_XPACK = JOB_PARTS[0] == 'xpack'
9+
def JOB = JOB_PARTS[1]
10+
def CI_GROUP = JOB_PARTS.size() > 2 ? JOB_PARTS[2] : ''
11+
12+
def worker = getWorkerFromParams(IS_XPACK, JOB, CI_GROUP)
13+
14+
def workerFailures = []
15+
16+
currentBuild.displayName += trunc(" ${params.GITHUB_OWNER}:${params.branch_specifier}", 24)
17+
currentBuild.description = "${params.CI_GROUP}<br />Executions: ${params.NUMBER_EXECUTIONS}"
18+
19+
// Note: If you increase agent count, it will execute NUMBER_EXECUTIONS per agent. It will not divide them up amongst the agents
20+
// e.g. NUMBER_EXECUTIONS = 25, agentCount = 4 results in 100 total executions
21+
def agentCount = 1
22+
23+
stage("Kibana Pipeline") {
24+
timeout(time: 180, unit: 'MINUTES') {
25+
timestamps {
26+
ansiColor('xterm') {
27+
def agents = [:]
28+
for(def agentNumber = 1; agentNumber <= agentCount; agentNumber++) {
29+
agents["agent-${agentNumber}"] = {
30+
catchError {
31+
kibanaPipeline.withWorkers('flaky-test-runner', {
32+
if (!IS_XPACK) {
33+
kibanaPipeline.buildOss()
34+
if (CI_GROUP == '1') {
35+
runbld "./test/scripts/jenkins_build_kbn_tp_sample_panel_action.sh"
36+
}
37+
} else {
38+
kibanaPipeline.buildXpack()
39+
}
40+
}, getWorkerMap(agentNumber, params.NUMBER_EXECUTIONS.toInteger(), worker, workerFailures))()
41+
}
42+
}
43+
}
44+
45+
parallel(agents)
46+
47+
currentBuild.description += ", Failures: ${workerFailures.size()}"
48+
49+
if (workerFailures.size() > 0) {
50+
print "There were ${workerFailures.size()} test suite failures."
51+
print "The executions that failed were:"
52+
print workerFailures.join("\n")
53+
print "Please check 'Test Result' and 'Pipeline Steps' pages for more info"
54+
}
55+
}
56+
}
57+
}
58+
}
59+
60+
def getWorkerFromParams(isXpack, job, ciGroup) {
61+
if (!isXpack) {
62+
if (job == 'firefoxSmoke') {
63+
return kibanaPipeline.getPostBuildWorker('firefoxSmoke', { runbld './test/scripts/jenkins_firefox_smoke.sh' })
64+
} else if(job == 'visualRegression') {
65+
return kibanaPipeline.getPostBuildWorker('visualRegression', { runbld './test/scripts/jenkins_visual_regression.sh' })
66+
} else {
67+
return kibanaPipeline.getOssCiGroupWorker(ciGroup)
68+
}
69+
}
70+
71+
if (job == 'firefoxSmoke') {
72+
return kibanaPipeline.getPostBuildWorker('xpack-firefoxSmoke', { runbld './test/scripts/jenkins_xpack_firefox_smoke.sh' })
73+
} else if(job == 'visualRegression') {
74+
return kibanaPipeline.getPostBuildWorker('xpack-visualRegression', { runbld './test/scripts/jenkins_xpack_visual_regression.sh' })
75+
} else {
76+
return kibanaPipeline.getXpackCiGroupWorker(ciGroup)
77+
}
78+
}
79+
80+
def getWorkerMap(agentNumber, numberOfExecutions, worker, workerFailures, maxWorkers = 14) {
81+
def workerMap = [:]
82+
def numberOfWorkers = Math.min(numberOfExecutions, maxWorkers)
83+
84+
for(def i = 1; i <= numberOfWorkers; i++) {
85+
def workerExecutions = numberOfExecutions/numberOfWorkers + (i <= numberOfExecutions%numberOfWorkers ? 1 : 0)
86+
87+
workerMap["agent-${agentNumber}-worker-${i}"] = { workerNumber ->
88+
for(def j = 0; j < workerExecutions; j++) {
89+
print "Execute agent-${agentNumber} worker-${workerNumber}: ${j}"
90+
withEnv(["JOB=agent-${agentNumber}-worker-${workerNumber}-${j}"]) {
91+
catchError {
92+
try {
93+
worker(workerNumber)
94+
} catch (ex) {
95+
workerFailures << "agent-${agentNumber} worker-${workerNumber}-${j}"
96+
throw ex
97+
}
98+
}
99+
}
100+
}
101+
}
102+
}
103+
104+
return workerMap
105+
}
106+
107+
def trunc(str, length) {
108+
if (str.size() >= length) {
109+
return str.take(length) + "..."
110+
}
111+
112+
return str;
113+
}

.eslintrc.js

Lines changed: 187 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,193 @@ module.exports = {
5555
extends: ['@elastic/eslint-config-kibana', 'plugin:@elastic/eui/recommended'],
5656

5757
overrides: [
58+
/**
59+
* Temporarily disable some react rules for specific plugins, remove in separate PRs
60+
*/
61+
{
62+
files: ['packages/kbn-ui-framework/**/*.{js,ts,tsx}'],
63+
rules: {
64+
'jsx-a11y/no-onchange': 'off',
65+
},
66+
},
67+
{
68+
files: ['src/core/public/application/**/*.{js,ts,tsx}'],
69+
rules: {
70+
'react/no-danger': 'off',
71+
},
72+
},
73+
{
74+
files: ['src/legacy/core_plugins/console/**/*.{js,ts,tsx}'],
75+
rules: {
76+
'react-hooks/exhaustive-deps': 'off',
77+
},
78+
},
79+
{
80+
files: ['src/legacy/core_plugins/data/**/*.{js,ts,tsx}'],
81+
rules: {
82+
'react-hooks/exhaustive-deps': 'off',
83+
},
84+
},
85+
{
86+
files: ['src/legacy/core_plugins/expressions/**/*.{js,ts,tsx}'],
87+
rules: {
88+
'react-hooks/exhaustive-deps': 'off',
89+
},
90+
},
91+
{
92+
files: ['src/legacy/core_plugins/kbn_vislib_vis_types/**/*.{js,ts,tsx}'],
93+
rules: {
94+
'react-hooks/exhaustive-deps': 'off',
95+
},
96+
},
97+
{
98+
files: ['src/legacy/core_plugins/kibana/**/*.{js,ts,tsx}'],
99+
rules: {
100+
'react-hooks/rules-of-hooks': 'off',
101+
'react-hooks/exhaustive-deps': 'off',
102+
},
103+
},
104+
{
105+
files: ['src/legacy/core_plugins/tile_map/**/*.{js,ts,tsx}'],
106+
rules: {
107+
'react-hooks/exhaustive-deps': 'off',
108+
},
109+
},
110+
{
111+
files: ['src/legacy/core_plugins/vis_type_markdown/**/*.{js,ts,tsx}'],
112+
rules: {
113+
'react-hooks/exhaustive-deps': 'off',
114+
},
115+
},
116+
{
117+
files: ['src/legacy/core_plugins/vis_type_metric/**/*.{js,ts,tsx}'],
118+
rules: {
119+
'jsx-a11y/click-events-have-key-events': 'off',
120+
},
121+
},
122+
{
123+
files: ['src/legacy/core_plugins/vis_type_table/**/*.{js,ts,tsx}'],
124+
rules: {
125+
'react-hooks/exhaustive-deps': 'off',
126+
},
127+
},
128+
{
129+
files: ['src/legacy/core_plugins/vis_type_vega/**/*.{js,ts,tsx}'],
130+
rules: {
131+
'react-hooks/exhaustive-deps': 'off',
132+
},
133+
},
134+
{
135+
files: ['src/legacy/ui/public/vis/**/*.{js,ts,tsx}'],
136+
rules: {
137+
'react-hooks/exhaustive-deps': 'off',
138+
},
139+
},
140+
{
141+
files: ['src/plugins/es_ui_shared/**/*.{js,ts,tsx}'],
142+
rules: {
143+
'react-hooks/exhaustive-deps': 'off',
144+
},
145+
},
146+
{
147+
files: ['src/plugins/eui_utils/**/*.{js,ts,tsx}'],
148+
rules: {
149+
'react-hooks/exhaustive-deps': 'off',
150+
},
151+
},
152+
{
153+
files: ['src/plugins/kibana_react/**/*.{js,ts,tsx}'],
154+
rules: {
155+
'react-hooks/rules-of-hooks': 'off',
156+
'react-hooks/exhaustive-deps': 'off',
157+
},
158+
},
159+
{
160+
files: ['src/plugins/kibana_utils/**/*.{js,ts,tsx}'],
161+
rules: {
162+
'react-hooks/exhaustive-deps': 'off',
163+
},
164+
},
165+
{
166+
files: ['x-pack/legacy/plugins/canvas/**/*.{js,ts,tsx}'],
167+
rules: {
168+
'react-hooks/exhaustive-deps': 'off',
169+
'jsx-a11y/click-events-have-key-events': 'off',
170+
},
171+
},
172+
{
173+
files: ['x-pack/legacy/plugins/cross_cluster_replication/**/*.{js,ts,tsx}'],
174+
rules: {
175+
'jsx-a11y/click-events-have-key-events': 'off',
176+
},
177+
},
178+
{
179+
files: ['x-pack/legacy/plugins/graph/**/*.{js,ts,tsx}'],
180+
rules: {
181+
'react-hooks/exhaustive-deps': 'off',
182+
},
183+
},
184+
{
185+
files: ['x-pack/legacy/plugins/index_management/**/*.{js,ts,tsx}'],
186+
rules: {
187+
'react-hooks/exhaustive-deps': 'off',
188+
'react-hooks/rules-of-hooks': 'off',
189+
},
190+
},
191+
{
192+
files: ['x-pack/legacy/plugins/infra/**/*.{js,ts,tsx}'],
193+
rules: {
194+
'react-hooks/exhaustive-deps': 'off',
195+
'react-hooks/rules-of-hooks': 'off',
196+
},
197+
},
198+
{
199+
files: ['x-pack/legacy/plugins/lens/**/*.{js,ts,tsx}'],
200+
rules: {
201+
'react-hooks/exhaustive-deps': 'off',
202+
'react-hooks/rules-of-hooks': 'off',
203+
},
204+
},
205+
{
206+
files: ['x-pack/legacy/plugins/ml/**/*.{js,ts,tsx}'],
207+
rules: {
208+
'react-hooks/exhaustive-deps': 'off',
209+
},
210+
},
211+
{
212+
files: ['x-pack/legacy/plugins/monitoring/**/*.{js,ts,tsx}'],
213+
rules: {
214+
'jsx-a11y/click-events-have-key-events': 'off',
215+
},
216+
},
217+
{
218+
files: ['x-pack/legacy/plugins/siem/**/*.{js,ts,tsx}'],
219+
rules: {
220+
'react-hooks/exhaustive-deps': 'off',
221+
'react-hooks/rules-of-hooks': 'off',
222+
},
223+
},
224+
{
225+
files: ['x-pack/legacy/plugins/snapshot_restore/**/*.{js,ts,tsx}'],
226+
rules: {
227+
'react-hooks/exhaustive-deps': 'off',
228+
},
229+
},
230+
{
231+
files: ['x-pack/legacy/plugins/uptime/**/*.{js,ts,tsx}'],
232+
rules: {
233+
'react-hooks/exhaustive-deps': 'off',
234+
'react-hooks/rules-of-hooks': 'off',
235+
},
236+
},
237+
{
238+
files: ['x-pack/legacy/plugins/watcher/**/*.{js,ts,tsx}'],
239+
rules: {
240+
'react-hooks/rules-of-hooks': 'off',
241+
'react-hooks/exhaustive-deps': 'off',
242+
},
243+
},
244+
58245
/**
59246
* Prettier
60247
*/

.github/CODEOWNERS

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,14 @@
88

99
# App Architecture
1010
/src/plugins/data/ @elastic/kibana-app-arch
11-
/src/plugins/kibana_utils/ @elastic/kibana-app-arch
11+
/src/plugins/embeddable/ @elastic/kibana-app-arch
12+
/src/plugins/expressions/ @elastic/kibana-app-arch
1213
/src/plugins/kibana_react/ @elastic/kibana-app-arch
14+
/src/plugins/kibana_utils/ @elastic/kibana-app-arch
15+
/src/plugins/navigation/ @elastic/kibana-app-arch
16+
/src/plugins/ui_actions/ @elastic/kibana-app-arch
17+
/src/plugins/visualizations/ @elastic/kibana-app-arch
18+
/x-pack/plugins/advanced_ui_actions/ @elastic/kibana-app-arch
1319

1420
# APM
1521
/x-pack/legacy/plugins/apm/ @elastic/apm-ui
@@ -36,7 +42,9 @@
3642
/x-pack/test/functional/apps/machine_learning/ @elastic/ml-ui
3743
/x-pack/test/functional/services/machine_learning/ @elastic/ml-ui
3844
/x-pack/test/functional/services/ml.ts @elastic/ml-ui
39-
/x-pack/legacy/plugins/transform/ @elastic/ml-ui
45+
# ML team owns the transform plugin, ES team added here for visibility
46+
# because the plugin lives in Kibana's Elasticsearch management section.
47+
/x-pack/legacy/plugins/transform/ @elastic/ml-ui @elastic/es-ui
4048

4149
# Operations
4250
/renovate.json5 @elastic/kibana-operations
@@ -55,6 +63,7 @@
5563
/src/legacy/server/saved_objects/ @elastic/kibana-platform
5664
/config/kibana.yml @elastic/kibana-platform
5765
/x-pack/plugins/features/ @elastic/kibana-platform
66+
/x-pack/plugins/licensing/ @elastic/kibana-platform
5867

5968
# Security
6069
/x-pack/legacy/plugins/security/ @elastic/kibana-security
@@ -87,9 +96,6 @@
8796
/x-pack/legacy/plugins/rollup/ @elastic/es-ui
8897
/x-pack/legacy/plugins/searchprofiler/ @elastic/es-ui
8998
/x-pack/legacy/plugins/snapshot_restore/ @elastic/es-ui
90-
# ML team owns the transform plugin, ES team added here for visibility
91-
# because the plugin lives in Kibana's Elasticsearch management section.
92-
/x-pack/legacy/plugins/transform/ @elastic/es-ui
9399
/x-pack/legacy/plugins/watcher/ @elastic/es-ui
94100

95101
# Kibana TSVB external contractors

.github/labeler.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
- src/plugins/data/**/*
33
- src/plugins/embeddable/**/*
44
- src/plugins/kibana_react/**/*
5+
- src/plugins/navigation/**/*
56
- src/plugins/kibana_utils/**/*
67
- src/legacy/core_plugins/dashboard_embeddable_container/**/*
78
- src/legacy/core_plugins/data/**/*

.i18nrc.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@
33
"common.ui": "src/legacy/ui",
44
"data": ["src/legacy/core_plugins/data", "src/plugins/data"],
55
"expressions": "src/legacy/core_plugins/expressions",
6+
"expressions_np": "src/plugins/expressions",
67
"kibana_react": "src/legacy/core_plugins/kibana_react",
8+
"navigation": "src/legacy/core_plugins/navigation",
79
"server": "src/legacy/server",
810
"console": "src/legacy/core_plugins/console",
911
"core": "src/core",
@@ -28,6 +30,7 @@
2830
"kbnESQuery": "packages/kbn-es-query",
2931
"inspector": "src/plugins/inspector",
3032
"kibana-react": "src/plugins/kibana_react",
33+
"visualizations": "src/plugins/visualizations",
3134
"telemetry": "src/legacy/core_plugins/telemetry",
3235
"esUi": "src/plugins/es_ui_shared",
3336
"uiActions": "src/plugins/ui_actions"

0 commit comments

Comments
 (0)