Skip to content

Commit ea3af55

Browse files
Merge branch 'master' into add-df-links-to-management-list
2 parents 1ec4fde + 28623ad commit ea3af55

File tree

3,846 files changed

+152837
-107586
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,846 files changed

+152837
-107586
lines changed

.backportrc.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
],
2626
"targetPRLabels": ["backport"],
2727
"branchLabelMapping": {
28-
"^v7.8.0$": "7.x",
28+
"^v7.9.0$": "7.x",
2929
"^v(\\d+).(\\d+).\\d+$": "$1.$2"
3030
}
3131
}

.ci/Jenkinsfile_coverage

Lines changed: 16 additions & 79 deletions
Original file line numberDiff line numberDiff line change
@@ -5,89 +5,26 @@ kibanaLibrary.load() // load from the Jenkins instance
55

66
kibanaPipeline(timeoutMinutes: 240) {
77
catchErrors {
8+
def timestamp = new Date(currentBuild.startTimeInMillis).format("yyyy-MM-dd'T'HH:mm:ss'Z'", TimeZone.getTimeZone("UTC"))
89
withEnv([
9-
'CODE_COVERAGE=1', // Needed for multiple ci scripts, such as remote.ts, test/scripts/*.sh, schema.js, etc.
10+
"TIME_STAMP=${timestamp}",
11+
'CODE_COVERAGE=1', // Enables coverage. Needed for multiple ci scripts, such as remote.ts, test/scripts/*.sh, schema.js, etc.
1012
]) {
11-
parallel([
12-
'kibana-intake-agent': workers.intake('kibana-intake', './test/scripts/jenkins_unit.sh'),
13-
'x-pack-intake-agent': {
14-
withEnv([
15-
'NODE_ENV=test' // Needed for jest tests only
16-
]) {
17-
workers.intake('x-pack-intake', './test/scripts/jenkins_xpack.sh')()
18-
}
19-
},
20-
'kibana-oss-agent': workers.functional('kibana-oss-tests', { kibanaPipeline.buildOss() }, [
21-
'oss-ciGroup1': kibanaPipeline.ossCiGroupProcess(1),
22-
'oss-ciGroup2': kibanaPipeline.ossCiGroupProcess(2),
23-
'oss-ciGroup3': kibanaPipeline.ossCiGroupProcess(3),
24-
'oss-ciGroup4': kibanaPipeline.ossCiGroupProcess(4),
25-
'oss-ciGroup5': kibanaPipeline.ossCiGroupProcess(5),
26-
'oss-ciGroup6': kibanaPipeline.ossCiGroupProcess(6),
27-
'oss-ciGroup7': kibanaPipeline.ossCiGroupProcess(7),
28-
'oss-ciGroup8': kibanaPipeline.ossCiGroupProcess(8),
29-
'oss-ciGroup9': kibanaPipeline.ossCiGroupProcess(9),
30-
'oss-ciGroup10': kibanaPipeline.ossCiGroupProcess(10),
31-
'oss-ciGroup11': kibanaPipeline.ossCiGroupProcess(11),
32-
'oss-ciGroup12': kibanaPipeline.ossCiGroupProcess(12),
33-
]),
34-
'kibana-xpack-agent': workers.functional('kibana-xpack-tests', { kibanaPipeline.buildXpack() }, [
35-
'xpack-ciGroup1': kibanaPipeline.xpackCiGroupProcess(1),
36-
'xpack-ciGroup2': kibanaPipeline.xpackCiGroupProcess(2),
37-
'xpack-ciGroup3': kibanaPipeline.xpackCiGroupProcess(3),
38-
'xpack-ciGroup4': kibanaPipeline.xpackCiGroupProcess(4),
39-
'xpack-ciGroup5': kibanaPipeline.xpackCiGroupProcess(5),
40-
'xpack-ciGroup6': kibanaPipeline.xpackCiGroupProcess(6),
41-
'xpack-ciGroup7': kibanaPipeline.xpackCiGroupProcess(7),
42-
'xpack-ciGroup8': kibanaPipeline.xpackCiGroupProcess(8),
43-
'xpack-ciGroup9': kibanaPipeline.xpackCiGroupProcess(9),
44-
'xpack-ciGroup10': kibanaPipeline.xpackCiGroupProcess(10),
45-
]),
46-
])
4713
workers.base(name: 'coverage-worker', size: 'l', ramDisk: false, bootstrapped: false) {
48-
kibanaPipeline.downloadCoverageArtifacts()
49-
kibanaPipeline.bash(
50-
'''
51-
# bootstrap from x-pack folder
52-
source src/dev/ci_setup/setup_env.sh
53-
cd x-pack
54-
yarn kbn bootstrap --prefer-offline
55-
cd ..
56-
# extract archives
57-
mkdir -p /tmp/extracted_coverage
58-
echo extracting intakes
59-
tar -xzf /tmp/downloaded_coverage/coverage/kibana-intake/kibana-coverage.tar.gz -C /tmp/extracted_coverage
60-
tar -xzf /tmp/downloaded_coverage/coverage/x-pack-intake/kibana-coverage.tar.gz -C /tmp/extracted_coverage
61-
echo extracting kibana-oss-tests
62-
tar -xzf /tmp/downloaded_coverage/coverage/kibana-oss-tests/kibana-coverage.tar.gz -C /tmp/extracted_coverage
63-
echo extracting kibana-xpack-tests
64-
tar -xzf /tmp/downloaded_coverage/coverage/kibana-xpack-tests/kibana-coverage.tar.gz -C /tmp/extracted_coverage
65-
# replace path in json files to have valid html report
66-
pwd=$(pwd)
67-
du -sh /tmp/extracted_coverage/target/kibana-coverage/
68-
echo replacing path in json files
69-
for i in {1..9}; do
70-
sed -i "s|/dev/shm/workspace/kibana|$pwd|g" /tmp/extracted_coverage/target/kibana-coverage/functional/${i}*.json &
71-
done
72-
wait
73-
# merge oss & x-pack reports
74-
echo merging coverage reports
75-
yarn nyc report --temp-dir /tmp/extracted_coverage/target/kibana-coverage/jest --report-dir target/kibana-coverage/jest-combined --reporter=html --reporter=json-summary
76-
yarn nyc report --temp-dir /tmp/extracted_coverage/target/kibana-coverage/functional --report-dir target/kibana-coverage/functional-combined --reporter=html --reporter=json-summary
77-
echo copy mocha reports
78-
mkdir -p target/kibana-coverage/mocha-combined
79-
cp -r /tmp/extracted_coverage/target/kibana-coverage/mocha target/kibana-coverage/mocha-combined
80-
''',
81-
"run `yarn kbn bootstrap && merge coverage`"
82-
)
83-
sh 'tar -czf kibana-jest-coverage.tar.gz target/kibana-coverage/jest-combined/*'
84-
kibanaPipeline.uploadCoverageArtifacts("coverage/jest-combined", 'kibana-jest-coverage.tar.gz')
85-
sh 'tar -czf kibana-functional-coverage.tar.gz target/kibana-coverage/functional-combined/*'
86-
kibanaPipeline.uploadCoverageArtifacts("coverage/functional-combined", 'kibana-functional-coverage.tar.gz')
87-
sh 'tar -czf kibana-mocha-coverage.tar.gz target/kibana-coverage/mocha-combined/*'
88-
kibanaPipeline.uploadCoverageArtifacts("coverage/mocha-combined", 'kibana-mocha-coverage.tar.gz')
14+
kibanaCoverage.runTests()
15+
handleIngestion(TIME_STAMP)
8916
}
9017
}
18+
kibanaPipeline.sendMail()
9119
}
92-
kibanaPipeline.sendMail()
9320
}
21+
22+
def handleIngestion(timestamp) {
23+
kibanaPipeline.downloadCoverageArtifacts()
24+
kibanaCoverage.prokLinks("### Process HTML Links")
25+
kibanaCoverage.collectVcsInfo("### Collect VCS Info")
26+
kibanaCoverage.ingest(timestamp, '### Injest && Upload')
27+
kibanaCoverage.uploadCoverageStaticSite(timestamp)
28+
}
29+
30+

