Skip to content

Commit 38d05b3

Browse files
committed
Merge branch 'master' into saved-object-setup-client
2 parents c6ddbfe + 6c4f3cb commit 38d05b3

File tree

1,770 files changed

+37061
-67970
lines changed

Some content is hidden

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

1,770 files changed

+37061
-67970
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: 201 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,207 @@ 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+
'react-hooks/rules-of-hooks': 'off',
210+
'jsx-a11y/click-events-have-key-events': 'off',
211+
},
212+
},
213+
{
214+
files: ['x-pack/legacy/plugins/monitoring/**/*.{js,ts,tsx}'],
215+
rules: {
216+
'jsx-a11y/click-events-have-key-events': 'off',
217+
},
218+
},
219+
{
220+
files: ['x-pack/legacy/plugins/siem/**/*.{js,ts,tsx}'],
221+
rules: {
222+
'react-hooks/exhaustive-deps': 'off',
223+
'react-hooks/rules-of-hooks': 'off',
224+
},
225+
},
226+
{
227+
files: ['x-pack/legacy/plugins/snapshot_restore/**/*.{js,ts,tsx}'],
228+
rules: {
229+
'react-hooks/exhaustive-deps': 'off',
230+
},
231+
},
232+
{
233+
files: ['x-pack/legacy/plugins/spaces/**/*.{js,ts,tsx}'],
234+
rules: {
235+
'react-hooks/exhaustive-deps': 'off',
236+
},
237+
},
238+
{
239+
files: ['x-pack/legacy/plugins/transform/**/*.{js,ts,tsx}'],
240+
rules: {
241+
'react-hooks/exhaustive-deps': 'off',
242+
},
243+
},
244+
{
245+
files: ['x-pack/legacy/plugins/uptime/**/*.{js,ts,tsx}'],
246+
rules: {
247+
'react-hooks/exhaustive-deps': 'off',
248+
'react-hooks/rules-of-hooks': 'off',
249+
},
250+
},
251+
{
252+
files: ['x-pack/legacy/plugins/watcher/**/*.{js,ts,tsx}'],
253+
rules: {
254+
'react-hooks/rules-of-hooks': 'off',
255+
'react-hooks/exhaustive-deps': 'off',
256+
},
257+
},
258+
58259
/**
59260
* Prettier
60261
*/

.github/CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
/src/plugins/data/ @elastic/kibana-app-arch
1111
/src/plugins/kibana_utils/ @elastic/kibana-app-arch
1212
/src/plugins/kibana_react/ @elastic/kibana-app-arch
13+
/src/plugins/navigation/ @elastic/kibana-app-arch
1314

1415
# APM
1516
/x-pack/legacy/plugins/apm/ @elastic/apm-ui

.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: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
"data": ["src/legacy/core_plugins/data", "src/plugins/data"],
55
"expressions": "src/legacy/core_plugins/expressions",
66
"kibana_react": "src/legacy/core_plugins/kibana_react",
7+
"navigation": "src/legacy/core_plugins/navigation",
78
"server": "src/legacy/server",
89
"console": "src/legacy/core_plugins/console",
910
"core": "src/core",

0 commit comments

Comments
 (0)