Skip to content

Commit d63064b

Browse files
committed
Merge branch 'master' of github.com:elastic/kibana into react_keys_exceptions
2 parents d640f50 + b1d76ce commit d63064b

File tree

3,115 files changed

+4230039
-34428
lines changed

Some content is hidden

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

3,115 files changed

+4230039
-34428
lines changed

.backportrc.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"targetBranchChoices": [
44
{ "name": "master", "checked": true },
55
{ "name": "7.x", "checked": true },
6+
"7.12",
67
"7.11",
78
"7.10",
89
"7.9",
@@ -29,7 +30,9 @@
2930
"targetPRLabels": ["backport"],
3031
"branchLabelMapping": {
3132
"^v8.0.0$": "master",
32-
"^v7.12.0$": "7.x",
33+
"^v7.13.0$": "7.x",
3334
"^v(\\d+).(\\d+).\\d+$": "$1.$2"
34-
}
35+
},
36+
"autoMerge": true,
37+
"autoMergeMethod": "squash"
3538
}

.ci/.storybook/main.js

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
/*
2+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
3+
* or more contributor license agreements. Licensed under the Elastic License
4+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
5+
* in compliance with, at your election, the Elastic License 2.0 or the Server
6+
* Side Public License, v 1.
7+
*/
8+
9+
const config = require('@kbn/storybook').defaultConfig;
10+
const aliases = require('../../src/dev/storybook/aliases.ts').storybookAliases;
11+
12+
config.refs = {};
13+
14+
for (const alias of Object.keys(aliases).filter((a) => a !== 'ci_composite')) {
15+
// snake_case -> Title Case
16+
const title = alias
17+
.replace(/_/g, ' ')
18+
.split(' ')
19+
.map((n) => n[0].toUpperCase() + n.slice(1))
20+
.join(' ');
21+
22+
config.refs[alias] = {
23+
title: title,
24+
url: `${process.env.STORYBOOK_BASE_URL}/${alias}`,
25+
};
26+
}
27+
28+
module.exports = config;

.ci/Jenkinsfile_coverage

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@
33
library 'kibana-pipeline-library'
44
kibanaLibrary.load() // load from the Jenkins instance
55