.ci/Jenkinsfile_visual_baseline

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,22 @@ library 'kibana-pipeline-library'
44
kibanaLibrary.load()
55

66
kibanaPipeline(timeoutMinutes: 120) {
7-
catchError {
8-
parallel([
9-
'oss-visualRegression': {
10-
workers.ci(name: 'oss-visualRegression', size: 's', ramDisk: false) {
11-
kibanaPipeline.functionalTestProcess('oss-visualRegression', './test/scripts/jenkins_visual_regression.sh')(1)
12-
}
13-
},
14-
'xpack-visualRegression': {
15-
workers.ci(name: 'xpack-visualRegression', size: 's', ramDisk: false) {
16-
kibanaPipeline.functionalTestProcess('xpack-visualRegression', './test/scripts/jenkins_xpack_visual_regression.sh')(1)
17-
}
18-
},
19-
])
20-
}
7+
ciStats.trackBuild {
8+
catchError {
9+
parallel([
10+
'oss-visualRegression': {
11+
workers.ci(name: 'oss-visualRegression', size: 's', ramDisk: false) {
12+
kibanaPipeline.functionalTestProcess('oss-visualRegression', './test/scripts/jenkins_visual_regression.sh')(1)
13+
}
14+
},
15+
'xpack-visualRegression': {
16+
workers.ci(name: 'xpack-visualRegression', size: 's', ramDisk: false) {
17+
kibanaPipeline.functionalTestProcess('xpack-visualRegression', './test/scripts/jenkins_xpack_visual_regression.sh')(1)
18+
}
19+
},
20+
])
21+
}
2122

22-
kibanaPipeline.sendMail()
23+
kibanaPipeline.sendMail()
24+
}
2325
}

