Skip to content

Commit d5bddce

Browse files
committed
Merge branch 'master' into saved-objects/scoped-client-with-extra-types
* master: (191 commits) [Maps] Get number of categories from palette (elastic#66454) move oss features registration to KP (elastic#66524) [kbn/plugin-helpers] typescript-ify (elastic#66513) Add kibana-operations as codeowners for .ci/es-snapshots and vars/ (elastic#66746) FTR: move basic services under common folder (elastic#66563) Migrate Beats Management UI to KP (elastic#65791) [CI] Add 20 minutes to overall build timeout lint import from restricted zones for export exressions (elastic#66588) [SIEM][Detection Engine] Add validation for Rule Actions (elastic#63332) KP plugins shouldn't need package.json (elastic#66654) Replace agent metrics link with the new one (elastic#66632) [CI] Add one retry to setup step (elastic#66638) [CI] Add slack alerts to tracked branch jobs, change default channel, change formatting (elastic#66580) [docLinks] Add docLinks to CoreSetup. (elastic#66631) [DOCS] Rename monitoring collection from internal to legacy (elastic#65781) unskip newsfeed tests (elastic#66562) [NP] Migrate uiSettings owned by Kibana app (elastic#64321) [ML] Functional tests - stabilize typing in DFA mml input (elastic#66706) [Map] return bounding box for static feature collection without joins (elastic#66607) remove trailing slash in graph sample data links (elastic#66358) ...
2 parents 3cccf63 + b2df052 commit d5bddce

File tree

4,222 files changed

+160250
-113240
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,222 files changed

+160250
-113240
lines changed

.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
}

.eslintrc.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ module.exports = {
133133
* Licence headers
134134
*/
135135
{
136-
files: ['**/*.{js,ts,tsx}'],
136+
files: ['**/*.{js,ts,tsx}', '!plugins/**/*'],
137137
rules: {
138138
'@kbn/eslint/require-license-header': [
139139
'error',
@@ -219,6 +219,8 @@ module.exports = {
219219
// for absolute imports until fixed in
220220
// https://github.com/elastic/kibana/issues/36096
221221
'!src/core/server/*.test.mocks{,.ts}',
222+
223+
'target/types/**',
222224
],
223225
allowSameFolder: true,
224226
errorMessage:
@@ -491,7 +493,6 @@ module.exports = {
491493
'.eslintrc.js',
492494
'**/webpackShims/**/*.js',
493495
'packages/kbn-plugin-generator/**/*.js',
494-
'packages/kbn-plugin-helpers/**/*.js',
495496
'packages/kbn-eslint-import-resolver-kibana/**/*.js',
496497
'packages/kbn-eslint-plugin-eslint/**/*',
497498
'x-pack/gulpfile.js',

.github/CODEOWNERS

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,14 @@
127127
/src/legacy/server/sass/ @elastic/kibana-operations
128128
/src/legacy/server/utils/ @elastic/kibana-operations
129129
/src/legacy/server/warnings/ @elastic/kibana-operations
130+
/.ci/es-snapshots/ @elastic/kibana-operations
131+
/vars/ @elastic/kibana-operations
132+
133+
# Quality Assurance
134+
/src/dev/code_coverage @elastic/kibana-qa
135+
/test/functional/services/common @elastic/kibana-qa
136+
/test/functional/services/lib @elastic/kibana-qa
137+
/test/functional/services/remote @elastic/kibana-qa
130138

131139
# Platform
132140
/src/core/ @elastic/kibana-platform
@@ -161,7 +169,8 @@
161169

162170
# Pulse
163171
/packages/kbn-analytics/ @elastic/pulse
164-
/src/legacy/core_plugins/ui_metric/ @elastic/pulse
172+
/src/plugins/kibana_usage_collection/ @elastic/pulse
173+
/src/plugins/newsfeed/ @elastic/pulse
165174
/src/plugins/telemetry/ @elastic/pulse
166175
/src/plugins/telemetry_collection_manager/ @elastic/pulse
167176
/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.

Jenkinsfile

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

6-
kibanaPipeline(timeoutMinutes: 135, checkPrChanges: true) {
6+
kibanaPipeline(timeoutMinutes: 155, checkPrChanges: true) {
77
ciStats.trackBuild {
88
githubPr.withDefaultPrComments {
99
catchError {
@@ -53,7 +53,9 @@ kibanaPipeline(timeoutMinutes: 135, checkPrChanges: true) {
5353
}
5454
}
5555

56-
retryable.printFlakyFailures()
57-
kibanaPipeline.sendMail()
56+
if (params.NOTIFY_ON_FAILURE) {
57+
slackNotifications.onFailure()
58+
kibanaPipeline.sendMail()
59+
}
5860
}
5961
}

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
}

0 commit comments

Comments
 (0)