6-
kibanaPipeline(timeoutMinutes: 240) {
6+
kibanaPipeline(timeoutMinutes: 300) {
77
catchErrors {
88
def timestamp = new Date(currentBuild.startTimeInMillis).format("yyyy-MM-dd'T'HH:mm:ss'Z'", TimeZone.getTimeZone("UTC"))
99
withEnv([
1010
"TIME_STAMP=${timestamp}",
1111
'CODE_COVERAGE=1', // Enables coverage. Needed for multiple ci scripts, such as remote.ts, test/scripts/*.sh, schema.js, etc.
1212
]) {
13-
workers.base(name: 'coverage-worker', size: 'l', ramDisk: false, bootstrapped: false) {
13+
workers.base(name: 'coverage-worker', size: 'xl', ramDisk: false, bootstrapped: false) {
1414
catchError {
1515

1616
kibanaPipeline.bash("""

.ci/Jenkinsfile_flaky

Lines changed: 78 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -3,47 +3,39 @@
33
library 'kibana-pipeline-library'
44
kibanaLibrary.load()
55

6-
def CI_GROUP_PARAM = params.CI_GROUP
6+
def TASK_PARAM = params.TASK ?: params.CI_GROUP
77

88
// Looks like 'oss:ciGroup:1', 'oss:firefoxSmoke'
9-
def JOB_PARTS = CI_GROUP_PARAM.split(':')
9+
def JOB_PARTS = TASK_PARAM.split(':')
1010
def IS_XPACK = JOB_PARTS[0] == 'xpack'
11-
def JOB = JOB_PARTS[1]
11+
def JOB = JOB_PARTS.size() > 1 ? JOB_PARTS[1] : JOB_PARTS[0]
1212
def CI_GROUP = JOB_PARTS.size() > 2 ? JOB_PARTS[2] : ''
1313
def EXECUTIONS = params.NUMBER_EXECUTIONS.toInteger()
1414
def AGENT_COUNT = getAgentCount(EXECUTIONS)
15-
16-
def worker = getWorkerFromParams(IS_XPACK, JOB, CI_GROUP)
17-
18-
def workerFailures = []
15+
def NEED_BUILD = JOB != 'jestIntegration' && JOB != 'apiIntegration'
1916

2017
currentBuild.displayName += trunc(" ${params.GITHUB_OWNER}:${params.branch_specifier}", 24)
2118
currentBuild.description = "${params.CI_GROUP}<br />Agents: ${AGENT_COUNT}<br />Executions: ${params.NUMBER_EXECUTIONS}"
2219

2320
kibanaPipeline(timeoutMinutes: 180) {
2421
def agents = [:]
22+
def workerFailures = []
23+
24+
def worker = getWorkerFromParams(IS_XPACK, JOB, CI_GROUP)
25+
2526
for(def agentNumber = 1; agentNumber <= AGENT_COUNT; agentNumber++) {
26-
def agentNumberInside = agentNumber
2727
def agentExecutions = floor(EXECUTIONS/AGENT_COUNT) + (agentNumber <= EXECUTIONS%AGENT_COUNT ? 1 : 0)
28+
2829
agents["agent-${agentNumber}"] = {
29-
catchErrors {
30-
print "Agent ${agentNumberInside} - ${agentExecutions} executions"
31-
32-
withEnv([
33-
'IGNORE_SHIP_CI_STATS_ERROR=true',
34-
]) {
35-
workers.functional('flaky-test-runner', {
36-
if (!IS_XPACK) {
37-
kibanaPipeline.buildOss()
38-
if (CI_GROUP == '1') {
39-
runbld("./test/scripts/jenkins_build_kbn_sample_panel_action.sh", "Build kbn tp sample panel action for ciGroup1")
40-
}
41-
} else {
42-
kibanaPipeline.buildXpack()
43-
}
44-
}, getWorkerMap(agentNumberInside, agentExecutions, worker, workerFailures))()
45-
}
46-
}
30+
agentProcess(
31+
agentNumber: agentNumber,
32+
agentExecutions: agentExecutions,
33+
worker: worker,
34+
workerFailures: workerFailures,
35+
needBuild: NEED_BUILD,
36+
isXpack: IS_XPACK,
37+
ciGroup: CI_GROUP
38+
)
4739
}
4840
}
4941

@@ -59,14 +51,70 @@ kibanaPipeline(timeoutMinutes: 180) {
5951
}
6052
}
6153

54+
def agentProcess(Map params = [:]) {
55+
def config = [
56+
agentNumber: 1,
57+
agentExecutions: 0,
58+
worker: {},
59+
workerFailures: [],
60+
needBuild: false,
61+
isXpack: false,
62+
ciGroup: null,
63+
] + params
64+
65+
catchErrors {
66+
print "Agent ${config.agentNumber} - ${config.agentExecutions} executions"
67+
68+
withEnv([
69+
'IGNORE_SHIP_CI_STATS_ERROR=true',
70+
]) {
71+
kibanaPipeline.withTasks([
72+
parallel: 20,
73+
]) {
74+
task {
75+
if (config.needBuild) {
76+
if (!config.isXpack) {
77+
kibanaPipeline.buildOss()
78+
} else {
79+
kibanaPipeline.buildXpack()
80+
}
81+
}
82+
83+
for(def i = 0; i < config.agentExecutions; i++) {
84+
def taskNumber = i
85+
task({
86+
withEnv([
87+
"REMOVE_KIBANA_INSTALL_DIR=1",
88+
]) {
89+
catchErrors {
90+
try {
91+
config.worker()
92+
} catch (ex) {
93+
config.workerFailures << "agent-${config.agentNumber}-${taskNumber}"
94+
throw ex
95+
}
96+
}
97+
}
98+
})
99+
}
100+
}
101+
}
102+
}
103+
}
104+
}
105+
62106
def getWorkerFromParams(isXpack, job, ciGroup) {
63107
if (!isXpack) {
64108
if (job == 'accessibility') {
65109
return kibanaPipeline.functionalTestProcess('kibana-accessibility', './test/scripts/jenkins_accessibility.sh')
66110
} else if (job == 'firefoxSmoke') {
67111
return kibanaPipeline.functionalTestProcess('firefoxSmoke', './test/scripts/jenkins_firefox_smoke.sh')
68-
} else if(job == 'visualRegression') {
112+
} else if (job == 'visualRegression') {
69113
return kibanaPipeline.functionalTestProcess('visualRegression', './test/scripts/jenkins_visual_regression.sh')
114+
} else if (job == 'jestIntegration') {
115+
return kibanaPipeline.scriptTaskDocker('Jest Integration Tests', 'test/scripts/test/jest_integration.sh')
116+
} else if (job == 'apiIntegration') {
117+
return kibanaPipeline.scriptTask('API Integration Tests', 'test/scripts/test/api_integration.sh')
70118
} else {
71119
return kibanaPipeline.ossCiGroupProcess(ciGroup)
72120
}
@@ -76,45 +124,16 @@ def getWorkerFromParams(isXpack, job, ciGroup) {
76124
return kibanaPipeline.functionalTestProcess('xpack-accessibility', './test/scripts/jenkins_xpack_accessibility.sh')
77125
} else if (job == 'firefoxSmoke') {
78126
return kibanaPipeline.functionalTestProcess('xpack-firefoxSmoke', './test/scripts/jenkins_xpack_firefox_smoke.sh')
79-
} else if(job == 'visualRegression') {
127+
} else if (job == 'visualRegression') {
80128
return kibanaPipeline.functionalTestProcess('xpack-visualRegression', './test/scripts/jenkins_xpack_visual_regression.sh')
81129
} else {
82130
return kibanaPipeline.xpackCiGroupProcess(ciGroup)
83131
}
84132
}
85133

86-
def getWorkerMap(agentNumber, numberOfExecutions, worker, workerFailures, maxWorkerProcesses = 12) {
87-
def workerMap = [:]
88-
def numberOfWorkers = Math.min(numberOfExecutions, maxWorkerProcesses)
89-
90-
for(def i = 1; i <= numberOfWorkers; i++) {
91-
def workerExecutions = floor(numberOfExecutions/numberOfWorkers + (i <= numberOfExecutions%numberOfWorkers ? 1 : 0))
92-
93-
workerMap["agent-${agentNumber}-worker-${i}"] = { workerNumber ->
94-
for(def j = 0; j < workerExecutions; j++) {
95-
print "Execute agent-${agentNumber} worker-${workerNumber}: ${j}"
96-
withEnv([
97-
"REMOVE_KIBANA_INSTALL_DIR=1",
98-
]) {
99-
catchErrors {
100-
try {
101-
worker(workerNumber)
102-
} catch (ex) {
103-
workerFailures << "agent-${agentNumber} worker-${workerNumber}-${j}"
104-
throw ex
105-
}
106-
}
107-
}
108-
}
109-
}
110-
}
111-
112-
return workerMap
113-
}
114-
115134
def getAgentCount(executions) {
116-
// Increase agent count every 24 worker processess, up to 3 agents maximum
117-
return Math.min(3, 1 + floor(executions/24))
135+
// Increase agent count every 20 worker processess, up to 3 agents maximum
136+
return Math.min(3, 1 + floor(executions/20))
118137
}
119138

120139
def trunc(str, length) {

.ci/es-snapshots/Jenkinsfile_verify_es

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ currentBuild.description = "ES: ${SNAPSHOT_VERSION}<br />Kibana: ${params.branch
1919

2020
def SNAPSHOT_MANIFEST = "https://storage.googleapis.com/kibana-ci-es-snapshots-daily/${SNAPSHOT_VERSION}/archives/${SNAPSHOT_ID}/manifest.json"
2121

22-
kibanaPipeline(timeoutMinutes: 150) {
22+
kibanaPipeline(timeoutMinutes: 210) {
2323
catchErrors {
2424
slackNotifications.onFailure(
2525
title: "*<${env.BUILD_URL}|[${SNAPSHOT_VERSION}] ES Snapshot Verification Failure>*",

.eslintignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ node_modules
1515
target
1616
snapshots.js
1717

18+
!/.ci
1819
!/.eslintrc.js
1920
!.storybook
2021

.github/CODEOWNERS

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,13 @@
7474
#CC# /src/plugins/apm_oss/ @elastic/apm-ui
7575
#CC# /x-pack/plugins/observability/ @elastic/apm-ui
7676

77-
# Client Side Monitoring (lives in APM directories but owned by Uptime)
77+
# Uptime
78+
/x-pack/plugins/uptime @elastic/uptime
79+
/x-pack/test/functional_with_es_ssl/apps/uptime @elastic/uptime
80+
/x-pack/test/functional/apps/uptime @elastic/uptime
81+
/x-pack/test/api_integration/apis/uptime @elastic/uptime
82+
83+
# Client Side Monitoring / Uptime (lives in APM directories but owned by Uptime)
7884
/x-pack/plugins/apm/e2e/cypress/support/step_definitions/csm @elastic/uptime
7985
/x-pack/plugins/apm/e2e/cypress/integration/csm_dashboard.feature @elastic/uptime
8086
/x-pack/plugins/apm/public/application/csmApp.tsx @elastic/uptime
@@ -106,7 +112,6 @@
106112
/x-pack/plugins/fleet/ @elastic/fleet
107113
/x-pack/plugins/observability/ @elastic/observability-ui
108114
/x-pack/plugins/monitoring/ @elastic/stack-monitoring-ui
109-
/x-pack/plugins/uptime @elastic/uptime
110115

111116
# Machine Learning
112117
/x-pack/plugins/ml/ @elastic/ml-ui
@@ -246,6 +251,7 @@ x-pack/plugins/telemetry_collection_xpack/schema/ @elastic/kibana-core @elastic/
246251
/x-pack/test/security_api_integration/ @elastic/kibana-security
247252
/x-pack/test/security_functional/ @elastic/kibana-security
248253
/x-pack/test/spaces_api_integration/ @elastic/kibana-security
254+
/x-pack/test/saved_object_api_integration/ @elastic/kibana-security
249255
#CC# /x-pack/plugins/security/ @elastic/kibana-security
250256

251257
# Kibana Alerting Services

.github/workflows/backport.yml

Lines changed: 14 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -18,34 +18,20 @@ jobs:
1818
)
1919
runs-on: ubuntu-latest
2020
steps:
21-
- name: 'Get backport config'
22-
run: |
23-
curl 'https://raw.githubusercontent.com/elastic/kibana/master/.backportrc.json' > .backportrc.json
24-
25-
- name: Use Node.js 14.x
26-
uses: actions/setup-node@v1
21+
- name: Checkout Actions
22+
uses: actions/checkout@v2
2723
with:
28-
node-version: 14.x
29-
30-
- name: Install backport CLI
31-
run: npm install -g backport@5.6.4
24+
repository: 'elastic/kibana-github-actions'
25+
ref: main
26+
path: ./actions
3227

33-
- name: Backport PR
34-
run: |
35-
git config --global user.name "kibanamachine"
36-
git config --global user.email "42973632+kibanamachine@users.noreply.github.com"
37-
backport --fork true --username kibanamachine --accessToken "${{ secrets.KIBANAMACHINE_TOKEN }}" --ci --pr "$PR_NUMBER" --labels backport --assignee "$PR_OWNER" | tee 'output.log'
38-
env:
39-
PR_NUMBER: ${{ github.event.pull_request.number }}
40-
PR_OWNER: ${{ github.event.pull_request.user.login }}
28+
- name: Install Actions
29+
run: npm install --production --prefix ./actions
4130

42-
- name: Report backport status
43-
run: |
44-
COMMENT="Backport result
45-
\`\`\`
46-
$(cat output.log)
47-
\`\`\`"
48-
49-
GITHUB_TOKEN="${{ secrets.KIBANAMACHINE_TOKEN }}" gh api -X POST repos/elastic/kibana/issues/$PR_NUMBER/comments -F body="$COMMENT"
50-
env:
51-
PR_NUMBER: ${{ github.event.pull_request.number }}
31+
- name: Run Backport
32+
uses: ./actions/backport
33+
with:
34+
branch: master
35+
github_token: ${{secrets.KIBANAMACHINE_TOKEN}}
36+
commit_user: kibanamachine
37+
commit_email: 42973632+kibanamachine@users.noreply.github.com

.gitignore

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,6 @@ npm-debug.log*
6161
.ci/bash_standard_lib.sh
6262
.gradle
6363

64-
# apm plugin
65-
/x-pack/plugins/apm/tsconfig.json
66-
apm.tsconfig.json
6764
## @cypress/snapshot from apm plugin
6865
snapshots.js
6966

.i18nrc.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
"maps_legacy": "src/plugins/maps_legacy",
3030
"monaco": "packages/kbn-monaco/src",
3131
"presentationUtil": "src/plugins/presentation_util",
32+
"indexPatternFieldEditor": "src/plugins/index_pattern_field_editor",
3233
"indexPatternManagement": "src/plugins/index_pattern_management",
3334
"advancedSettings": "src/plugins/advanced_settings",
3435
"kibana_legacy": "src/plugins/kibana_legacy",

0 commit comments

Comments
 (0)