.github/CODEOWNERS

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,9 @@
128128
/src/legacy/server/utils/ @elastic/kibana-operations
129129
/src/legacy/server/warnings/ @elastic/kibana-operations
130130

131+
# Quality Assurance
132+
/src/dev/code_coverage @elastic/kibana-qa
133+
131134
# Platform
132135
/src/core/ @elastic/kibana-platform
133136
/config/kibana.yml @elastic/kibana-platform
@@ -161,7 +164,8 @@
161164

162165
# Pulse
163166
/packages/kbn-analytics/ @elastic/pulse
164-
/src/legacy/core_plugins/ui_metric/ @elastic/pulse
167+
/src/plugins/kibana_usage_collection/ @elastic/pulse
168+
/src/plugins/newsfeed/ @elastic/pulse
165169
/src/plugins/telemetry/ @elastic/pulse
166170
/src/plugins/telemetry_collection_manager/ @elastic/pulse
167171
/src/plugins/telemetry_management_section/ @elastic/pulse

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,4 +46,6 @@ npm-debug.log*
4646
.tern-project
4747
x-pack/plugins/apm/tsconfig.json
4848
apm.tsconfig.json
49+
/x-pack/legacy/plugins/apm/e2e/snapshots.js
4950
/x-pack/plugins/apm/e2e/snapshots.js
51+
.nyc_output

.sass-lint.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ files:
1111
- 'x-pack/plugins/cross_cluster_replication/**/*.s+(a|c)ss'
1212
- 'x-pack/legacy/plugins/maps/**/*.s+(a|c)ss'
1313
- 'x-pack/plugins/maps/**/*.s+(a|c)ss'
14+
- 'x-pack/plugins/spaces/**/*.s+(a|c)ss'
1415
ignore:
1516
- 'x-pack/plugins/canvas/shareable_runtime/**/*.s+(a|c)ss'
1617
rules:

CONTRIBUTING.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -414,6 +414,34 @@ extract them to a `JSON` file or integrate translations back to Kibana. To know
414414
We cannot support accepting contributions to the translations from any source other than the translators we have engaged to do the work.
415415
We are still to develop a proper process to accept any contributed translations. We certainly appreciate that people care enough about the localization effort to want to help improve the quality. We aim to build out a more comprehensive localization process for the future and will notify you once contributions can be supported, but for the time being, we are not able to incorporate suggestions.
416416

417+
### Syling with SASS
418+
419+
When writing a new component, create a sibling SASS file of the same name and import directly into the JS/TS component file. Doing so ensures the styles are never separated or lost on import and allows for better modularization (smaller individual plugin asset footprint).
420+
421+
Any JavaScript (or TypeScript) file that imports SASS (.scss) files will automatically build with the [EUI](https://elastic.github.io/eui/#/guidelines/sass) & Kibana invisibles (SASS variables, mixins, functions) from the [`styling_constants.scss` file](https://github.com/elastic/kibana/blob/master/src/legacy/ui/public/styles/_styling_constants.scss). However, any Legacy (file path includes `/legacy`) files will not.
422+
423+
**Example:**
424+
425+
```tsx
426+
// component.tsx
427+
428+
import './component.scss';
429+
430+
export const Component = () => {
431+
return (
432+
<div className="plgComponent" />
433+
);
434+
}
435+
```
436+
437+
```scss
438+
// component.scss
439+
440+
.plgComponent { ... }
441+
```
442+
443+
Do not use the underscore `_` SASS file naming pattern when importing directly into a javascript file.
444+
417445
### Testing and Building
418446

419447
To ensure that your changes will not break other functionality, please run the test suite and build process before submitting your Pull Request.

docs/api/features.asciidoc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ The API returns the following:
2929
"id": "discover",
3030
"name": "Discover",
3131
"icon": "discoverApp",
32-
"navLinkId": "kibana:discover",
32+
"navLinkId": "discover",
3333
"app": [
3434
"kibana"
3535
],
@@ -74,7 +74,7 @@ The API returns the following:
7474
"id": "visualize",
7575
"name": "Visualize",
7676
"icon": "visualizeApp",
77-
"navLinkId": "kibana:visualize",
77+
"navLinkId": "visualize",
7878
"app": [
7979
"kibana"
8080
],
@@ -121,7 +121,7 @@ The API returns the following:
121121
"id": "dashboard",
122122
"name": "Dashboard",
123123
"icon": "dashboardApp",
124-
"navLinkId": "kibana:dashboard",
124+
"navLinkId": "dashboards",
125125
"app": [
126126
"kibana"
127127
],
@@ -173,7 +173,7 @@ The API returns the following:
173173
"id": "dev_tools",
174174
"name": "Dev Tools",
175175
"icon": "devToolsApp",
176-
"navLinkId": "kibana:dev_tools",
176+
"navLinkId": "dev_tools",
177177
"app": [
178178
"kibana"
179179
],

docs/apm/api.asciidoc

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ The following Agent configuration APIs are available:
6060
======
6161

6262
`settings`::
63-
(required) Key/value object with settings and their corresponding value.
63+
(required) Key/value object with option name and option value.
6464

6565
`agent_name`::
6666
(optional) The agent name is used by the UI to determine which settings to display.
@@ -73,14 +73,14 @@ The following Agent configuration APIs are available:
7373
--------------------------------------------------
7474
PUT /api/apm/settings/agent-configuration
7575
{
76-
"service" : {
77-
"name" : "frontend",
78-
"environment" : "production"
76+
"service": {
77+
"name": "frontend",
78+
"environment": "production"
7979
},
80-
"settings" : {
81-
"transaction_sample_rate" : 0.4,
82-
"capture_body" : "off",
83-
"transaction_max_spans" : 500
80+
"settings": {
81+
"transaction_sample_rate": "0.4",
82+
"capture_body": "off",
83+
"transaction_max_spans": "500"
8484
},
8585
"agent_name": "nodejs"
8686
}
@@ -124,7 +124,7 @@ PUT /api/apm/settings/agent-configuration
124124
DELETE /api/apm/settings/agent-configuration
125125
{
126126
"service" : {
127-
"name" : "frontend",
127+
"name": "frontend",
128128
"environment": "production"
129129
}
130130
}
@@ -157,9 +157,9 @@ DELETE /api/apm/settings/agent-configuration
157157
"environment": "production"
158158
},
159159
"settings": {
160-
"transaction_sample_rate": 1,
160+
"transaction_sample_rate": "1",
161161
"capture_body": "off",
162-
"transaction_max_spans": 200
162+
"transaction_max_spans": "200"
163163
},
164164
"@timestamp": 1581934104843,
165165
"applied_by_agent": false,
@@ -171,9 +171,9 @@ DELETE /api/apm/settings/agent-configuration
171171
"name": "opbeans-go"
172172
},
173173
"settings": {
174-
"transaction_sample_rate": 1,
174+
"transaction_sample_rate": "1",
175175
"capture_body": "off",
176-
"transaction_max_spans": 300
176+
"transaction_max_spans": "300"
177177
},
178178
"@timestamp": 1581934111727,
179179
"applied_by_agent": false,
@@ -185,7 +185,7 @@ DELETE /api/apm/settings/agent-configuration
185185
"name": "frontend"
186186
},
187187
"settings": {
188-
"transaction_sample_rate": 1,
188+
"transaction_sample_rate": "1",
189189
},
190190
"@timestamp": 1582031336265,
191191
"applied_by_agent": false,
@@ -250,7 +250,7 @@ GET /api/apm/settings/agent-configuration
250250
"name": "frontend"
251251
},
252252
"settings": {
253-
"transaction_sample_rate": 1,
253+
"transaction_sample_rate": "1",
254254
},
255255
"@timestamp": 1582031336265,
256256
"applied_by_agent": false,
@@ -266,9 +266,9 @@ GET /api/apm/settings/agent-configuration
266266
--------------------------------------------------
267267
POST /api/apm/settings/agent-configuration/search
268268
{
269-
"etag" : "1e58c178efeebae15c25c539da740d21dee422fc",
269+
"etag": "1e58c178efeebae15c25c539da740d21dee422fc",
270270
"service" : {
271-
"name" : "frontend",
271+
"name": "frontend",
272272
"environment": "production"
273273
}
274274
}
477 KB
Loading

0 commit comments

Comments
 (0)